
Build rating tables from fitted pricing models
Source:R/model_rating_table.R, R/model_rating_table_deprecated.R
rating_table.Rdrating_table() extracts model coefficients in tariff-table form. It adds
the reference level for factor variables, can exponentiate GLM coefficients
into relativities, and can add exposure by risk-factor level when the model
data are available.
rating_table() is intended for fitted models:
plain
glmobjectsmodels obtained after
refit()models obtained after
refit_glm()
For pre-refit objects (rating_refinement, restricted, smooth) use
print(), summary() and autoplot() instead.
Usage
rating_table(
...,
model_data = NULL,
exposure = TRUE,
exposure_output = NULL,
exponentiate = TRUE,
significance = FALSE,
round_exposure = 0,
exposure_name = NULL,
signif_stars = NULL
)
rating_factors(
...,
model_data = NULL,
exposure = TRUE,
exposure_name = NULL,
signif_stars = FALSE,
exponentiate = TRUE,
round_exposure = 0
)Arguments
- ...
glm object(s) produced by
glm(),refit()orrefit_glm()- model_data
Optional data.frame used to create the model(s). If
NULL, the function tries to usemodel$datafor each supplied model.- exposure
Logical or character. If
TRUE(default), exposure is added if it can be inferred from the model. IfFALSE, no exposure is added. If a character string is supplied, it is interpreted as the exposure column name.- exposure_output
Optional name for the exposure column in the output. If
NULL, the original exposure column name is used.- exponentiate
logical indicating whether or not to exponentiate the coefficient estimates. Defaults to TRUE.
- significance
Logical; if
TRUE, show significance stars for p-values.- round_exposure
number of digits for exposure (defaults to 0)
- exposure_name
Deprecated. Use
exposure_outputinstead.- signif_stars
Deprecated. Use
significanceinstead.