View source: R/bage_mod-functions.R
set_prior | R Documentation |
Specify a prior distribution for an intercept, a main effect, or an interaction.
set_prior(mod, formula)
mod |
A |
formula |
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.
A modified bage_mod
object.
priors Current choices for prior distributions
is_fitted()
Test whether a model is fitted
set_disp()
Specify prior for dispersion
mod <- mod_pois(injuries ~ age + year,
data = nzl_injuries,
exposure = popn)
mod
mod |> set_prior(age ~ RW2())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.