Learn R Programming

qualV (version 0.2-5)

quantV: Quantitative Validation Methods

Description

Different methods for calculating the difference between two vectors.

Usage

generalME(o, p,
          ignore   = c("raw", "centered", "scaled", "ordered"),
          geometry = c("real", "logarithmic", "geometric", "ordinal"),
          measure  = c("mad", "var", "sd"),
          type     = c("dissimilarity", "normalized", "similarity",
                       "reference", "formula", "name", "function"),
                       method = NULL)
   MAE(o, p, type = "dissimilarity")
  MAPE(o, p, type = "dissimilarity")
   MSE(o, p, type = "dissimilarity")

RMSE(o, p, type = "dissimilarity") CMAE(o, p, type = "dissimilarity") CMSE(o, p, type = "dissimilarity") RCMSE(o, p, type = "dissimilarity") SMAE(o, p, type = "dissimilarity") SMSE(o, p, type = "dissimilarity") RSMSE(o, p, type = "dissimilarity") MALE(o, p, type = "dissimilarity") MAGE(o, p, type = "dissimilarity") RMSLE(o, p, type = "dissimilarity") RMSGE(o, p, type = "dissimilarity")

SMALE(o, p, type = "dissimilarity") SMAGE(o, p, type = "dissimilarity") SMSLE(o, p, type = "dissimilarity")

RSMSLE(o, p, type = "dissimilarity") RSMSGE(o, p, type = "dissimilarity")

MAOE(o, p, type = "dissimilarity") MSOE(o, p, type = "dissimilarity") RMSOE(o, p, type = "dissimilarity")

Arguments

o
vector of observed values
p
vector of corresponding predicted values
type
one of "dissimilarity", "normalized", "similarity", "reference", "formula", for the dissimilarity measure, the normalized dissimilarity measure, the similarity measure, or the
ignore
specifies which aspects should be ignored: "raw" compares original values, "centered" removes differences in mean, "scaled" ignores scaling, "ordered" indicates the use of the ordinal geometr
geometry
indicating the geometry to be used for the data and the output, "real" corresponds to arithmetic differences and means, "logarithmic" to handling relative data on a logarithmic scale, "geometric" to geome
measure
indicates how distances should be measured: as mean absolute distances like in MAD, as squared distances like in a variance, or as the root of mean squared distances like in sd.
method
optionally the function to be used can specified directly as a function or as a string.

Value

  • generalMEselects the best deviance measure according to the description given in the parameters. It has the two additional possibilities of name and function in the type parameter.
  • MAEmean absolute error $\frac1n$
  • MAPEmean absolute percentage error
  • MSEmean squared error
  • RMSEroot mean squared error
  • CMAEcentered mean absolute error
  • CMSEcentered mean squared error
  • RCMSEroot centered mean squared error
  • SMAEscaled mean absolute error
  • SMSEscaled mean squared error
  • RSMSEroot scaled mean squared error
  • MALEmean absolute logarithmic error
  • MAGEmean absolute geometric error
  • MSLEmean squared logarithmic error
  • MSGEmean squared geometric error
  • RMSLEroot mean squared logarithmic error
  • SMALEscaled mean absolute logarithmic error
  • SMAGEscaled mean absolute relative error
  • SMSLEscaled mean squared logarithmic error
  • RSMSLEroot scaled mean squared logarithmic error
  • RSMSGEroot scaled mean squared geometric error
  • MAOEmean absolute ordinal error
  • MSOEmean squared ordinal error
  • RMSOEroot mean squared ordinal error

Details

These comparison criteria are designed for a semiquantitative comparison of observed values o with predicted values p to validate the performance of the prediction. The general naming convention follows the grammar scheme [R][C|S]M[S|A][L|G|O]E corresponding to [Root] [Centered | Scaled] Mean [Squared | Absolute] [Logarithmic, Geometric, Ordinal] Error [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

The mean errors for squared error measures are based on the number of degrees of freedom of the residuals.

References

Mayer, D. G. and Butler, D. G. (1993) Statistical Validation. Ecological Modelling, 68, 21-32. Jachner, S., K.G. v.d. Boogaart, T. Petzoldt (2007) Statistical methods for the qualitative assessment of dynamic models with time delay (R package qualV), Journal of Statistical Software, 22(8), 1--30. URL http://www.jstatsoft.org/v22/i08/.

See Also

EF, GRI, compareME

Examples

Run this code
data(phyto)
obsb <- na.omit(obs[match(sim$t, obs$t), ])
simb <- sim[na.omit(match(obs$t, sim$t)), ]
o <- obsb$y
p <- simb$y

generalME(o, p, ignore = "raw", geometry = "real")

   MAE(o, p)
  MAPE(o, p)
   MSE(o, p)
  RMSE(o, p)
  CMAE(o, p)
  CMSE(o, p)
 RCMSE(o, p)
  SMAE(o, p)
  SMSE(o, p)
 RSMSE(o, p)
  MALE(o, p)
  MAGE(o, p)
 RMSLE(o, p)
 RMSGE(o, p)

 SMALE(o, p)
 SMAGE(o, p)
 SMSLE(o, p)

RSMSLE(o, p)
RSMSGE(o, p)

  MAOE(o, p)
  MSOE(o, p)
 RMSOE(o, p)
   MAE(o, p)
  MAPE(o, p)


   MSE(o, p, type = "s")
  RMSE(o, p, type = "s")
  CMAE(o, p, type = "s")
  CMSE(o, p, type = "s")
 RCMSE(o, p, type = "s")
  SMAE(o, p, type = "s")
  SMSE(o, p, type = "s")
 RSMSE(o, p, type = "s")
  MALE(o, p, type = "s")
  MAGE(o, p, type = "s")
 RMSLE(o, p, type = "s")
 RMSGE(o, p, type = "s")

 SMALE(o, p, type = "s")
 SMAGE(o, p, type = "s")
 SMSLE(o, p, type = "s")

RSMSLE(o, p, type = "s")
RSMSGE(o, p, type = "s")

  MAOE(o, p, type = "s")
  MSOE(o, p, type = "s")
 RMSOE(o, p, type = "s")

Run the code above in your browser using DataLab