Learn R Programming

SpecsVerification (version 0.4-1)

GenerateToyData: Generate toy data for ensemble verification.

Description

Generate synthetic ensemble and observation data, using a latent variable model. See Details.

Usage

GenerateToyData(N = 20, mu.y = 0, s.s = 7, s.eps = 6, mu.x = 0, beta = 0.2, s.eta = 8, K = 10, mu.x.ref = NA, beta.ref = NA, s.eta.ref = NA, K.ref = NA)

Arguments

N
number of forecasts and observations
mu.y
expectation value of the observations
s.s
standard deviation of the predictable signal
s.eps
standard deviation of the unpredictable noise
mu.x
expectation value of the ensemble
beta
weighting parameter of the signal in the ensemble forecasting system
s.eta
average spread of the ensemble
K
number of members of the ensemble
mu.x.ref
expectation value of the reference ensemble
beta.ref
weighting parameter of the signal in the reference ensemble forecasting system
s.eta.ref
average spread of the reference ensemble
K.ref
number of members of the reference ensemble

Value

A list with elements:"obs": N-vector of observations"ens": N*K matrix of ensemble members"ens.ref": N*K.ref matrix of reference ensemble members

Details

The function simulates data from the latent variable model:

y_t = mu_y + s_t + eps_t

x_t,r = mu_x + beta * s_t + eta_t,r

where y_t is the observation at time t, and x_t,r is the r-th ensemble member at time t. The latent variable s_t is to be understood as the "predictable signal" that is generates correlation between observations and ensemble members. If all arguments that end in ".ref" are specified, a reference ensemble is returned.

Examples

Run this code
  l <- GenerateToyData()
  with(l, EnsCrps(ens, obs))

Run the code above in your browser using DataLab