ensembleData | R Documentation |

Creates an `ensembleData`

object including ensemble forecasts along
with dates and (optionally) observations. Other descriptive information
such as latitude, longitude, and station type may be included as well.

ensembleData( forecasts, dates = NULL, observations = NULL, ..., forecastHour, initializationTime, startupSpeed = NULL, exchangeable = NULL)

`forecasts` |
A matrix or array (for vector quantities) with columns corresponding to forecasts from individual members of an ensemble and rows corresponding to forecasts for the same date. |

`dates` |
A numeric or character vector or factor specifying the valid dates
for the forecasts. If numeric, it is interpreted as a Julian date
if it has an |

`observations` |
Optional vector (or matrix for vector quantities) of observed weather conditions corresponding to the forecasts. Must be supplied if the data is to be used for BMA modeling. |

`...` |
A named list of additional attributes such as latitude, longitude, and startupSpeed for wind speed. |

`forecastHour` |
A number giving the |

`initializationTime` |
A number or character string giving the initialization time. |

`startupSpeed` |
A numeric value specifying a value below which the anemometer readings for wind speed will be recorded as zero. This value is used for all stations when the startup speed is not explicity specified as part of the data. |

`exchangeable` |
A numeric or character vector or factor indicating groups of ensemble members that are exchangeable (indistinguishable). The models fit will have equal weights and parameters within each group. The same names/labels should be used as for the forecasts. The default assumes that none of the ensemble members are exhangeable. |

For use with batch processing modeling functions (`ensembleBMA`

etc), instances `ensembleData`

object are assumed
the same forecast hour and initialization time, which should be
specified as part of the object.

Methods for `ensembleData`

objects include `ensembleSize`

,
`ensembleForecasts`

, `ensembleValidDates`

.

Subsetting is possible, but in the case of columns it applies only to
the ensemble forecasts.

For vector wind computations, the velocity should be in the first
column and the direction in the second.

An `ensembleData`

object, incorporating forecasts and
(optionally) observations with the associated valid dates.

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

: An `R`

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

`ensembleBMA`

,
`ensembleBMAgamma`

,
`ensembleBMAgamma0`

,
`ensembleBMAnormal`

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) 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") ## Not run: # R check prcpTestFit <- ensembleBMAgamma0( prcpTestData, trainingDays = 30) ## End(Not run) obs <- paste("MAXWSP10","obs", sep = ".") ens <- paste("MAXWSP10", ensMemNames, sep = ".") winsTestData <- ensembleData( forecasts = ensBMAtest[,ens], dates = ensBMAtest[,"vdate"], observations = ensBMAtest[,obs], station = ensBMAtest[,"station"], forecastHour = 48, initializationTime = "00") ## Not run: # R check winsTestFit <- ensembleBMAgamma(winsTestData, trainingDays = 30) ## End(Not run)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.