Learn R Programming

ensembleMOS (version 0.8.2)

brierScore: Brier Score

Description

Computes the Brier score for the probability of exceedance of precipitation threshold values for univariate ensemble forecasting models.

Usage

brierScore(fit, ensembleData, thresholds, dates=NULL, …)

Arguments

fit

A model fit to ensemble forecasting data, obtained using fitMOS or ensembleMOS. Only available for the censored and shifted gamma, and the censored generalized extreme value distribution model.

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.

thresholds

Threshold values for which the probability of exceedance is evaluated, set to 0 to evaluate probability of precipitation forecasts.

dates

The dates for which the CRPS 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.

Value

BScores is a vector giving the Brier scores for each instance in the data.

Details

Note that the Brier scores are only available for EMOS models suitable for precipitation accumulation, i.e. the censored and shifted gamma, and the censored generalized extreme value distribution EMOS model.

References

T. Gneiting and A. E. Raftery, Strictly proper scoring rules, prediction and estimation, Journal of the American Statistical Association 102:359--378, 2007.

See Also

ensembleMOS, fitMOS

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")

prcpTestFitCSG0 <- ensembleMOScsg0(prcpTestData, trainingDays = 25,
                                   dates = "2008010100")

brierScore(prcpTestFitCSG0, ensembleData = prcpTestData, 
           thresholds = 0)
# }

Run the code above in your browser using DataLab