0
$\begingroup$

I would to forecast a not-seasonal time serie in R. This is my serie and the model built with HoltWinters:

tsRedditoMedioForecast <- HoltWinters(redditoMedio, beta=FALSE, gamma=FALSE)

If beta and gamma parameters are FALSE, I built a Brown model that haven't seasonal component.

Time series and model with HoltWinters

For forecasting, I imported the library "forecast" in my workspace:

install.packages('forecast', dependencies = TRUE)
library('forecast')

Last step: I would to forecast and calculate the value for the next 10 units. I put this R code:

tsRedditoMedioForecast2 <- forecast(tsRedditoMedioForecast, h=10)
plot(tsRedditoMedioForecast2)

The result is this: Forecasting time series But I don't expect this. Time serie is increasing, so I expect an increasing prediction line. Not an horizontal constant line. What's the problem?

UPDATE

I have expected results with ETS and auto.arima models

enter image description here

Why not with HoltWinters?

$\endgroup$
  • 1
    $\begingroup$ Do you expect a moving average to project a trend? If so, please see Wikipedia's remark "Simple exponential smoothing does not do well when there is a trend in the data" and the subsequent passages. $\endgroup$ – whuber Dec 9 '19 at 14:58
  • 1
    $\begingroup$ Thanks. I introduce the trend component with beta factor in HoltWinters function: tsRedditoMedioForecast <- HoltWinters(redditoMedio, beta=TRUE, gamma=FALSE) And now I have my prediction line $\endgroup$ – wikimt Dec 9 '19 at 15:14
0
$\begingroup$

I put the trend component in my model and it works! Thansk whuber

tsRedditoMedioForecast <- HoltWinters(redditoMedio, beta=TRUE, gamma=FALSE) 
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.