cdf {ensembleMOS}R Documentation

Cummulative distribution function for ensemble forcasting models

Description

Computes the cumulative distribution function (CDF) of an ensemble forecasting model at observation locations.

Usage

cdf(fit, ensembleData, values, dates = NULL, ...)

Arguments

fit

A model fit to ensemble forecasting data, obtained using fitMOS or ensembleMOS.

ensembleData

An ensembleData object that includes ensemble forecasts, verification observations and possibly dates. Missing values (indicated by NA) are allowed. This need not be the data used for the model fit, although it must include the same ensemble members.

values

The vector of desired values at which the CDF of the ensemble forecasting model is to be evaluated.

dates

The dates for which the CDF will be computed. These dates must be consistent with fit and ensembleData. The default is to use all of the dates in fit. The dates are ignored if fit originates from fitMOS, which also ignores date information.

...

Included for generic function compatibility.

Details

This method is generic, and can be applied to any ensemble forecasting model obtained using fitMOS or ensembleMOS.

For the EMOS models that allow for point masses at 0, i.e. the censored and shifted gamma, and the censored generalized extreme value distribution EMOS model, the function contains an addition logical argument randomizeATzero that specifies whether the value of the CDF at zero should be chosen randomly from the interval between 0 and the value of the CDF at zero. The default choice if FALSE, setting randomizeATzero = TRUE is practical for computing randomized PIT values.

Value

A matrix of probabilities corresponding to the CDF at the desired values. Useful for determining propability of freezing, precipitation, etc.

References

T. Gneiting, A. E. Raftery, A. H. Westveld and T. Goldman, Calibrated probabilistic forecasting using ensemble model output statistics and minimum CRPS estimation. Monthly Weather Review 133:1098–1118, 2005.

See Also

ensembleMOS, fitMOS, quantileForecast

Examples

data("ensBMAtest", package = "ensembleBMA")

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

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

tempTestFit <- ensembleMOS(tempTestData, trainingDays = 25, 
                           model = "normal",
                           dates = "2008010100")

tempTestCDF <- cdf(tempTestFit, tempTestData,
                   values = seq(from=277, to=282, by = 1))

tempTestCDF

[Package ensembleMOS version 0.8.2 Index]