21 Feb 2013 11:26

## Arimax with intervention dummy and multiple covariates

```Hi

I'm trying to measure the effect of a policy intervention (Box and Tiao, 1975).
This query has to do with the coding of the model rather than with the particulars of my dataset, so I'm not
providing the actual dataset (or a simulated one) in this case, apart from some general description.

The time series are of length n=34 (annual observations between 1977 and 2010). The policy measure was
introduced in 2000 and it has been implemented once a year ever since.

The variable of interest (VI) is continuous, and I have four continuous covariates (CO1-CO4), plus the
dummy intervention variable (DUM) which is equal to 0 between 1977 and 1999 and equal to 1 since 2000.

I thought of using an ARIMAX model, with the arimax() function in the TSA package to fit the transfer
function. I'm interested in modelling the intervention effect as a step function.

I specified the model thus:

a.       I've checked the ARIMA properties of each series using the auto.arima() function (from the 'forecast'
package) -the VI was found to best fit an ARIMA(0,1,1) model and the first covariate an ARIMA(1,0,0),
whereas the other covariates were white noise.

b.      To facilitate the specification of the various models  (the different model specifications dropped
variables or added additional covariates, etc, without changing the general structure of the syntax
below), I defined the following design matrix:

> xreg.1 <-  model.matrix(~CO1+ CO2+ CO3+ CO4)[,2:5]

c.       Following Cryer and Chan (2008, ch. 11, p. 255), I wrote models such as this:

> arimax.1 <- arimax(VI, order=c(0,1,1),
```

21 Feb 2013 16:57

### Re: Arimax with intervention dummy and multiple covariates

```Hi: bierens has a paper on modelling beer sales in the netherland ( I'm
pretty sure it's on the net.
if not, I have a copy somewhere I think )  using an ARIMAX. why don't you
take his paper and his data and see if you get the same estimates using R.
That's one way if you'll know if you're doing the steps correctly. I don't
have cryer and chan and I've never used the TSA package so I can't say
anything else.

On Thu, Feb 21, 2013 at 5:26 AM, Jose Iparraguirre <
Jose.Iparraguirre <at> ageuk.org.uk> wrote:

> Hi
>
> I'm trying to measure the effect of a policy intervention (Box and Tiao,
> 1975).
> This query has to do with the coding of the model rather than with the
> particulars of my dataset, so I'm not providing the actual dataset (or a
> simulated one) in this case, apart from some general description.
>
> The time series are of length n=34 (annual observations between 1977 and
> 2010). The policy measure was introduced in 2000 and it has been
> implemented once a year ever since.
>
> The variable of interest (VI) is continuous, and I have four continuous
> covariates (CO1-CO4), plus the dummy intervention variable (DUM) which is
> equal to 0 between 1977 and 1999 and equal to 1 since 2000.
>
> I thought of using an ARIMAX model, with the arimax() function in the TSA
> package to fit the transfer function. I'm interested in modelling the
> intervention effect as a step function.
```