forecast.hybridModel {forecastHybrid} | R Documentation |
Hybrid forecast
Description
Forecast method for hybrid models.
Usage
## S3 method for class 'hybridModel'
forecast(
object,
h = ifelse(object$frequency > 1, 2 * object$frequency, 10),
xreg = NULL,
level = c(80, 95),
PI = TRUE,
fan = FALSE,
PI.combination = c("extreme", "mean"),
...
)
Arguments
object |
a hybrid time series model fit with hybridModel. |
h |
number of periods for forecasting. If |
xreg |
future values of regression variables (for use if one of the ensemble methods used
in creating the hybrid forecast was |
level |
confidence level for prediction intervals. This can be expressed as a decimal between 0.0 and 1.0 or numeric between 0 and 100. |
PI |
should prediction intervals be produced? If a |
fan |
if |
PI.combination |
Method for combining the prediction intervals from each of the
forecasts. Supplying |
... |
other arguments passed to the individual |
Details
if xreg
was used in constructing the hybridModel
,
it must also be passed into forecast.hybridModel
.
While prediction intervals are produced for the
final ensemble forecast model, these should be viewed conservatively as insights
to the forecast's uncertainty. Currently these are constructed using the most extreme interval
from each component model for each horizon, so the composite prediction intervals do not
have statistical guarantees of asymptotic efficiency. More sophisticated
and rigorous techniques are planned, however, particularly when cross validation
approaches are used.
Value
An object of class forecast.
Author(s)
David Shaub
See Also
Examples
## Not run:
mod <- hybridModel(AirPassengers)
fc <- forecast(mod)
# View the point forecasts
fc$mean
# View the upper prediction interval
fc$upper
# View the lower prediction interval
fc$lower
# Plot the forecast
plot(fc)
## End(Not run)