21 Feb 11:26 2013

## Arimax with intervention dummy and multiple covariates

Jose Iparraguirre <Jose.Iparraguirre <at> ageuk.org.uk>

2013-02-21 10:26:45 GMT

2013-02-21 10:26:45 GMT

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),(Continue reading)