Reset a model, deleting all estimates.
Arguments
- mod
A fitted object of class
"bage_mod"
, object, created through a call tomod_pois()
,mod_binom()
, ormod_norm()
.
See also
fit()
Fit a modelmod_pois()
,mod_binom()
,mod_norm()
Specify a modelFunctions such as
set_prior()
,set_disp()
andset_var_age()
unfit models as side effects.
Examples
## create a model, which starts out unfitted
mod <- mod_pois(injuries ~ age + sex + year,
data = nzl_injuries,
exposure = popn)
is_fitted(mod)
#> [1] FALSE
## calling 'fit' produces a fitted version
mod <- fit(mod)
is_fitted(mod)
#> [1] TRUE
## calling 'unfit' resets the model
mod <- unfit(mod)
is_fitted(mod)
#> [1] FALSE