Learn R Programming

brms (version 2.22.0)

default_prior: Default priors for Bayesian models

Description

default_prior is a generic function that can be used to get default priors for Bayesian models. Its original use is within the brms package, but new methods for use with objects from other packages can be registered to the same generic.

Usage

default_prior(object, ...)

get_prior(formula, ...)

Value

Usually, a brmsprior object. See

default_prior.default for more details.

Arguments

object

An object whose class will determine which method will be used. A symbolic description of the model to be fitted.

...

Further arguments passed to the specific method.

formula

Synonym of object for use in get_prior.

Details

See default_prior.default for the default method applied for brms models. You can view the available methods by typing methods(default_prior).

See Also

set_prior, default_prior.default

Examples

Run this code
## get all parameters and parameters classes to define priors on
(prior <- default_prior(count ~ zAge + zBase * Trt + (1|patient) + (1|obs),
                        data = epilepsy, family = poisson()))

Run the code above in your browser using DataLab