Processing math: 100%
Skip to contents

Compute the Root Mean Square Error of observed and predicted data.

Usage

rmse(obs, pred, use = "everything")

Arguments

obs

A numeric vector, data.frame or data.table with observed data.

pred

A numeric vector, data.frame or data.table with predicted (model) data.

use

An optional character string giving a method for computing RMSE in the presence of missing values. This must be one of the strings "everything" or "complete.obs".

Value

The RMSE of input data as a numeric.

Details

The function computes the Root Mean Square error according to the following formula:

RMSE=¯(OP)2

Examples

if (FALSE) {

validationData[, .(rmse = rmse(obs, mod, use = "complete.obs"))]
}