Three summaries are immediately interpretible on the scale of the response variable:
rmse()
is the root-mean-squared-errormae()
is the mean absolute errorqae()
is quantiles of absolute error.
Other summaries have varying scales and interpretations:
mape()
mean absolute percentage error.rsae()
is the relative sum of absolute errors.mse()
is the mean-squared-error.rsquare()
is the variance of the predictions divided by the variance of the response.
Usage
mse(model, data)
rmse(model, data)
mae(model, data)
rsquare(model, data)
qae(model, data, probs = c(0.05, 0.25, 0.5, 0.75, 0.95))
mape(model, data)
rsae(model, data)
Examples
mod <- lm(mpg ~ wt, data = mtcars)
mse(mod, mtcars)
#> [1] 8.697561
rmse(mod, mtcars)
#> [1] 2.949163
rsquare(mod, mtcars)
#> [1] 0.7528328
mae(mod, mtcars)
#> [1] 2.340642
qae(mod, mtcars)
#> 5% 25% 50% 75% 95%
#> 0.1784985 1.0005640 2.0946199 3.2696108 6.1794815
mape(mod, mtcars)
#> [1] 0.1260733
rsae(mod, mtcars)
#> [1] 0.1165042