Forecasting with outliers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Forecasting with outliers

Federico Armentano
x<-ts(data$value, start=c(2009,1), end=c(2015,12),  freq=12) # keep 7 months to evaluate foecast

SAR011011              ;

          ma1     sma1
      -0.3372  -0.7815
s.e.   0.1166   0.2433

sigma^2 estimated as 198465069:  log likelihood = -784.53,  aic = 1573.06
Then I check for some outliers with the TSA package


ind     19.000000 30.000000 31.000000
lambda1  5.146045 -4.250828  4.136944
So, then I added 3 outliers at theobs 19, 30 and 31

          ma1     sma1      IO-19       IO-30      IO-31
      -0.1550  -0.4761  23262.107  -41275.194  20083.911
s.e.   0.1274   0.1283   8954.079    8778.279   9112.721
All of them are sigficant and really improve AIC.

So, when I tried to forecast.. most common procedures did not work.

predict(SAR011011out, n.ahead = 7, = TRUE) -->data' must be of a vector type, was 'NULL'

forecast(SAR011011out, h=3)--> 'data' must be of a vector type, was 'NULL'
I have read here that TSA does not have a predict function. But I just do not believe that is not possible to forecast incorporating outliers. what does the community use in this cases?

Thanks in advance!