ensembleData {ensembleBMA}R Documentation

Creates an ensembleData object.

Description

Creates a ensembleData object.

Usage

ensembleData( forecasts, observations, dates,  ..., na.action = "remove", 
              missingValues = NULL,  labels = NULL)

Arguments

forecasts A matrix with columns corresponding to forecasts from individual members of an ensemble and rows corresponding to forecasts for the same date.
observations Vector of observed weather conditions corresponding to the forecast values.
dates Vector of dates corresponding to the forecasts and observations. This must be in integer or ordered factor form. If a factor, it must sort in chronological order.
... A named list of saditional attributes such as latitude, longitude, station name, station type.
na.action A character string indicating how missing values handled. The default is "remove" means that data items with missing values in either forecasts, observations, or dates are removed from the data. If set to NULL, no missing values are removed.
missingValues One or more numeric codes used to indicate missing values in the data. These will be replaced by NA in the output if na.action = NULL. If not supplied, it is assumed that missing values are designated by NA.
labels A character vector labeling the observations, forecasts, and dates. The default is to take the names from the observations, forecasts, or dates in that order.

Details

Although the input dates may not be consecutive, the dates of an ensembleData object are consecutive integers giving the order of the levels of the dates input if it were represented as a factor.
Methods for ensembleData objects include ensembleSize, ensembleForecasts, ensembleVerifObs, and ensembleDates.
Subsetting is possible, but in the case of columns it applies on to the ensemble forecasts.

Value

An ensembleData object, incorporating forecasts and observations with the associated integer dates.

See Also

ensembleBMA, ensembleBMAgamma0, ensembleBMAnormal

Examples


 data(slp)

 slpData <- ensembleData(forecasts = slp[c("AVN","GEM","ETA","NGM","NOGAPS")],
                         observations = slp$obs, dates = slp$date)

## Not run: 
 slpFit <- ensembleBMAnormal( slpData)
## End(Not run)
  data(prcp)

  prcpData <- ensembleData( dates = prcp$date, observations = prcp$obs,
                          forecasts = prcp[,c("CENT","AVN","CMCG","ETA",
                                      "GASP","JMA","NGPS","TCWB","UKMO")])

## Not run: 
  prcpFit <- ensembleBMAgamma0(prcpData)
## End(Not run)


[Package ensembleBMA version 2.0 Index]