0
$\begingroup$

I am new to time series forecasting and I am trying to understand automatic forecasting algorithm in the forecast package in R.

I read http://www.jstatsoft.org/v27/i03 this paper and I tried to run:

forecast(t_series_NOT_MODEL)

However, the results are different from:

e = ets(t_series_NOT_MODEL)
forecast(e)

Apparently, according to the paper:

There is also a method for a ts object. If a time series object is passed as the first argument to forecast(), the function will produce forecasts based on the exponential smoothing algorithm of Section 2.

Which means that forecast and ets output should be same, or am I make a mistake? forecast() outputs a model with name -> STL + ETS(A,N,N) whereas, ets() outputs a model with name -> ETS(A,N,N)

EDIT :

If model=NULL,the function forecast.ts makes forecasts using ets models (if the data are non-seasonal or the seasonal period is 12 or less) or stlf (if the seasonal period is 13 or more).

So does that mean that since my model is STL + ETS, that means that my data is seasonal? Also if that is the case why does ETS decide on (A,N,N) rather than (A,N,A) or (A,N,M) ?

$\endgroup$
1
$\begingroup$

You should read the documentation for that specific function by:

library(forecast)
?forecast

The forecast function in the R forecast package will return an ETS model if the frequency is <13 (seasonal or non-seasonal), otherwise it will apply a non-seasonal forecasting method to the seasonally adjusted data (aka STL decomp + non-seasonal ETS model applied), then reseasonalizes the last year of the seasonal component.

$\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.