Learn R Programming

insurancerating (version 0.7.5)

rmse: Root Mean Squared Error

Description

Compute root mean squared error.

Usage

rmse(object, data)

Value

numeric value

Arguments

object

fitted model

data

data.frame (defaults to NULL)

Author

Martin Haringa

Details

The RMSE is the square root of the average of squared differences between prediction and actual observation and indicates the absolute fit of the model to the data. It can be interpreted as the standard deviation of the unexplained variance, and is in the same units as the response variable. Lower values indicate better model fit.

Examples

Run this code
x <- glm(nclaims ~ area, offset = log(exposure), family = poisson(),
 data = MTPL2)
rmse(x, MTPL2)

Run the code above in your browser using DataLab