predict.HoltWinters {stats}R Documentation

Prediction Function for Fitted Holt-Winters Models

Description

Computes predictions and prediction intervals for models fitted by the Holt-Winters method.

Usage

## S3 method for class 'HoltWinters'
predict(object, n.ahead = 1, prediction.interval = FALSE,
       level = 0.95, ...)

Arguments

object

An object of class HoltWinters.

n.ahead

Number of future periods to predict.

prediction.interval

logical. If TRUE, the lower and upper bounds of the corresponding prediction intervals are computed.

level

Confidence level for the prediction interval.

...

arguments passed to or from other methods.

Value

A time series of the predicted values. If prediction intervals are requested, a multiple time series is returned with columns fit, lwr and upr for the predicted values and the lower and upper bounds respectively.

Author(s)

David Meyer David.Meyer@wu.ac.at

References

Holt CC (1957). “Forecasting Seasonals and Trends by Exponentially Weighted Moving Averages.” ONR Research Memorandum 52, Carnegie Institute of Technology. Reprinted in Holt (2004).

Holt CC (2004). “Forecasting Seasonals and Trends by Exponentially Weighted Moving Averages.” International Journal of Forecasting, 20(1), 5–10. doi:10.1016/j.ijforecast.2003.09.015.

Winters PR (1960). “Forecasting Sales by Exponentially Weighted Moving Averages.” Management Science, 6(3), 324–342. doi:10.1287/mnsc.6.3.324.

See Also

HoltWinters

Examples

require(graphics)

m <- HoltWinters(co2)
p <- predict(m, 50, prediction.interval = TRUE)
plot(m, p)

[Package stats version 4.6.0 Index]