set_prior {bage} | R Documentation |
Specify Prior for Model Term
Description
Specify a prior distribution for an intercept, a main effect, or an interaction.
Usage
set_prior(mod, formula)
Arguments
mod |
A |
formula |
A formula giving the term and a function for creating a prior. |
Details
If set_prior()
is applied to
a fitted model, it 'unfits'
the model, deleting existing estimates.
Value
A modified bage_mod
object.
See Also
-
priors Current choices for prior distributions
-
is_fitted()
Test whether a model is fitted -
set_disp()
Specify prior for dispersion
Examples
mod <- mod_pois(injuries ~ age + year,
data = nzl_injuries,
exposure = popn)
mod
mod |> set_prior(age ~ RW2())
[Package bage version 0.9.0 Index]