restrict_coef() is deprecated as of version 0.9.0. Use
add_restriction() instead.
prepare_refinement(model) |>
add_restriction(...) |>
refit()Arguments
- model
A fitted model object.
- restrictions
data.frame with exactly two columns.
- allow_new_levels
Logical. If
TRUE(default), restrictions may include tariff levels that were not observed when the model was fitted. Seeadd_restriction().- allow_new_risk_factors
Logical. Whether a fixed tariff factor that is available in the model data but absent from the fitted model may be added. The default is
TRUEto preserve the historical behaviour ofrestrict_coef(). New code usingadd_restriction()requires an explicit opt-in because its default isFALSE.
Value
A rating_refinement object containing the restriction step. Call
refit() to apply the restriction and return the refined GLM. New code
should use prepare_refinement() followed by add_restriction() directly.
