bayesiandemography / bage

https://bayesiandemography.github.io/bage/
Other
2 stars 1 forks source link

better error message for set_prior #20

Closed johnrbryant closed 1 year ago

johnrbryant commented 1 year ago

Better error message when response missing in set_prior

mod <- mod_pois(deaths ~ age * sex + time,

  • data = indig,
  • exposure = popn) %>%
  • set_prior(time ~ RW2()) %>%
  • set_prior(SVD(HMD)) Error in check_format_prior_formula(formula) : Assertion on 'formula' failed: Must be a formula, not bage_prior_svd/bage_prior.
johnrbryant commented 1 year ago

New error messages notes that formula must have the form ~ .