## rename time variable to something unusual
injuries2 <- nzl_injuries
injuries2$calendar_year <- injuries2$year
## mod_pois does not recognize time variable
mod <- mod_pois(injuries ~ age * ethnicity + calendar_year,
data = injuries2,
exposure = popn)
mod
## so we set the time variable explicitly
## (which, as a side effect, changes the prior on
## the time main effect)
mod |>
set_var_time(name = "calendar_year")
Run the code above in your browser using DataLab