restrict_coef() is deprecated as of version 0.9.0. Use
add_restriction() instead.
prepare_refinement(model) |>
add_restriction(...) |>
refit()
restrict_coef(
model,
restrictions,
allow_new_levels = TRUE,
allow_new_risk_factors = TRUE
)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.
A fitted model object.
data.frame with exactly two columns.
Logical. If TRUE (default), restrictions may
include tariff levels that were not observed when the model was fitted.
See add_restriction().
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 TRUE to preserve the historical behaviour of
restrict_coef(). New code using add_restriction() requires an explicit
opt-in because its default is FALSE.
add_restriction(), prepare_refinement(), refit()