View source: R/model_performance.R
| rmse | R Documentation |
Computes the root mean squared error (RMSE) for a fitted model, defined as the square root of the mean of squared differences between predictions and observed values.
rmse(x, data = NULL)
x |
A fitted model object (e.g. of class |
data |
A data frame containing the variables used in the model. Required
if not already stored in |
The RMSE indicates the absolute fit of the model to the data. It can be interpreted as the standard deviation of the unexplained variance, and is expressed in the same units as the response variable. Lower values indicate better model fit.
A numeric value: the root mean squared error.
Martin Haringa
x <- glm(nclaims ~ area, offset = log(exposure),
family = poisson(), data = MTPL2)
rmse(x, MTPL2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.