Stats {tdr}R Documentation

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"))

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.

Value

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

Author(s)

Oscar Perpiñán Lamigueiro

See Also

targetDiagram, target_diagram

Examples

data(modelEx)

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

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

[Package tdr version 0.13 Index]