describe_prior {bayestestR} | R Documentation |
Describe Priors
Description
Returns a summary of the priors used in the model.
Usage
describe_prior(model, ...)
## S3 method for class 'brmsfit'
describe_prior(
model,
effects = c("fixed", "random", "all"),
component = c("conditional", "zi", "zero_inflated", "all", "location",
"distributional", "auxiliary"),
parameters = NULL,
...
)
Arguments
model |
A Bayesian model. |
... |
Currently not used. |
effects |
Should results for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated. |
component |
Should results for all parameters, parameters for the conditional model or the zero-inflated part of the model be returned? May be abbreviated. Only applies to brms-models. |
parameters |
Regular expression pattern that describes the parameters
that should be returned. Meta-parameters (like |
Examples
library(bayestestR)
# rstanarm models
# -----------------------------------------------
if (require("rstanarm")) {
model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)
}
# brms models
# -----------------------------------------------
if (require("brms")) {
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)
}
# BayesFactor objects
# -----------------------------------------------
if (require("BayesFactor")) {
bf <- ttestBF(x = rnorm(100, 1, 1))
describe_prior(bf)
}
[Package bayestestR version 0.14.0 Index]