Description Usage Arguments Details Author(s) References See Also Examples
View source: R/smoothCombine.R
Function constructs ETS, SSARIMA, CES, GUM and SMA and combines their forecasts using IC weights.
1 2 3 4 5 6 7 8  smoothCombine(y, models = NULL, initial = c("optimal", "backcasting"),
ic = c("AICc", "AIC", "BIC", "BICc"), loss = c("MSE", "MAE", "HAM",
"MSEh", "TMSE", "GTMSE", "MSCE"), h = 10, holdout = FALSE,
cumulative = FALSE, interval = c("none", "parametric", "likelihood",
"semiparametric", "nonparametric"), level = 0.95, bins = 200,
intervalCombine = c("quantile", "probability"), bounds = c("admissible",
"none"), silent = c("all", "graph", "legend", "output", "none"),
xreg = NULL, xregDo = c("use", "select"), initialX = NULL, ...)

y 
Vector or ts object, containing data needed to be forecasted. 
models 
List of the estimated smooth models to use in the
combination. If 
initial 
Can be 
ic 
The information criterion used in the model selection procedure. 
loss 
The type of Loss Function used in optimization. There are also available analytical approximations for multistep functions:
Finally, just for fun the absolute and half analogues of multistep estimators
are available: 
h 
Length of forecasting horizon. 
holdout 
If 
cumulative 
If 
interval 
Type of interval to construct. This can be:
The parameter also accepts 
level 
Confidence level. Defines width of prediction interval. 
bins 
The number of bins for the prediction interval. The lower value means faster work of the function, but less precise estimates of the quantiles. This needs to be an even number. 
intervalCombine 
How to average the prediction interval:
quantilewise ( 
bounds 
What type of bounds to use in the model estimation. The first letter can be used instead of the whole word. 
silent 
If 
xreg 
The vector (either numeric or time series) or the matrix (or
data.frame) of exogenous variables that should be included in the model. If
matrix included than columns should contain variables and rows  observations.
Note that 
xregDo 
The variable defines what to do with the provided xreg:

initialX 
The vector of initial parameters for exogenous variables.
Ignored if 
... 
This currently determines nothing.

The combination of these models using information criteria weights is possible because they are all formulated in Single Source of Error framework. Due to the the complexity of some of the models, the estimation process may take some time. So be patient.
The prediction interval are combined either probabilitywise or quantilewise (Lichtendahl et al., 2013), which may take extra time, because we need to produce all the distributions for all the models. This can be sped up with the smaller value for bins parameter, but the resulting interval may be imprecise.
Ivan Svetunkov, ivan@svetunkov.ru
Snyder, R. D., 1985. Recursive Estimation of Dynamic Linear Models. Journal of the Royal Statistical Society, Series B (Methodological) 47 (2), 272276.
Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, SpringerVerlag. doi: 10.1007/9783540719182.
Kolassa, S. (2011) Combining exponential smoothing forecasts using Akaike weights. International Journal of Forecasting, 27, pp 238  251.
Taylor, J.W. and Bunn, D.W. (1999) A Quantile Regression Approach to Generating Prediction Intervals. Management Science, Vol 45, No 2, pp 225237.
Lichtendahl Kenneth C., Jr., GrushkaCockayne Yael, Winkler Robert L., (2013) Is It Better to Average Probabilities or Quantiles? Management Science 59(7):15941611. DOI: doi: 10.1287/mnsc.1120.1667
es, auto.ssarima,
auto.ces, auto.gum, sma
1 2 3 4 5 6 7 8 9 10 11 12 13  library(Mcomp)
ourModel < smoothCombine(M3[[578]],interval="p")
plot(ourModel)
# models parameter accepts either previously estimated smoothCombine
# or a manually formed list of smooth models estimated in sample:
smoothCombine(M3[[578]],models=ourModel)
## Not run: models < list(es(M3[[578]]), sma(M3[[578]]))
smoothCombine(M3[[578]],models=models)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.