| print_prior | R Documentation |
print_prior prints prior distributions stored in
brma, BMA, and RoBMA objects.
This is a user-facing helper for inspecting priors without extracting them
from the internal $priors list.
print_prior(x, ...)
## S3 method for class 'prior'
print_prior(x, ...)
## S3 method for class 'brma'
print_prior(x, parameter, parameter_mods, parameter_scale, ...)
x |
a |
... |
additional arguments passed to the prior printing method. Use
|
parameter |
character. Base parameter to print. If omitted, all stored
prior distributions are printed.
Common options are |
parameter_mods |
character. Moderator term to print.
Use |
parameter_scale |
character. Scale-regression term to print.
Use |
print_prior invisibly returns the selected prior distribution.
If multiple parameters are requested, a named list of prior distributions is
returned invisibly.
plot_prior() 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
)
print_prior(priors)
print_prior(priors, parameter = "mu")
print_prior(priors, parameter = "tau")
print_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.