Learn R Programming

envalysis (version 0.3.3)

rmse: Root mean square error

Description

This function computes the root mean square error (RMSE) of the two vectors obs and sim. rel = FALSE returns the absolute RMSE, rel = TRUE the relative one. If na.rm is TRUE, missing values are omitted before the computation proceeds.

Usage

rmse(obs, sim, rel = F, na.rm = T)

Arguments

obs

a numeric vector containing observed values.

sim

a numeric vector containing simulated values.

rel

logical. If TRUE, the relative RMSE is calculated, if FALSE the absolute RMSE is returned.

na.rm

logical. Should missing values be removed?

Examples

Run this code
# NOT RUN {
rmse(c(0.12,0.59,NA), c(0.15,0.63,1.2))

# }

Run the code above in your browser using DataLab