View source: R/model_performance.R
| model_performance | R Documentation |
Computes model performance indices for one or more fitted GLMs.
model_performance(...)
... |
One or more objects of class |
The following indices are reported:
Akaike's Information Criterion.
Bayesian Information Criterion.
Root mean squared error, computed from observed and predicted values.
This function 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
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.