generateRef: Generate Probabilistic Climatological Ensemble Forecast from...

Description Usage Arguments Value Cross-validation Split sample Forward Subsetting

View source: R/generateRef.R

Description

To generate reference ensemble forecasts for forecast evaluation based on the available observations, indRef implements the out-of-sample or in-sample protocol to be used and generateRef produces the corresponding ensemble forecast given the actual observations.

Usage

1
2
3
4
indRef(nfcst, type = c("none", "forward", "crossval", "block"),
  indices = 1:nfcst, blocklength = 1)

generateRef(obs, ind)

Arguments

nfcst

number of forecast instances to be produce

type

type of out-of-sample protocol to be applied (see below)

indices

Subset of the observations / forecast times to be used for reference forecasts

blocklength

for cross-validation and split-sample

obs

vector of observations

ind

list or matrix of dimension (n x nref) of indices of the observations to be used for each forecast instance

Value

ind

A list of indices to be used for each forecast from 1 to nfcst

Cross-validation

Leave-one-out and leave-n-out cross-validation reference forecasts can be produced by setting type = "crossval". By default, the blocklength is set to 1, but moving blocks of length n can be specified by setting blocklength = n.

Split sample

In contrast to type="crossval", type="block" is used for split-sample validation with non-overlapping blocks of length blocklength retained for validation.

Forward

Correspondingly, reference forecasts that are only based on past (future) observations can be produced using type = "forward". For this, the first half of the reference forecasts only uses future information, i.e. observations 2:n for forecast 1, 3:n for 2 and so forth. The second half of the reference forecasts use only past observations, i.e. observations 1:(n-1) for forecast n, 1:(n-2) for n-1, etc.

Subsetting

In combination with the above, a subset of the observations can be specified for use as reference forecasts by providing the explicit indices of the observations to be used via indices=1:k. In combination with the forward method, all observations in indices will be used to construct the reference forecast for forecasts not included in indices (i.e. if nfcst > max(indices)).


easyVerification documentation built on Dec. 4, 2017, 5:04 p.m.