This function combines model specific prior distributions from
epidist_model_prior(), family specific prior distributions from
epidist_family_prior(), and user provided prior distributions into a single
set of custom priors. Each element overwrites previous elements, such that
user provided prior distributions have the highest priority. If a user prior
distribution is provided which is not included in the model, a warning will
be shown.
Arguments
- data
An object with class corresponding to an implemented model.
- family
A description of the response distribution and link function to be used in the model created using
epidist_family().- formula
A symbolic description of the model to be fitted created using
epidist_formula().- prior
One or more
brmspriorobjects created bybrms::set_prior()or related functions. These priors are passed toepidist_prior()in thepriorargument. Some models have default priors that are automatically added (seeepidist_model_prior()). These can be merged with user-provided priors using themerge_priorsargument.- merge
If
TRUEthen merge new priors with existing ones, ifFALSEonly use new priors. Defaults toTRUE. This may be useful if the built in approaches for merging priors are not flexible enough for a particular use case.- enforce_presence
If
TRUEthen only allow user priors that match existing default priors. IfFALSEthen allow user priors that are not present in the default set. Defaults toFALSE.
Details
Note that the matching of priors is imperfect as it does not use brms' internal prior matching functionality. For example, it cannot distinguish between a prior for all coefficients (class = "b") and a prior for a specific coefficient (class = "b" and coef specified).
See also
Other prior:
epidist_family_prior(),
epidist_family_prior.default(),
epidist_family_prior.lognormal(),
epidist_model_prior(),
epidist_model_prior.default()
