Obtain the default priors for a Bayesian multilevel measurement
model, as well as information for which parameters priors can be specified.
Given the model
, the data
and the formula
for the model, this
function will return the default priors that would be used to estimate the
model. Additionally, it will return all model parameters that have no prior
specified (flat priors). This can help to get an idea about which priors
need to be specified and also know which priors were used if no
user-specified priors were passed to the bmm()
function.
The default priors in bmm
tend to be more informative than the default
priors in brms
, as we use domain knowledge to specify the priors.
# S3 method for bmmformula
default_prior(object, data, model, formula = object, ...)
A data.frame with columns specifying the prior
, the class
, the
coef
and group
for each of the priors specified. Separate rows contain
the information on the parameters (or parameter classes) for which priors
can be specified.
A bmmformula
object
An object of class data.frame, containing data of all variables
used in the model. The names of the variables must match the variable names
passed to the bmmodel
object for required argurments.
A description of the model to be fitted. This is a call to a
bmmodel
such as mixture3p()
function. Every model function has a
number of required arguments which need to be specified within the function
call. Call supported_models()
to see the list of supported models and
their required arguments
An object of class bmmformula
. A symbolic description of the
model to be fitted.
Further arguments passed to brms::default_prior()
supported_models()
, brms::default_prior()
default_prior(bmf(c ~ 1, kappa ~ 1),
data = oberauer_lin_2017,
model = sdm(resp_error = "dev_rad")
)
Run the code above in your browser using DataLab