mae {ensembleBMA} | R Documentation |
Computes the mean absolute error (MAE) for ensemble BMA forecasting models.
mae( fit, ensembleData, dates=NULL, nSamples=NULL, seed=NULL, popData=NULL, ...)
fit |
An ensemble BMA model fit for ensembleData .
|
ensembleData |
An ensembleData object that includes both ensemble
forecasts and observations. It need not be the object
used to form fit , although it must include the same
ensemble members. If ensembleData includes dates,
they must be consistent with fit and dates .
If ensembleData does not include dates, they will
be inferred from fit and dates .
|
dates |
The dates for which the CRPS and MAE will be computed.
These dates must be consistent with fit and ensembleData .
The default is to use all of the dates in fit .
|
nSamples |
The number of simulation samples for MAE via simulation. The default is analytic computation of the MAE. |
seed |
Argument to set.seed for random number generation in simulation.
|
popData |
For gamma0 model fits, there is an additional popData
argument for providing predictors in the logistic regression for
probability of zero precipitation. If popData was supplied to
obtain in the modeling for fit , then popData of the
same kind must be supplied here.
|
... |
Included for generic function compatibility. |
This method is generic, and can be applied to all ensemble BMA forecasting
models.
Note the model may have been applied to a transformation of the data,
but that information is included in the input fit
, and
the output is transformed appropriately.
A vector giving the MAE for the deterministic forecasts associated with the raw ensemble and the BMA model. For the raw ensemble, this is the mean absolute difference of the the ensemble means and the observations. For the BMA mixture of normals model, it is the mean absolute difference of the BMA predictive mean (Raftery et al. 2005) and the observations. For the BMA mixture of gammas with a point mass at 0 model used for precipitation, it is the mean absolute difference of the BMA median forecast and the observations (Sloughter et al. 2007).
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. 516, Department of Statistics, University of
Washington, August 2007.
data(slpTest) memberLabels <- c("AVN","GEM","ETA","NGM","NOGAPS") slpTestData <- ensembleData(forecasts = slpTest[ ,memberLabels], observations = slpTest$obs, dates = slpTest$date) slpTestFit <- ensembleBMAnormal(slpTestData) mae( slpTestFit, slpTestData)