Learn R Programming

bayesnec (version 2.1.3.0)

autoplot: bayesnec standard ggplot2 plotting method

Description

bayesnec standard ggplot2 plotting method.

Usage

# S3 method for bayesnecfit
autoplot(object, ..., nec = TRUE, ecx = FALSE, xform = identity)

# S3 method for bayesmanecfit autoplot( object, ..., nec = TRUE, ecx = FALSE, xform = identity, all_models = FALSE, plot = TRUE, ask = TRUE, newpage = TRUE, multi_facet = TRUE )

Value

A ggplot object.

Arguments

object

An object of class bayesnecfit or bayesmanecfit.

...

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..

xform

A function to apply to the returned estimated concentration values.

all_models

Should all individual models be plotted separately\ (defaults to FALSE) or should model averaged predictions be plotted instead?

plot

Should output ggplot output be plotted? Only relevant if all = TRUE and multi_facet = FALSE.

ask

Indicates if the user is prompted before a new page is plotted. Only relevant if plot = TRUE and multi_facet = FALSE.

newpage

Indicates if the first set of plots should be plotted to a new page. Only relevant if plot = TRUE and multi_facet = FALSE.

multi_facet

Should all plots be plotted in one single panel via facets? Defaults to TRUE.

Examples

Run this code
if (FALSE) {
library(brms)
nec4param <- pull_out(manec_example, "nec4param")
autoplot(nec4param)
autoplot(nec4param, nec = FALSE)
autoplot(nec4param, ecx = TRUE, ecx_val = 50)

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

Run the code above in your browser using DataLab