| plot_prior | R Documentation |
plot_prior visualizes prior distributions stored in
brma, BMA, and RoBMA objects.
This is especially useful for objects created with only_priors = TRUE.
plot_prior(x, ...)
## S3 method for class 'prior'
plot_prior(x, plot_type = "base", ...)
## S3 method for class 'brma'
plot_prior(
x,
parameter = "mu",
parameter_mods,
parameter_scale,
standardized_coefficients = TRUE,
output_measure = NULL,
transform = NULL,
plot_type = "base",
...
)
x |
a |
... |
additional arguments passed to the prior plotting method. |
plot_type |
whether to use a base plot |
parameter |
character. Base parameter to plot. Defaults to |
parameter_mods |
character. Moderator term to plot.
Use |
parameter_scale |
character. Scale-regression term to plot.
Use |
standardized_coefficients |
whether to plot moderator and scale-regression
priors on the standardized predictor scale. Defaults to |
output_measure |
effect-size measure for location/effect predictions.
Defaults to the fitted measure. Supported conversions are among |
transform |
optional display transformation. Currently |
output_measure and transform transform the prior
plotting scale only for effect-size location priors ("mu" or the
meta-regression intercept).
plot_prior returns either NULL invisibly if
plot_type = "base" or a ggplot2 object if
plot_type = "ggplot". If multiple parameters are requested, a named
list is returned, invisibly for base plots.
BMA() RoBMA() brma() prior()
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
priors <- BMA(
yi = yi,
vi = vi,
mods = ~ Preregistered,
data = dat.lehmann2018,
measure = "SMD",
only_priors = TRUE
)
plot_prior(priors, parameter = "mu")
plot_prior(priors, parameter = "tau")
plot_prior(priors, parameter_mods = "Preregistered")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.