Returns forecasts and other information for bagged models.

# S3 method for baggedModel
forecast(
object,
h = ifelse(frequency(object$y) > 1, 2 * frequency(object$y), 10),
...
)

## Arguments

object |
An object of class "`baggedModel` " resulting from a call to
`baggedModel` . |

h |
Number of periods for forecasting. |

... |
Other arguments, passed on to the `forecast` function of the original method |

## Value

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 and
prediction intervals.

An object of class "`forecast`

" is a list containing at least the
following elements:

modelA list containing information about the fitted model

methodThe name of the forecasting method as a character string

meanPoint forecasts as a time series

lowerLower limits for prediction intervals

upperUpper limits for prediction intervals

levelThe confidence values associated with the prediction intervals

xThe original time series (either `object`

itself or the
time series used to create the model stored as `object`

).

xregThe external regressors used in fitting (if given).

residualsResiduals from the fitted model. That
is x minus fitted values.

fittedFitted values (one-step forecasts)

## Details

Intervals are calculated as min and max values over the point forecasts from
the models in the ensemble. I.e., the intervals are not prediction
intervals, but give an indication of how different the forecasts within the
ensemble are.

## References

Bergmeir, C., R. J. Hyndman, and J. M. Benitez (2016). Bagging
Exponential Smoothing Methods using STL Decomposition and Box-Cox
Transformation. International Journal of Forecasting 32, 303-312.

## See also

## Author

Christoph Bergmeir, Fotios Petropoulos

## Examples