# R auto.arima with intervention: intervention only affects one point

I have a model fitted with auto.arima, the model is ARIMA(0,1,0)x(0,1,0)[6] with seasonal period 6. The data is bi-monthly so there is an annual seasonality. There is only one regressor indicating an intervention (dummy).

Then I used this model to old data to see what would have happened if the intervention would have done since and earlier period, using the model and forecast from an earlier data. The thing I do not understand yet is that if I suppose the intervention only occur in one period, the series only differ in this period. Therefore, there is no persistence on the intervention.

As I understand, the model has ARIMA errors. The error in the intervention period should change and so there should be an effect in the next periods when using forecast to predict futures values. If the intervention occurs in only one period, why in the forecast the intervention does not affect futures predictions?

EDIT:

The code I am using is

model1<-auto.arima(ts,xreg = X.ts)


Where X.ts is a ts object with 0 and a period with intervention.

Then I used

model2<-Arima(Xold, xreg= X.ts.old, model=model1)


So I used the first model on earlier data to make the following

forecast(model2, xreg=cbin(c(0,1,1,1,1...))


So I am trying to show what would have been expected from an earlier period (the forecast) if the intervention would have started earlier.

The thing I do not understand yet is that for instance

forecast(model2, xreg=cbin(c(0,1,1,1,0...))
forecast(model2, xreg=cbin(c(0,1,1,1,1...))


only differ in the periods the xreg differ, with no persistence of these differences. I did not expect this, why is that?

• Welcome to CV. This is a statement. You need to articulate a question if you hope to get an answer. – Mike Hunter Apr 28 '16 at 19:31
• a level shift or a local time trend or a seasonal pulse will have an effect on future periods. If you want to post your data and the specifics of your model I will be glad to help further. – IrishStat Apr 28 '16 at 20:47
• @IrishStat Thanks to both! I have just edited to show the code – Nicolás Esteban Cofré Ramírez Apr 28 '16 at 21:05
• any idea how to make the intervention have long time influence ? – King Solomon's Horse Feb 21 '17 at 23:07
• Maybe just include lagged y in the xreg matrix. – Nicolás Esteban Cofré Ramírez Jun 19 '17 at 16:32

I think I understand now. The model is

$y_t=x\beta + u_t$ with $u_t$ being ARIMA(0,1,0)x(0,1,0)[6]

So in the forecast, we have that the errors are the following

$\hat{u}_{t+1}=u_{t}+u_{t-5}-u_{t-6}$

Given this random walk feature, the $X$ does not affect future predictions, it only affects the intervention period.

I did an explicit derivation to myself to double-check whether the OP got the lags and signs right; it seems he did. Given the time investment (however minimal), I am posting it just in case.

If $u_t$ follows ARIMA(0,1,0)(0,1,0)[6], that means

\begin{aligned} (1-L)(1-L^6) u_t &= \varepsilon_t \\ (1-L-L^6+L^7)u_t &= \varepsilon_t \\ u_t-u_{t-1}-u_{t-6}+u_{t-7} &= \varepsilon_t \\ u_t &= u_{t-1}+u_{t-6}-u_{t-7}+\varepsilon_t \\ \end{aligned}

Now consider $u_{t+1}$ and its forecast $\hat u_{t+1}$ (given $\mathbb{E}(\varepsilon_{t+1})=0$):

\begin{aligned} u_{t+1} &= u_{t}+u_{t-5}-u_{t-6}+\varepsilon_{t+1} \\ \hat u_{t+1} &= u_{t}+u_{t-5}-u_{t-6}. \end{aligned}

This also illustrates nicely how regression with ARMA errors can produce one-time effects of exogenous regressors even if the error process is a random walk or the like (cf. @IrishStat's comment to the OP: a level shift or a local time trend or a seasonal pulse will have an effect on future periods.).