Learn R Programming

ensembleBMA (version 5.1.8)

combine: Combine Compatible BMA Models

Description

Combines BMA models having the same characteristics for different dates.

Usage

combine( x, y, ...)

Value

An ensembleBMA model that merges the models from each input into a single model for the common dates.

Arguments

x

An ensembleBMA model.

y

An ensembleBMA model having the same characteristics as x except for dates.

...

Other ensembleBMA models compatible with x and y.

Details

Input models are checked for compatibility, and entries from different inputs having the same dates are eliminated. Dates are ordered chronologically and ensemble members are ordered in the order in which they occur in inout x.

References

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

See Also

ensembleBMA

Examples

Run this code
  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")

if (FALSE)  # R check
  tempTestFit12 <- ensembleBMAnormal( tempTestData, trainingDays = 30,
                   dates = c("2008010100","2008010200"))

  tempTestFit34 <- ensembleBMAnormal( tempTestData, trainingDays = 30,
                   dates = c("2008010300","2008010400"))


# for quick run only; use more training days for forecasting
  tempTestFit12 <- ensembleBMAnormal( tempTestData, trainingDays = 8,
                   dates = c("2008010100","2008010200"))

  tempTestFit34 <- ensembleBMAnormal( tempTestData, trainingDays = 8.,
                   dates = c("2008010300","2008010400"))

  tempTestFit <- combine( tempTestFit12, tempTestFit34)

Run the code above in your browser using DataLab