Learn R Programming

ensembleMOS (version 0.8.2)

fitMOScsg0: Censored and shifted gamma EMOS modeling

Description

Fits a censored and shifted gamma EMOS model to a given training set.

Usage

fitMOScsg0(ensembleData, control = controlMOScsg0(),
           exchangeable = NULL)

Arguments

ensembleData

An ensembleData object including ensemble forecasts and verification observations. Missing values (indicated by NA) are allowed. Dates are ignored if they are included. This is the training set for the model.

control

A list of control values for the fitting functions specified via the function controlMOScsg0. For details and default values, see controlMOScsg0.

exchangeable

An optional numeric or character vector or factor indicating groups of ensemble members that are exchangeable (indistinguishable). The models have equal EMOS coefficients within each group. If supplied, this argument will override any specification of exchangeability in ensembleData.

Value

A list with the following output components:

training

A list containing information on the training length and lag and the number of instances used for training for each modeling date.

a

A vector of fitted EMOS intercept parameters for each date.

B

A matrix of fitted EMOS coefficients for each date.

c,d

The fitted parameters for the variance, see details.

q

Fitted shift parameter, see details.

Details

Given an ensemble of size \(m\): \(X_1, \ldots , X_m\), the following shifted gamma model left-censored at 0 is fit by ensembleMOScsg0:

$$Y ~ Gamma_0(\kappa,\theta,q)$$

where \(Gamma_0\) denotes the shifted gamma distribution left-censored at zero, with shape \(\kappa\), scale \(\theta\) and shift \(q\). The model is parametrized such that the mean \(\kappa\theta\) is a linear function \(a + b_1 X_1 + \ldots + b_m X_m\) of the ensemble forecats, and the variance \(\kappa\theta^2\) is a linear function of the ensemble mean \(c+d \overline{f}\), see Baran and Nemoda (2016) for details.

B is a vector of fitted regression coefficients: \(b_1, \ldots, b_m\). Specifically, \(a, b_1,\ldots, b_m, c, d\) are fitted to optimize control$scoringRule over the specified training period using optim with method = control$optimRule.

References

M. Scheuerer and T. M. Hamill, Statistical post-processing of ensemble precipitation forecasts by fitting censored, shifted gamma distributions. Monthly Weather Review 143:4578--4596, 2015.

S. Baran and D. Nemoda, Censored and shifted gamma distribution based EMOS model for probabilistic quantitative precipitation forecasting. Environmetrics 27:280--292, 2016.

See Also

controlMOScsg0, ensembleMOScsg0,

Examples

Run this code
# NOT RUN {
data("ensBMAtest", package = "ensembleBMA")

ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")

obs <- paste("PCP24","obs", sep = ".")
ens <- paste("PCP24", ensMemNames, sep = ".")
prcpTestData <- ensembleData(forecasts = ensBMAtest[,ens],
                             dates = ensBMAtest[,"vdate"],
                             observations = ensBMAtest[,obs],
                             station = ensBMAtest[,"station"],
                             forecastHour = 48,
                             initializationTime = "00")

prcpTrain <- trainingData(prcpTestData, trainingDays = 30,
                             date = "2008010100")

prcpTestFit <- fitMOScsg0(prcpTrain)
# }

Run the code above in your browser using DataLab