valueMeasure1D: VALUE measure calculation

View source: R/validation1D.R

valueMeasure1DR Documentation

VALUE measure calculation

Description

Atomic function to compute VALUE measures from predicted and observed indices

Usage

valueMeasure1D(
  indexObs = NULL,
  indexPrd = NULL,
  obs = NULL,
  prd = NULL,
  dates = NULL,
  measure.codes
)

Arguments

indexObs

index computed from the observations

indexPrd

index computed from the predictions

obs

A vector of observations

prd

A vector of predictions

dates

dates

measure.codes

A character vector of measure codes to be computed.

Value

A named list of output measures

Author(s)

J. Bedia

Examples

data(tmin.det)
# Some indices, like correlation, are computed upon the raw time series
# (i.e. no previous index is computed)
valueMeasure1D(indexObs = NULL,
               indexPrd = NULL,
               obs = tmin.det$obs,
               prd = tmin.det$pred,
               measure.codes = c("ts.rp", "ts.rs"))

# In some cases, the date information is required, with an error if omitted:

valueMeasure1D(indexObs = NULL,
               indexPrd = NULL,
               obs = tmin.det$obs,
               prd = tmin.det$pred,
               dates = tmin.det$dates,
               measure.codes = c("ts.rp", "ts.rs","ts.rpY"))

# However, most measures are computed upon previously calculated indices
indexObs <- valueIndex1D(ts = tmin.det$obs, index.codes = "AC1")
indexPrd <- valueIndex1D(ts = tmin.det$pred, index.codes = "AC1")
valueMeasure1D(indexObs = indexObs,
               indexPrd = indexPrd,
               measure.codes = c("bias", "biasRel","ratio"))

SantanderMetGroup/VALUE documentation built on July 8, 2023, 7:03 a.m.