set.seed(0)
## specify model
mod <- mod_pois(injuries ~ age + sex + year,
data = nzl_injuries,
exposure = popn)
## extract prior distribution
## of hyper-parameters
mod |>
components()
## fit model
mod <- mod |>
fit()
## extract posterior distribution
## of hyper-parameters
mod |>
components()
## fit normal model
mod <- mod_norm(value ~ age * diag + year,
data = nld_expenditure,
weights = 1) |>
fit()
## dispersion (= standard deviation in normal model)
## on the transformed scale
mod |>
components() |>
subset(component == "disp")
## disperson on the original scale
mod |>
components(original_scale = TRUE) |>
subset(component == "disp")
Run the code above in your browser using DataLab