model-quality: Compute model quality for a given dataset

Description Usage Arguments Examples

Description

rmse is the root-mean-squared-error, mae is the mean absolute error, qae is quantiles of absolute error. These can both be interpreted on the scale of the response; mae is less sensitive to outliers. rsquare is the variance of the predictions divided by by the variance of the response.

Usage

1
2
3
4
5
6
7
rmse(model, data)

mae(model, data)

rsquare(model, data)

qae(model, data, probs = c(0.05, 0.25, 0.5, 0.75, 0.95))

Arguments

model

A model

data

The dataset

probs

Numeric vector of probabilities

Examples

1
2
3
4
5
mod <- lm(mpg ~ wt, data = mtcars)
rmse(mod, mtcars)
rsquare(mod, mtcars)
mae(mod, mtcars)
qae(mod, mtcars)

Example output

[1] 2.949163
[1] 0.7528328
[1] 2.340642
       5%       25%       50%       75%       95% 
0.1784985 1.0005640 2.0946199 3.2696108 6.1794815 

modelr documentation built on July 25, 2017, 1:01 a.m.