# Cummulative Distribution Function for ensemble forcasting models

### Description

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

### Usage

1 | ```
cdf( fit, ensembleData, values, dates = NULL, ...)
``` |

### Arguments

`fit` |
A model fit to ensemble forecasting data. |

`ensembleData` |
An |

`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 |

`...` |
Included for generic function compatibility. |

### Details

This method is generic, and can be applied to any ensemble forecasting
model.

Note the model may have been applied to a power transformation of the data,
but that information is included in the input `fit`

, and
the output is transformed appropriately.

### Value

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

### References

A. E. Raftery, T. Gneiting, F. Balabdaoui and M. Polakowski,
Using Bayesian model averaging to calibrate forecast ensembles,
*Monthly Weather Review 133:1155–1174, 2005*.

J. M. Sloughter, A. E. Raftery, T. Gneiting and C. Fraley,
Probabilistic quantitative precipitation forecasting
using Bayesian model averaging,
*Monthly Weather Review 135:3209–3220, 2007*.

C. Fraley, A. E. Raftery, T. Gneiting and J. M. Sloughter,
`ensembleBMA`

: An `R`

Package for Probabilistic Forecasting
using Ensemble and Bayesian Model Averaging,
Technical Report No. 516R, Department of Statistics, University of
Washington, 2007 (revised 2010).

C. Fraley, A. E. Raftery, T. Gneiting,
Calibrating Multi-Model Forecast Ensembles
with Exchangeable and Missing Members using Bayesian Model Averaging,
*Monthly Weather Review 138:190–202, 2010*.

J. M. Sloughter, T. Gneiting and A. E. Raftery,
Probabilistic wind speed forecasting
using ensembles and Bayesian model averaging,
*Journal of the American Statistical Association, 105:25–35, 2010*.

### See Also

`ensembleBMA`

,
`fitBMA`

,
`quantileForecast`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ```
data(ensBMAtest)
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")
## Not run: # R check
tempTestFit <- ensembleBMAnormal( tempTestData, trainingDays = 30)
## End(Not run)
# for quick run only; use more training days for forecasting
tempTestFit <- ensembleBMAnormal( tempTestData[1:20,], trainingDays = 8)
tempTestForc <- quantileForecast( tempTestFit, tempTestData)
range(tempTestForc)
tempTestCDF <- cdf( tempTestFit, tempTestData,
values = seq(from=277, to=282, by = 1))
tempTestCDF
``` |