Returns forecasts and other information for univariate ROBETS models.
# S3 method for robets
forecast(object, h = ifelse(object$m > 1, 2 * object$m, 10),
level = c(80, 95), PI = TRUE, lambda = object$lambda, ...)
An object of class "robets
". Usually the result of a call to robets
.
Number of periods for forecasting
Confidence level for prediction intervals.
If TRUE
, prediction intervals are calculated.
Box-Cox transformation parameter. Ignored if NULL. Otherwise, forecasts back-transformed via an inverse Box-Cox transformation.
Other arguments.
An object of class "forecast
". The function summary
is used to obtain and print a summary of the results, while the function plot
produces a plot of the forecasts. The generic accessor functions fitted.values
and residuals
extract useful features of the value returned by forecast.robets
. An object of class "forecast"
is a list containing at least the following elements:
model: A list containing information about the fitted model
method: The name of the forecasting method as a character string
mean: Point forecasts as a time series
x: The original time series (either object
itself or the time series used to create the model stored as object
).
residuals: Residuals from the fitted model. For models with additive errors, the residuals are x - fitted values. For models with multiplicative errors, the residuals are equal to x /(fitted values) - 1.
fitted: Fitted values (one-step ahead forecasts)
The code of this function is based on the function forecast.ets
of the package forecast
of Hyndman and Khandakar (2008).
Crevits, R., and Croux, C (2016) "Forecasting with Robust Exponential Smoothing with Damped Trend and Seasonal Components".Working paper. https://doi.org/10.13140/RG.2.2.11791.18080
Hyndman, R. J., and Khandakar, Y (2008) "Automatic time series forecasting: The forecasting package for R".Journal of Statistical Software 27(3). https://doi.org/10.18637/jss.v027.i03
# NOT RUN {
library(forecast)
model <- robets(nottem)
plot(forecast(model))
# }
Run the code above in your browser using DataCamp Workspace