powered by
Specify the mean of prior for the dispersion parameter (in Poisson and binomial models) or the standard deviation parameter (in normal models.)
set_disp(mod, mean)
A bage_mod object
bage_mod
An object of class "bage_mod", created with mod_pois(), mod_binom(), or mod_norm().
"bage_mod"
mod_pois()
mod_binom()
mod_norm()
Mean value for the exponential prior. In Poisson and binomial models, can be set to 0.
The dispersion or mean parameter has an exponential distribution with mean \(\mu\),
$$p(\xi) = \frac{1}{\mu}\exp\left(\frac{-\xi}{\mu}\right).$$
In Poisson and binomial models, mean can be set to 0, implying that the dispersion term is also 0. In normal models, mean must be non-negative.
mean
0
If set_disp() is applied to a fitted model, it 'unfits' the model, deleting existing estimates.
set_disp()
mod_pois(), mod_binom(), mod_norm() Specify a model for rates, probabilities, or means
set_prior() Specify prior for a term
set_prior()
set_n_draw() Specify the number of draws
set_n_draw()
is_fitted() Test whether a model is fitted
is_fitted()
mod <- mod_pois(injuries ~ age:sex + ethnicity + year, data = nzl_injuries, exposure = popn) mod mod |> set_disp(mean = 0.1) mod |> set_disp(mean = 0)
Run the code above in your browser using DataLab