This function is created in order for the package to be compatible with Rob Hyndman's "forecast" package
# S3 method for smooth
forecast(object, h = 10, intervals = c("parametric",
"semiparametric", "nonparametric", "none"), level = 0.95, ...)
Time series model for which forecasts are required.
Forecast horizon
Type of intervals to construct. See es for details.
Confidence level. Defines width of prediction interval.
Returns object of class "smooth.forecast", which contains:
model
- the estimated model (ES / CES / GES / SSARIMA).
method
- the name of the estimated model (ES / CES / GES / SSARIMA).
fitted
- fitted values of the model.
actuals
- actuals provided in the call of the model.
forecast
aka mean
- point forecasts of the model
(conditional mean).
lower
- lower bound of prediction intervals.
upper
- upper bound of prediction intervals.
level
- confidence level.
intervals
- binary variable (whether intervals were produced or not).
residuals
- the residuals of the original model.
This is not a compulsary function. You can simply use es,
ces, ges or ssarima without
forecast.smooth
. But if you are really used to forecast
function, then go ahead!
Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, Springer-Verlag. http://www.exponentialsmoothing.net.
# NOT RUN {
ourModel <- ces(rnorm(100,0,1),h=10)
forecast.smooth(ourModel,h=10)
forecast.smooth(ourModel,h=10,intervals=TRUE)
plot(forecast.smooth(ourModel,h=10,intervals=TRUE))
# }
Run the code above in your browser using DataLab