Chapter Contents Previous Next
 The ARIMA Procedure

## Example 7.4: An Intervention Model for Ozone Data

This example fits an intervention model to ozone data as suggested by Box and Tiao (1975). Notice that since the response variable, OZONE, is differenced, the innovation, X1, must also be differenced to generate a step function change in the response. If X1 had not been differenced, the change in the response caused by X1 would be a (seasonal) ramp and not a step function. Notice that the final model for the differenced data is a multiple regression model with a moving-average structure assumed for the residuals.

The model is fit by maximum likelihood. The seasonal moving-average parameter and its standard error are fairly sensitive to which method is chosen to fit the model, in agreement with the observations of Davidson (1981) and Ansley and Newbold (1980); thus, fitting the model by the unconditional or conditional least squares methods produce somewhat different estimates for these parameters.

Some missing values are appended to the end of the input data to generate additional values for the independent variables. Since the independent variables are not modeled, values for them must be available for any times at which predicted values are desired. In this case, predicted values are requested for 12 periods beyond the end of the data. Thus, values for X1, WINTER, and SUMMER must be given for 12 periods ahead.

The following statements read in the data and compute dummy variables for use as intervention inputs:

```
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.7  2.0  3.6  5.0  6.5  6.1  5.9  5.0  6.4  7.4  8.2  3.9
4.1  4.5  5.5  3.8  4.8  5.6  6.3  5.9  8.7  5.3  5.7  5.7
3.0  3.4  4.9  4.5  4.0  5.7  6.3  7.1  8.0  5.2  5.0  4.7
3.7  3.1  2.5  4.0  4.1  4.6  4.4  4.2  5.1  4.6  4.4  4.0
2.9  2.4  4.7  5.1  4.0  7.5  7.7  6.3  5.3  5.7  4.8  2.7
1.7  2.0  3.4  4.0  4.3  5.0  5.5  5.0  5.4  3.8  2.4  2.0
2.2  2.5  2.6  3.3  2.9  4.3  4.2  4.2  3.9  3.9  2.5  2.2
2.4  1.9  2.1  4.5  3.3  3.4  4.1  5.7  4.8  5.0  2.8  2.9
1.7  3.2  2.7  3.0  3.4  3.8  5.0  4.8  4.9  3.5  2.5  2.4
1.6  2.3  2.5  3.1  3.5  4.5  5.7  5.0  4.6  4.8  2.1  1.4
2.1  2.9  2.7  4.2  3.9  4.1  4.6  5.8  4.4  6.1  3.5  1.9
1.8  1.9  3.7  4.4  3.8  5.6  5.7  5.1  5.6  4.8  2.5  1.5
1.8  2.5  2.6  1.8  3.7  3.7  4.9  5.1  3.7  5.4  3.0  1.8
2.1  2.6  2.8  3.2  3.5  3.5  4.9  4.2  4.7  3.7  3.2  1.8
2.0  1.7  2.8  3.2  4.4  3.4  3.9  5.5  3.8  3.2  2.3  2.2
1.3  2.3  2.7  3.3  3.7  3.0  3.8  4.7  4.6  2.9  1.7  1.3
1.8  2.0  2.2  3.0  2.4  3.5  3.5  3.3  2.7  2.5  1.6  1.2
1.5  2.0  3.1  3.0  3.5  3.4  4.0  3.8  3.1  2.1  1.6  1.3
;
```

The following statements produce Output 7.4.1 and Output 7.4.2:

```
proc arima data=air;

/*--- Identify and seasonally difference ozone series ---*/
identify var=ozone(12) crosscorr=( x1(12) summer winter ) noprint;

/*--- Fit a multiple regression with a seasonal MA model ---*/
/*---     by the maximum likelihood method ---*/
estimate q=(1)(12) input=( x1 summer winter )
noconstant method=ml itprint;

/*--- Forecast ---*/
forecast  lead=12 id=date interval=month;

run;
```

The ESTIMATE statement results are shown in Output 7.4.1.

Output 7.4.1: Parameter Estimates

 Intervention Data for Ozone Concentration (Box and Tiao, JASA 1975 P.70)

 The ARIMA Procedure

 Initial Moving Average Estimates Estimate 1 -0.29241

 Initial Moving Average Estimates Estimate 12 0.40740

 White Noise Variance Est 0.944969

 The ARIMA Procedure

 Conditional Least Squares Estimation Iteration SSE MA1,1 MA2,1 NUM1 NUM2 NUM3 Lambda R Crit 0 154.53 -0.29241 0.40740 -1.13490 -0.11731 0.05581 0.00001 1 1 146.20 -0.29256 0.59844 -1.20292 -0.29784 -0.11572 1E-6 0.230552 2 145.88 -0.30071 0.59239 -1.26173 -0.26252 -0.08247 1E-7 0.046601 3 145.88 -0.29976 0.59242 -1.26246 -0.26150 -0.08197 1E-8 0.001345 4 145.88 -0.29983 0.59234 -1.26243 -0.26154 -0.08196 1E-9 0.000125

 Maximum Likelihood Estimation Iter Loglike MA1,1 MA2,1 NUM1 NUM2 NUM3 Lambda R Crit 0 -249.07778 -0.29983 0.59234 -1.26243 -0.26154 -0.08196 0.00001 1 1 -245.89135 -0.26830 0.76634 -1.34490 -0.23984 -0.07578 1E-6 0.169445 2 -245.88484 -0.26653 0.76623 -1.33046 -0.23939 -0.08025 1E-7 0.008044 3 -245.88482 -0.26689 0.76661 -1.33070 -0.23936 -0.08020 1E-8 0.000603 4 -245.88481 -0.26684 0.76665 -1.33062 -0.23936 -0.08021 1E-9 0.000073

 ARIMA Estimation Optimization Summary Estimation Method Maximum Likelihood Parameters Estimated 5 Termination Criteria Maximum Relative Change in Estimates Iteration Stopping Value 0.001 Criteria Value 0.000195 Alternate Criteria Relative Change in Objective Function Alternate Criteria Value 1.247E-8 Maximum Absolute Value of Gradient 0.00712 R-Square Change from Last Iteration 0.000073 Objective Function Log Gaussian Likelihood Objective Function Value -245.885 Marquardt's Lambda Coefficient 1E-9 Numerical Derivative Perturbation Delta 0.001 Iterations 4

 The ARIMA Procedure

 Maximum Likelihood Estimation Parameter Estimate Approx Std Error t Value Pr > |t| Lag Variable Shift MA1,1 -0.26684 0.06710 -3.98 <.0001 1 ozone 0 MA2,1 0.76665 0.05973 12.83 <.0001 12 ozone 0 NUM1 -1.33062 0.19236 -6.92 <.0001 0 x1 0 NUM2 -0.23936 0.05952 -4.02 <.0001 0 summer 0 NUM3 -0.08021 0.04978 -1.61 0.1071 0 winter 0

 Variance Estimate 0.634506 Std Error Estimate 0.796559 AIC 501.77 SBC 518.36 Number of Residuals 204

 Correlations of Parameter Estimates Variable Parameter ozone MA1,1 ozone MA2,1 x1 NUM1 summer NUM2 winter NUM3 ozone MA1,1 1.000 0.090 -0.039 0.062 -0.034 ozone MA2,1 0.090 1.000 -0.169 0.211 0.022 x1 NUM1 -0.039 -0.169 1.000 -0.124 -0.107 summer NUM2 0.062 0.211 -0.124 1.000 0.097 winter NUM3 -0.034 0.022 -0.107 0.097 1.000

 Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 7.47 4 0.1132 0.017 0.054 0.043 0.101 -0.022 0.140 12 10.21 10 0.4220 -0.024 -0.059 -0.047 0.014 0.032 0.072 18 14.53 16 0.5593 0.054 0.006 -0.110 0.028 -0.042 0.043 24 19.99 22 0.5834 0.003 -0.074 -0.074 0.098 -0.038 0.043 30 27.00 28 0.5180 -0.072 -0.035 0.023 -0.028 -0.107 0.100 36 32.65 34 0.5336 0.022 -0.099 -0.006 0.087 -0.046 0.053

 The ARIMA Procedure

 Model for variable ozone Period(s) of Differencing 12

 Moving Average Factors Factor 1: 1 + 0.26684 B**(1) Factor 2: 1 - 0.76665 B**(12)

 Input Number 1 Input Variable x1 Period(s) of Differencing 12 Overall Regression Factor -1.33062

 Input Number 2 Input Variable summer Overall Regression Factor -0.23936

 Input Number 3 Input Variable winter Overall Regression Factor -0.08021

The FORECAST statement results are shown in Output 7.4.2.

Output 7.4.2: Forecasts

 The ARIMA Procedure

 Forecasts for variable ozone Obs Forecast Std Error 95% Confidence Limits 217 1.4205 0.7966 -0.1407 2.9817 218 1.8446 0.8244 0.2287 3.4604 219 2.4567 0.8244 0.8408 4.0725 220 2.8590 0.8244 1.2431 4.4748 221 3.1501 0.8244 1.5342 4.7659 222 2.7211 0.8244 1.1053 4.3370 223 3.3147 0.8244 1.6989 4.9306 224 3.4787 0.8244 1.8629 5.0946 225 2.9405 0.8244 1.3247 4.5564 226 2.3587 0.8244 0.7429 3.9746 227 1.8588 0.8244 0.2429 3.4746 228 1.2898 0.8244 -0.3260 2.9057

 Chapter Contents Previous Next Top