veriUnwrap: Unwrap Arguments and Hand Over to Verification Function

View source: R/veriUnwrap.R

veriUnwrapR Documentation

Unwrap Arguments and Hand Over to Verification Function

Description

Decomposes input arguments into forecast, verifying observations, and reference forecast and hands these over to the function provided.

Usage

veriUnwrap(
  x,
  verifun,
  nind = c(nens = ncol(x) - 1, nref = 0, nobs = 1, nprob = 0, nthresh = 0),
  ref.ind = NULL,
  ...
)

Arguments

x

n x k + 1 matrix with n forecasts of k ensemble members plus the verifying observations

verifun

character string with function name to be executed

nind

named vector with number of ensemble members, ensemble members of reference forecasts, observations (defaults to 1), probability or absolute thresholds (see details)

ref.ind

list with specifications for the reference forecast (see details)

...

additional arguments passed on to verifun

Details

Forecast verification metrics are only computed for forecasts with non-missing verifying observation and at least one non-missing ensemble member. Metrics for all other forecasts are set to missing. For aggregate metrics (e.g. skill scores) the metric is computed over non-missing observation/forecast pairs only.

For computation of skill scores, reference forecasts can be provided. That is, the first nens columns of x contain the forecasts, the (nens + 1):(ncol(x) - 1) following columns contain the reference forecast, and the final column contains the observations. If no reference forecast is provided (i.e. ncol(x) == nens + 1), a climatological forecast is constructed from the n verifying observations.

The elements of vector nind have to be named with nens containing the number of ensemble members, nref the number of ensemble members in the reference forecast for skill scores, nobs the number of observations (only one supported), nprob the number of probability thresholds, and nthresh the number of absolute threshold for conversion of continuous forecasts to category forecasts.

ref.ind specifies the set-up of the climatological reference forecast for skill scores if no explicit reference forecast is provided (see indRef). Also, ref.ind is used to determine the baseline to estimate the percentile-based category boundaries to convert continuous forecasts to category probabilities.

Note

Out-of-sample reference forecasts are now fully supported.

See Also

veriApply


easyVerification documentation built on Aug. 15, 2023, 9:06 a.m.