Skip to contents

The plot() method for the modelbased::estimate_contrasts() function.

Usage

# S3 method for see_estimate_contrasts
plot(x, data = NULL, ...)

Arguments

x

An object.

data

The original data used to create this object. Can be a statistical model.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

# \donttest{
if (require("modelbased") && require("rstanarm")) {
  model <- stan_glm(Sepal.Width ~ Species, data = iris, refresh = 0)
  contrasts <- estimate_contrasts(model)
  means <- estimate_means(model)
  plot(contrasts, means)
}
#> Loading required package: modelbased
#> Loading required package: rstanarm
#> Loading required package: Rcpp
#> This is rstanarm version 2.21.3
#> - See https://mc-stan.org/rstanarm/articles/priors for changes to default priors!
#> - Default priors may change, so it's safest to specify priors, even if equivalent to the defaults.
#> - For execution on a local, multicore CPU with excess RAM we recommend calling
#>   options(mc.cores = parallel::detectCores())
#> 
#> Attaching package: ‘rstanarm’
#> The following object is masked from ‘package:parameters’:
#> 
#>     compare_models
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> We selected `at = c("Species")`.

# }