Intervention Analysis
Intervention Analysis
ST 434/534
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 1 / 37
Outline
1 Intervention analysis
Introduction
Models for intervention analysis
Example: air pollution in Los Angeles
2 Outlier analysis
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 2 / 37
Introduction
Transfer functions are used in the analysis. The input series will
be of the form of a simple pulse or step indicator function to
indicate the presence or absence of the intervention event.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 3 / 37
Models for intervention analysis
will be entertained.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 4 / 37
The first part,
ω(B)B b
ξt
δ(B)
represents the effects of the deterministic input ξt .
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 5 / 37
Two types of deterministic input variables
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 6 / 37
The other type is a pulse function, given by
(T ) 0 if t ̸= T ,
Pt =
1 if t = T .
These indicator input variables are used when the effects of the
intervention cannot be represented as the response to a
quantitative variable because such a variable does not exist or it
is impossible to obtain measurements on such a variable. If we
had a random variable representing the intervention effects, we
could use that variable to quantify the effects.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 7 / 37
Determining the transfer function model
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 8 / 37
General responses
Various responses can be produced through different
combinations of step and pulse inputs at different time points.
(T )
ωB b St : This actually gives a spike of height ω at all time
(T )
points t ≥ T + b, for at time T , the effect is zero as B b St
(T )
means that we are looking at a time before where St = 1.
(T )
ωB b Pt produces a spike of height ω at t = T + b.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 10 / 37
ωB b
Since 1−δB = ωB b (1 + δB + δ 2 B 2 + . . .)
= ω(B b + δB b+1 + δ 2 B b+2 + . . .). Thus
ωB b (T )
S
1 − δB t
produces spikes with increasing heights, beginning with a spike
with height ω at time T + b, and in the limit as t → ∞
ω
converging to a spike with height 1−δ . The heights would
increase without limit if δ = 1.
On the other hand,
ωB b (T )
P
1 − δB t
produces spikes with decreasing heights (when δ < 1), beginning
with a spike with height ω at time T + b, and decreasing
exponentially as powers of δ.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 11 / 37
Representing multiple intervention events
where Ijt are intervention variables that can be either step, pulse,
or even indicator functions.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 12 / 37
Air pollution intervention in Los Angeles:
background
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 13 / 37
Air pollution intervention in Los Angeles:
background
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 14 / 37
The data from 1955 to 1960 was assumed to be free from
intervention effects and was used to estimate the noise model Nt .
The sample ACF for that data suggested the model
(1 − B 12 )Nt = (1 − θB)(1 − ΘB 12 )at .
Box and Tiao (1975) suggested that the opening of the Golden
State Freeway and Rule 63 in 1960 constitutes an intervention I1
that may be expected to be a step change in the ozone level.
A second intervention was the 1966 regulations requiring engine
changes in new cars. The effect would most accurately have
been represented by the proportion of new cars with the
specified engine changes over time. However, no such data was
available. Proxy variables were used.
Because of the differences in the intensity of sunlight and other
meteorological conditions between summer and winter months,
the second effect was broken into two effects, I2 for the summer
month effects, I3 for the effects of winter months.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 15 / 37
The final model of Box and Tiao (1975) was
ω2 ω3
Zt = ω1 I1t (t) + 12
I2t + I3t
1−B 1 − B 12
(1 − θB)(1 − ΘB 12 )
+ at ,
1 − B 12
where
0 if t < Jan 1960
I1t =
1 if t ≥ Jan 1960,
1 for summer months June-Oct beginning in 1966 ,
I2t =
0 otherwise;
1 for winter months Nov-May beginning in 1966 ,
I3t =
0 otherwise.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 16 / 37
SAS code for determining the estimated coefficients is as follows:
title1 ’Intervention Data for Ozone Concentration’;
title2 ’(Box and Tiao, JASA 1975 P.70)’;
data air;
input ozone @@;
label ozone = ’Ozone Concentration’
x1 = ’Intervention for post 1960 period’
summer = ’Summer Months Intervention’
winter = ’Winter Months Intervention’;
date = intnx( ’month’, ’31dec1954’d, n );
format date monyy.;
month = month( date );
year = year( date );
x1 = year>= 1960;
summer = (5 < month < 11 ) * ( year > 1965 );
winter = ( year > 1965 ) - summer;
datalines;
2.63
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 17 / 37
...
;
run;
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 18 / 37
* Fit a multiple regression with a seasonal MA model
/* Then fit a multiple regression with a product MA model */
/* by the maximum likelihood method */
/* Forecast */
forecast lead=12 id=date interval=month;
run;
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 19 / 37
LA ozone data 1955-1972
Figure: 1.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 20 / 37
Trend and correlation analysis of residual
seasonally differenced LA ozone data 1955-1972
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 21 / 37
Estimated effects
Table: 1
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 22 / 37
Trend and correlation analysis of residual
seasonally differenced LA ozone data 1955-1972
after q=(1)(12) model fit
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 23 / 37
Results
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 24 / 37
Models for outlier analysis
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 25 / 37
Then an additive outlier at time T is modeled as
(T ) (T ) θ(B)
Yt = ωPt + Nt = ωPt + at .
φ(B)
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 26 / 37
An AO affects the level of the observed time series only at time
T by an unknown amount ω, while an IO represents an
extraordinary random shock at time T that affects all
succeeding observations YT , YT +1 , . . . , through the dynamics of
the system described by the model for Nt .
θ(B)
where νj (B) = 1 for an AO and νj (B) = φ(B)
for an IO at time
Tj .
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 27 / 37
Example of analysis of outliers
A plot of the data, along with the trend and correlation analysis
are shown on the next two slides.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 28 / 37
Series C: Temperature readings every minute in a
chemical process
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 29 / 37
Series C: Trend and correlation analysis for the raw
data
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 30 / 37
Model fitting
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 31 / 37
Augmented Dickey-Fuller unit root tests
Table: 2
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 32 / 37
Model fitting
After differencing, the trend and correlation analysis suggests an
AR(1) model. The model that is fit is
(1 − 0.82017B)(1 − B)Yt = at with σ̂a2 = 0.018156. The model
fits well. Five outliers are detected.
Table: 3
cards;
1 26.6 ...
226 18.8
;
run;
data seriesc;
set seriesc;
if time = 163 then AO = 1;
else AO = 0.0;
if time=58 then LS1 = 1;
else LS1 = 0.0;
if time=59 then LS2 = 1;
else LS2 = 0.0;
if time=61 then LS3 = 1;
else LS3 = 0.0;
if time=41 then LS4 = 1;
else LS4 = 0.0;
run;
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 35 / 37
proc arima data=seriesc ;
identify var=temp(1)
crosscorr=(AO(1) LS1(1) LS2(1) LS3(1) LS4(1))
noprint;
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 36 / 37
Model fitting with outliers included
The model fits better, and no outliers from the revised model
are detected.
Donald E.K. Martin (North Carolina St. U.) Intervention analysis November 26, 2022 37 / 37