View source: R/model_performance.R
| model_performance | R Documentation |
Compare one or more fitted GLMs using AIC, BIC and response-scale RMSE. The resulting table provides a concise first comparison of alternative pricing-model specifications fitted to the same portfolio outcome.
model_performance(...)
... |
One or more objects of class |
The following measures are reported:
Akaike information criterion, balancing likelihood fit and model complexity.
Bayesian information criterion, applying a stronger sample-size-dependent complexity penalty.
Root mean squared error between observed and response-scale predicted values.
Lower values are preferred within each measure, but the measures answer different questions. AIC and BIC depend on the model likelihood, whereas RMSE measures error on the response scale. Comparisons are therefore most meaningful when models use the same response, estimation records, weights and offsets.
The table does not select a pricing model automatically. In actuarial model assessment, statistical fit should be considered together with portfolio calibration, residual behaviour, coefficient stability, exposure by level and the practical interpretability of the resulting tariff structure.
The implementation is adapted from performance::model_performance().
A data frame of class "model_performance", with columns:
Name of the model object as passed to the function.
AIC value.
BIC value.
Root mean squared error.
Martin Haringa
rmse(), bootstrap_performance(), check_overdispersion(),
check_residuals()
m1 <- glm(nclaims ~ area, offset = log(exposure), family = poisson(),
data = MTPL2)
m2 <- glm(nclaims ~ area + premium, offset = log(exposure), family = poisson(),
data = MTPL2)
model_performance(m1, m2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.