rmse: A Root-Mean-Square Error function

Description Usage Arguments Value Examples

Description

This function allows you to quickly calculate the RMSE of a error vector.

Usage

1
rmse(error)

Arguments

error

Vector containing the difference between model predictions and true values.

Value

rms

Root Mean Square Error.

Examples

1
2
3
4
model <- lm(mpg~., data = mtcars)
predictions <- predict(model, mtcars)
error <- mtcars$mpg - predictions
rms <- rmse(error)

Dynge/r_dynge documentation built on July 1, 2019, 11:21 p.m.