[R] R forecasting using ses model

Paul Bernal paulbernal07 at gmail.com
Wed Apr 12 16:09:23 CEST 2017


Dear Everyone,

Hope you are doing great. I get the following error when trying to generate
forecasts fitting a ses model. I would have thought that historical data
from october 1985 up to september 2016 would be enough to generate
forecasts.

How many monthly observations does the ses model requires in order to
generate forecasts?

I know the message couldn´t be clearer, but would like to know if someone
knows how many past observations (do I need as a minimum for the ses model
to work).

>data<-read.csv("01_PaulData.csv")
>
> tsdata<-ts(data, start=c(1985,10), end=c(2016,9), frequency=12)
>
> sesModel<-ses(tsdata)
>
> sesForecast<-forecast(sesModel, h=12)
Error in forecast.forecast(sesModel, h = 12) :
  Please select a longer horizon when the forecasts are first computed

	[[alternative HTML version deleted]]



More information about the R-help mailing list