Skip to contents

Reset a model, deleting all estimates.

Usage

unfit(mod)

Arguments

mod

A fitted object of class "bage_mod", object, created through a call to mod_pois(), mod_binom(), or mod_norm().

Value

An unfitted version of mod.

See also

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