powered by
Specify a prior distribution for an intercept, a main effect, or an interaction.
set_prior(mod, formula)
A modified bage_mod object.
bage_mod
A bage_mod object, created with mod_pois(), mod_binom(), or mod_norm().
mod_pois()
mod_binom()
mod_norm()
A formula giving the term and a function for creating a prior.
If set_prior() is applied to a fitted model, it 'unfits' the model, deleting existing estimates.
set_prior()
priors Current choices for prior distributions
is_fitted() Test whether a model is fitted
is_fitted()
set_disp() Specify prior for dispersion
set_disp()
mod <- mod_pois(injuries ~ age + year, data = nzl_injuries, exposure = popn) mod mod |> set_prior(age ~ RW2())
Run the code above in your browser using DataLab