predict.HoltWinters
Prediction Function for Fitted Holt-Winters ModelsComputes predictions and prediction intervals for models fitted by the Holt-Winters method.
## S3 method for class 'HoltWinters' predict(object, n.ahead = 1, prediction.interval = FALSE, level = 0.95, ...)
object | An object of class |
n.ahead | Number of future periods to predict. |
prediction.interval | logical. If |
level | Confidence level for the prediction interval. |
... | arguments passed to or from other methods. |
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.
David Meyer [email protected]
C. C. Holt (1957) Forecasting trends and seasonals by exponentially weighted moving averages, ONR Research Memorandum, Carnegie Institute of Technology 52.
P. R. Winters (1960). Forecasting sales by exponentially weighted moving averages. Management Science, 6, 324–342. doi: 10.1287/mnsc.6.3.324.
require(graphics) m <- HoltWinters(co2) p <- predict(m, 50, prediction.interval = TRUE) plot(m, p)
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.