autoplot.bayesnecfit {bayesnec}R Documentation

autoplot.bayesnecfit

Description

bayesnec standard ggplot2 plotting method.

Usage

## S3 method for class 'bayesnecfit'
autoplot(object, ..., nec = TRUE, ecx = FALSE, force_x = FALSE, xform = NA)

Arguments

object

An object of class bayesnecfit as returned by function bnec.

...

Additional arguments to be passed to ggbnec_data.

nec

Should NEC values be added to the plot? Defaults to TRUE.

ecx

Should ECx values be added to the plot? Defaults to FALSE.

force_x

A logical value indicating if the argument xform should be forced on the predictor values. This is useful when the user transforms the predictor beforehand (e.g. when using a non-standard base function).

xform

A function to apply to the returned estimated concentration values.

Value

A ggplot object.

See Also

Other autoplot methods: autoplot.bayesmanecfit()

Examples


library(brms)
library(bayesnec)
options(mc.cores = 2)
data(nec_data)

necs <- bnec(y ~ crf(x, c("nec3param", "nec4param")), data = nec_data,
             iter = 2e2, family = Beta(link = "identity"))
nec3param <- pull_out(necs, "nec3param")
autoplot(nec3param)
autoplot(nec3param, nec = FALSE)
autoplot(nec3param, ecx = TRUE, ecx_val = 50)

# plot model averaged predictions
autoplot(necs)
# plot all panels together
autoplot(necs, ecx = TRUE, ecx_val = 50, all_models = TRUE)
# plots multiple models, one at a time, with interactive prompt
autoplot(necs, ecx = TRUE, ecx_val = 50, all_models = TRUE,
         multi_facet = FALSE)


[Package bayesnec version 2.0.2.5 Index]