Learn R Programming

tdr (version 0.14)

Stats: Error Statistics

Description

Error Statistics

Usage

tdStats(m, o,
         functions = c("mo", "mm",
                       "sdo", "sdm",
                       "mbe", "mae", "rmse",
                       "nmbe", "cvmbe",
                       "nmae", "cvmae",
                       "nrmse", "cvrmse",
                       "r2", "tStone"))

applyStats(models, o, functions = c("mo", "mm", "sdo", "sdm", "mbe", "mae", "rmse", "nmbe", "cvmbe", "nmae", "cvmae", "nrmse", "cvrmse", "r2", "tStone"))

Value

A data.frame with a column for each function, and a row for each model.

Arguments

m

Numeric, vector, model values

models

Numeric, matrix, model values

o

Numeric, vector, observation values

functions

Character, name of functions to compute model errors. The package includes definitions for these functions:

  • Mean: mo, mm

  • Standard Deviation: sdo, sdm

  • Mean Bias Error: mbe

  • Mean Absolute Error: mae

  • Root Mean Square Error: rmse

  • t of Stone: tStone

  • Coefficient of determination, \(R^2\): r2

There are also functions that normalize the MBE, MAE and RMSE values. nmbe, nmae, and nrmse use the observation range as factor of normalization, while cvmbe, cvmae, and cvrmse, use the observation average to normalize.

Author

Oscar Perpiñán Lamigueiro

See Also

targetDiagram, target_diagram

Examples

Run this code
data(modelEx)

## Analyze one model
tdStats(pvModels$M01, pvObs)

## Analyze a set of models
applyStats(pvModels, pvObs)

Run the code above in your browser using DataLab