combine: Combine Compatible BMA Models

Description Usage Arguments Details Value References See Also Examples

View source: R/combine.R

Description

Combines BMA models having the same characteristics for different dates.

Usage

1
combine( x, y, ...)

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.

Value

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

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

 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
31
32
  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
  tempTestFit12 <- ensembleBMAnormal( tempTestData, trainingDays = 30,
                   dates = c("2008010100","2008010200"))

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

## End(Not run)

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

ensembleBMA documentation built on May 19, 2017, 11:20 a.m.

Search within the ensembleBMA package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.