简体   繁体   中英

r holtwinters predict

I am using R for sometime now and some days ago I found a very interesting function which made a prediction on a given time series. It just took the data from the known time series and applied it on a given period, but it kept the pattern. The problem is that I lost it. I am sure it was a sort of HoltWinters. I am trying two days to find something, but till now without success. Could someone please give me a hand on this!

Just use predict :

# Assuming you have some timeseries data in myts
hw <- HoltWinters(myts)
predict(hw, 10)   # predict 10 periods ahead

You can use forecast.HoltWinters

#Model creation
fit <- HoltWinters(ts.data,gamma=FALSE)
#Load forecast package
require(forecast)
#Apply model into forecast
forecast(fit)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM