Learn R Programming

performance (version 0.12.4)

performance_mse: Mean Square Error of Linear Models

Description

Compute mean square error of linear models.

Usage

performance_mse(model, ...)

mse(model, ...)

Value

Numeric, the mean square error of model.

Arguments

model

A model.

...

Arguments passed down to lme4::bootMer() or boot::boot() for bootstrapped ICC, R2, RMSE etc.; for variance_decomposition(), arguments are passed down to brms::posterior_predict().

Details

The mean square error is the mean of the sum of squared residuals, i.e. it measures the average of the squares of the errors. Less technically speaking, the mean square error can be considered as the variance of the residuals, i.e. the variation in the outcome the model doesn't explain. Lower values (closer to zero) indicate better fit.

Examples

Run this code
data(mtcars)
m <- lm(mpg ~ hp + gear, data = mtcars)
performance_mse(m)

Run the code above in your browser using DataLab