# 9.2 Intervention Analysis

Suppose that at time *t* = T (where T will be known), there has been an intervention to a time series. By intervention, we mean a change to a procedure, or law, or policy, etc. that is intended to change the values of the series *x _{t}*. We want to estimate how much the intervention has changed the series (if at all). For example, suppose that a region has instituted a new maximum speed limit on its highways and wants to learn how much the new limit has affected accident rates.

Intervention analysis in time series refers to the analysis of how the mean level of a series changes after an intervention, when it is assumed that the same ARIMA structure for the series *x _{t}* holds both before and after the intervention.

**Overall Intervention Model**

Suppose that the ARIMA model for *x _{t}* (the observed series) with no intervention is

\[x_t - \mu = \frac{\Theta(B)}{\Phi(B)}w_t\]

with the usual assumptions about the error series *w _{t}*.

Θ(B) is the usual MA polynomial and Φ(B) is the usual AR polynomial.

Let *z _{t} *= the amount of change at time

*t*that is attributable to the intervention. By definition,

*z*= 0 before time T (time of the intervention). The value of

_{t}*z*may or may not be 0 after time T.

_{t}Then the overall model, including the intervention effect, may be written as

\[x_t - \mu = z_t + \frac{\Theta(B)}{\Phi(B)}w_t\]

**Example**: Following is a plot of a simulated MA(2) model with mean μ = 60 prior to an “intervention point” at time *t* = 100. We added 10 to the series for times *t* ≥ 100. In practice, the task would be to determine the magnitude and pattern of the change to the series.

**Possible Patterns for Intervention Effect (patterns for z_{t})**

There are several possible patterns for how an intervention may affect the values of a series for *t* ≥ T (the intervention point). Four possible patterns are as follows:

* Pattern 1*: Permanent constant change to the mean level: An amount has been added (or subtracted) to each value after time T.

* Pattern 2*: Brief constant change to the mean level: There may be a temporary change for one or more periods, after which there is no effect of the intervention.

* Pattern 3*: Gradual increase or decrease to a new mean level: There may be a gradually increasing amount that is added (or subtracted) which eventually levels off at a new level (compared to the “before” level).

* Pattern 4*: Initial change followed by gradual return to the no change: There may be an immediate change to the values of the series, but the amount added or subtracted to each value after time T approaches 0 over time.

**Models for the Patterns**

*z _{t}* = the amount of change at time

*t*that is attributable to the intervention.

Suppose that *I _{t} *is an indicator variable such that

*I*= 1 when

_{t}*t*≥ T and

*I*= 0 when

_{t}*t*< T.

* Pattern 1*: Constant permanent change. A constant change of equal to the amount δ

_{0}after time T may be written simply as

*z _{t} *= δ

_{0}

*I*

_{t}.Note that *z _{t}* = δ

_{0}for t ≥ T, and

*z*= 0 and for t < T. The coefficient δ

_{t}_{0}will be estimated using the data.

* Pattern 2*: A temporary (constant change) lasting for

*d*times past the intervention time T, can be described by the intervention effect model

*z _{t} *= δ

_{0}(1 - B

*)*

^{d}*I*

_{t}.Or, we can redefine the indicator so that *I _{t}* = 1 for T ≤

*t*≤ T + d, and

*I*= 0 for all other

_{t}*t*. Then, we use the model

*z*= δ

_{t}_{0}

*I*.

_{t}With this intervention effect, *z _{t}* = δ

_{0}for T ≤

*t*≤ T + d, and

*z*= 0 and for all other

_{t}*t*. Again, the coefficient δ

_{0}will be estimated using the data.

* Pattern 3*: A gradually increasing effect that eventually levels off can be written as:

\[z_t = \frac{\delta_0}{1-\omega_1B}I_t,\]

with *I _{t}* = 1 for

*t*≥ T and

*I*= 0 when

_{t}*t*< T. Assume |ω

_{1}| < 1.

This is equivalent to *z _{t} *= ω

_{1}

*z*+ δ

_{t-1}_{0}

*I*.

_{t}When *t* < T, *z _{t}* = 0.

When *t* ≥ T, *I _{t}* =1 so

*z*= ω

_{t}_{1}

*z*+ δ

_{t-1}_{0}. Because |ω

_{1}| < 1, we can continue to express each past

*z*in terms of ω

_{t}_{1}and δ

_{0}as a geometric series to obtain the following:

\[z_t = \frac{\delta_0 (1-\omega_1^{t-T+1})}{1-\omega_1}.\]

The coefficients ω_{1} and δ_{0} will be estimated using the data.

* Pattern 4*: An immediate change that eventually returns to 0 can be modeled as follows

\[z_t = \frac{\delta_0}{1-\omega_1B}P_t ,\]

with *P _{t}* = 1 when

*t*= T and

*P*= 0 otherwise. Assume |ω

_{t}_{1}| < 1.

This is equivalent to *z _{t} *= ω

_{1}

*z*+ δ

_{t-1}_{0}

*P*.

_{t}When* t* < T, *z _{t}* = 0.

When *t* = T, *z _{t-1}* = 0 and

*P*= 1 so

_{t }*z*= δ

_{t}_{0}.

When t ≥ T+1, *P _{t }*= 0 so

*z*= ω

_{t}_{1}

*z*.

_{t-1}The coefficients ω_{1} and δ_{0} will be estimated using the data.

**Estimating the Intervention Effect**

Two parts of the overall model have to be estimated – the basic ARIMA model for the series and the intervention effect. Several approaches have been proposed. One approach has the following steps:

- Use the data before the intervention point to determine the ARIMA model for the series.
- Use that ARIMA model to forecast values for the period after the intervention.
- Calculate the differences between actual values after the intervention and the forecasted values.
- Examine the differences in step 3 to determine a model for the intervention effect.

What we do after step 4 depends on available software. If the right program is available we can use all of the data to estimate the overall model that combines the ARIMA for the series and the intervention model. Otherwise, we might use only the differences from step 4 above to make estimates of the magnitude and nature of the intervention.

**Example**: North Carolina Highway Fatality Rates, monthly for *n* = 86 months. Beginning at month = 71 the maximum speed limit was lowered from 70 mph to 55 mph. The fatality rate is computed as highway fatalities per 100 million miles of travel. A time series plot follows. The latter part of the series, in red, is the fatality rate after the change in speed limit.

Using the data from times *t* = 1, …, 70 (before the speed limit decrease), we fit an ARIMA (2, 1, 0) × (1, 1, 0)_{12}.

Coefficients:

ar1 ar2 sar1

-0.8142 -0.6461 -0.3717

s.e. 0.1081 0.1119 0.1278

sigma^2 estimated as 0.5834: log likelihood = -67.04, aic = 142.08

We then use this model to forecast values for *t* = 71, …, 86 and compare the forecasted values to the actual values during this intervention period. The first of the next two plots shows the forecasted values compared to the actual values for the “after” period. The second plot shows the differences.

It’s difficult to judge the mean intervention pattern exactly. It’s possible that a constant mean change may describe the situation. The mean difference between actual and forecasted in the intervention period is -0.7168515.

We’ll learn how to do things in R in the homework for this week.