Chapter Contents Previous Next
 The ARIMA Procedure

## Example 7.3: Model for Series J Data from Box and Jenkins

This example uses the Series J data from Box and Jenkins (1976). First the input series, X, is modeled with a univariate ARMA model. Next, the dependent series, Y, is cross correlated with the input series. Since a model has been fit to X, both Y and X are prewhitened by this model before the sample cross correlations are computed. Next, a transfer function model is fit with no structure on the noise term. The residuals from this model are identified by means of the PLOT option; then, the full model, transfer function and noise is fit to the data.

The following statements read Input Gas Rate and Output CO2 from a gas furnace. (Data values are not shown. See "Series J" in Box and Jenkins (1976) for the values.)

```
title1 'Gas Furnace Data';
title2 '(Box and Jenkins, Series J)';
data seriesj;
input x y @@;
label x = 'Input Gas Rate'
y = 'Output CO2';
datalines;
;
```

The following statements produce Output 7.3.1 through Output 7.3.5.

```
proc arima data=seriesj;

/*--- Look at the input process -------------------*/
identify var=x nlag=10;
run;

/*--- Fit a model for the input -------------------*/
estimate p=3;
run;

/*--- Crosscorrelation of prewhitened series ------*/
identify var=y crosscorr=(x) nlag=10;
run;

/*--- Fit transfer function - look at residuals ---*/
estimate input=( 3 \$ (1,2)/(1,2) x ) plot;
run;

/*--- Estimate full model -------------------------*/
estimate p=2 input=( 3 \$ (1,2)/(1) x );
run;

quit;
```

The results of the first IDENTIFY statement for the input series X are shown in Output 7.3.1.

Output 7.3.1: IDENTIFY Statement Results for X

 Gas Furnace Data (Box and Jenkins, Series J)

 The ARIMA Procedure

 Name of Variable = x Mean of Working Series -0.05683 Standard Deviation 1.070952 Number of Observations 296

 Autocorrelations Lag Covariance Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` Std Error 0 1.146938 1.00000 `| |********************|` 0 1 1.092430 0.95247 `| . |******************* |` 0.058124 2 0.956652 0.83409 `| . |***************** |` 0.097510 3 0.782051 0.68186 `| . |************** |` 0.119201 4 0.609291 0.53123 `| . |*********** |` 0.131721 5 0.467380 0.40750 `| . |******** |` 0.138770 6 0.364957 0.31820 `| . |****** |` 0.142756 7 0.298427 0.26019 `| . |*****. |` 0.145132 8 0.260943 0.22751 `| . |*****. |` 0.146699 9 0.244378 0.21307 `| . |**** . |` 0.147887 10 0.238942 0.20833 `| . |**** . |` 0.148920

 "." marks two standard errors

 Inverse Autocorrelations Lag Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` 1 -0.71090 `| **************| . |` 2 0.26217 `| . |***** |` 3 -0.13005 `| ***| . |` 4 0.14777 `| . |*** |` 5 -0.06803 `| .*| . |` 6 -0.01147 `| . | . |` 7 -0.01649 `| . | . |` 8 0.06108 `| . |*. |` 9 -0.04490 `| .*| . |` 10 0.01100 `| . | . |`

 The ARIMA Procedure

 Partial Autocorrelations Lag Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` 1 0.95247 `| . |******************* |` 2 -0.78796 `| ****************| . |` 3 0.33897 `| . |******* |` 4 0.12121 `| . |** |` 5 0.05896 `| . |*. |` 6 -0.11147 `| **| . |` 7 0.04862 `| . |*. |` 8 0.09945 `| . |** |` 9 0.01587 `| . | . |` 10 -0.06973 `| .*| . |`

 Autocorrelation Check for White Noise To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 786.35 6 <.0001 0.952 0.834 0.682 0.531 0.408 0.318

The ESTIMATE statement results for the AR(3) model for the input series X are shown in Output 7.3.2.

Output 7.3.2: Estimates of the AR(3) Model for X

 The ARIMA Procedure

 Conditional Least Squares Estimation Parameter Estimate Approx Std Error t Value Pr > |t| Lag MU -0.12280 0.10902 -1.13 0.2609 0 AR1,1 1.97607 0.05499 35.94 <.0001 1 AR1,2 -1.37499 0.09967 -13.80 <.0001 2 AR1,3 0.34336 0.05502 6.24 <.0001 3

 Constant Estimate -0.00682 Variance Estimate 0.035797 Std Error Estimate 0.1892 AIC -141.667 SBC -126.906 Number of Residuals 296

 * AIC and SBC do not include log determinant.

 Correlations of Parameter Estimates Parameter MU AR1,1 AR1,2 AR1,3 MU 1.000 -0.017 0.014 -0.016 AR1,1 -0.017 1.000 -0.941 0.790 AR1,2 0.014 -0.941 1.000 -0.941 AR1,3 -0.016 0.790 -0.941 1.000

 Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 10.30 3 0.0162 -0.042 0.068 0.056 -0.145 -0.009 0.059 12 19.89 9 0.0186 0.014 0.002 -0.055 0.035 0.143 -0.079 18 27.92 15 0.0221 0.099 0.043 -0.082 0.017 0.066 -0.052 24 31.05 21 0.0729 -0.078 0.024 0.015 0.030 0.045 0.004 30 34.58 27 0.1499 -0.007 -0.004 0.073 -0.038 -0.062 0.003 36 38.84 33 0.2231 0.010 0.002 0.082 0.045 0.056 -0.023 42 41.18 39 0.3753 0.002 0.033 -0.061 -0.003 -0.006 -0.043 48 42.73 45 0.5687 0.018 0.051 -0.012 0.015 -0.027 0.020

 The ARIMA Procedure

 Model for variable x Estimated Mean -0.1228

 Autoregressive Factors Factor 1: 1 - 1.97607 B**(1) + 1.37499 B**(2) - 0.34336 B**(3)

The IDENTIFY statement results for the dependent series Y cross correlated with the input series X is shown in Output 7.3.3. Since a model has been fit to X, both Y and X are prewhitened by this model before the sample cross correlations are computed.

Output 7.3.3: IDENTIFY Statement for Y Cross Correlated with X

 The ARIMA Procedure

 Partial Autocorrelations Lag Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` 1 0.97076 `| . |******************* |` 2 -0.80388 `| ****************| . |` 3 0.18833 `| . |**** |` 4 0.25999 `| . |***** |` 5 0.05949 `| . |*. |` 6 -0.06258 `| .*| . |` 7 -0.01435 `| . | . |` 8 0.05490 `| . |*. |` 9 0.00545 `| . | . |` 10 0.03141 `| . |*. |`

 Autocorrelation Check for White Noise To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 1023.15 6 <.0001 0.971 0.896 0.793 0.680 0.574 0.485

 The ARIMA Procedure

 Correlation of y and x Number of Observations 296 Variance of transformed series y 0.131438 Variance of transformed series x 0.035357

 Both series have been prewhitened.

 Crosscorrelations Lag Covariance Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` -10 0.0015683 0.02301 `| . | . |` -9 0.00013502 0.00198 `| . | . |` -8 -0.0060480 -.08872 `| **| . |` -7 -0.0017624 -.02585 `| .*| . |` -6 -0.0080539 -.11814 `| **| . |` -5 -0.0000944 -.00138 `| . | . |` -4 -0.0012802 -.01878 `| . | . |` -3 -0.0031078 -.04559 `| .*| . |` -2 0.00065212 0.00957 `| . | . |` -1 -0.0019166 -.02811 `| .*| . |` 0 -0.0003673 -.00539 `| . | . |` 1 0.0038939 0.05712 `| . |*. |` 2 -0.0016971 -.02489 `| . | . |` 3 -0.019231 -.28210 `| ******| . |` 4 -0.022479 -.32974 `| *******| . |` 5 -0.030909 -.45341 `| *********| . |` 6 -0.018122 -.26583 `| *****| . |` 7 -0.011426 -.16761 `| ***| . |` 8 -0.0017355 -.02546 `| .*| . |` 9 0.0022590 0.03314 `| . |*. |` 10 -0.0035152 -.05156 `| .*| . |`

 "." marks two standard errors

 Crosscorrelation Check Between Series To Lag Chi-Square DF Pr > ChiSq Crosscorrelations 5 117.75 6 <.0001 -0.005 0.057 -0.025 -0.282 -0.330 -0.453

 The ARIMA Procedure

 Both variables have been prewhitened by the following filter:

 Prewhitening Filter

 Autoregressive Factors Factor 1: 1 - 1.97607 B**(1) + 1.37499 B**(2) - 0.34336 B**(3)

The ESTIMATE statement results for the transfer function model with no structure on the noise term is shown in Output 7.3.4. The PLOT option prints the residual autocorrelation functions from this model.

Output 7.3.4: Estimates of the Transfer Function Model

 The ARIMA Procedure

 Conditional Least Squares Estimation Parameter Estimate Approx Std Error t Value Pr > |t| Lag Variable Shift MU 53.32237 0.04932 1081.24 <.0001 0 y 0 NUM1 -0.62868 0.25385 -2.48 0.0138 0 x 3 NUM1,1 0.47258 0.62253 0.76 0.4484 1 x 3 NUM1,2 0.73660 0.81006 0.91 0.3640 2 x 3 DEN1,1 0.15411 0.90483 0.17 0.8649 1 x 3 DEN1,2 0.27774 0.57345 0.48 0.6285 2 x 3

 Constant Estimate 53.3224 Variance Estimate 0.704241 Std Error Estimate 0.839191 AIC 729.725 SBC 751.765 Number of Residuals 291

 * AIC and SBC do not include log determinant.

 Correlations of Parameter Estimates Variable Parameter y MU x NUM1 x NUM1,1 x NUM1,2 x DEN1,1 x DEN1,2 y MU 1.000 0.013 0.002 -0.002 0.004 -0.006 x NUM1 0.013 1.000 0.755 -0.447 0.089 -0.065 x NUM1,1 0.002 0.755 1.000 0.121 -0.538 0.565 x NUM1,2 -0.002 -0.447 0.121 1.000 -0.892 0.870 x DEN1,1 0.004 0.089 -0.538 -0.892 1.000 -0.998 x DEN1,2 -0.006 -0.065 0.565 0.870 -0.998 1.000

 The ARIMA Procedure

 Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 496.45 6 <.0001 0.893 0.711 0.502 0.312 0.167 0.064 12 498.58 12 <.0001 -0.003 -0.040 -0.054 -0.040 -0.022 -0.021 18 539.38 18 <.0001 -0.045 -0.083 -0.131 -0.170 -0.196 -0.195 24 561.87 24 <.0001 -0.163 -0.102 -0.026 0.047 0.106 0.142 30 585.90 30 <.0001 0.158 0.156 0.131 0.081 0.013 -0.037 36 592.42 36 <.0001 -0.048 -0.018 0.038 0.070 0.079 0.067 42 593.44 42 <.0001 0.042 0.025 0.013 0.004 0.006 0.019 48 601.94 48 <.0001 0.043 0.068 0.084 0.082 0.061 0.023

 The ARIMA Procedure

 Autocorrelation Plot of Residuals Lag Covariance Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` Std Error 0 0.704241 1.00000 `| |********************|` 0 1 0.628846 0.89294 `| . |****************** |` 0.058621 2 0.500490 0.71068 `| . |************** |` 0.094427 3 0.353404 0.50182 `| . |********** |` 0.111300 4 0.219895 0.31224 `| . |****** |` 0.118821 5 0.117330 0.16660 `| . |*** . |` 0.121608 6 0.044967 0.06385 `| . |* . |` 0.122390 7 -0.0023551 -.00334 `| . | . |` 0.122504 8 -0.028030 -.03980 `| . *| . |` 0.122505 9 -0.037891 -.05380 `| . *| . |` 0.122549 10 -0.028378 -.04030 `| . *| . |` 0.122630

 "." marks two standard errors

 Inverse Autocorrelations Lag Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` 1 -0.57346 `| ***********| . |` 2 0.02264 `| . | . |` 3 0.03631 `| . |*. |` 4 0.03941 `| . |*. |` 5 -0.01256 `| . | . |` 6 -0.01618 `| . | . |` 7 0.02680 `| . |*. |` 8 -0.05895 `| .*| . |` 9 0.07043 `| . |*. |` 10 -0.02987 `| .*| . |`

 The ARIMA Procedure

 Partial Autocorrelations Lag Correlation `-1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1` 1 0.89294 `| . |****************** |` 2 -0.42765 `| *********| . |` 3 -0.13463 `| ***| . |` 4 0.02199 `| . | . |` 5 0.03891 `| . |*. |` 6 -0.02219 `| . | . |` 7 -0.02249 `| . | . |` 8 0.01538 `| . | . |` 9 0.00634 `| . | . |` 10 0.07737 `| . |** |`

 Crosscorrelation Check of Residuals with Input x To Lag Chi-Square DF Pr > ChiSq Crosscorrelations 5 0.48 2 0.7855 -0.009 -0.005 0.026 0.013 -0.017 -0.022 11 0.93 8 0.9986 -0.006 0.008 0.022 0.023 -0.017 -0.013 17 2.63 14 0.9996 0.012 0.035 0.037 0.039 -0.005 -0.040 23 19.19 20 0.5092 -0.076 -0.108 -0.122 -0.122 -0.094 -0.041 29 20.12 26 0.7857 -0.039 -0.013 0.010 -0.020 -0.031 -0.005 35 24.22 32 0.8363 -0.022 -0.031 -0.074 -0.036 0.014 0.076 41 30.66 38 0.7953 0.108 0.091 0.046 0.018 0.003 0.009 47 31.65 44 0.9180 0.008 -0.011 -0.040 -0.030 -0.002 0.028

 Model for variable y Estimated Intercept 53.32237

 Input Number 1 Input Variable x Shift 3

 Numerator Factors Factor 1: -0.6287 - 0.47258 B**(1) - 0.7366 B**(2)

 Denominator Factors Factor 1: 1 - 0.15411 B**(1) - 0.27774 B**(2)

The ESTIMATE statement results for the final transfer function model with AR(2) noise are shown in Output 7.3.5.

Output 7.3.5: Estimates of the Final Model

 The ARIMA Procedure

 Conditional Least Squares Estimation Parameter Estimate Approx Std Error t Value Pr > |t| Lag Variable Shift MU 53.26307 0.11926 446.63 <.0001 0 y 0 AR1,1 1.53292 0.04754 32.25 <.0001 1 y 0 AR1,2 -0.63297 0.05006 -12.64 <.0001 2 y 0 NUM1 -0.53522 0.07482 -7.15 <.0001 0 x 3 NUM1,1 0.37602 0.10287 3.66 0.0003 1 x 3 NUM1,2 0.51894 0.10783 4.81 <.0001 2 x 3 DEN1,1 0.54842 0.03822 14.35 <.0001 1 x 3

 Constant Estimate 5.32937 Variance Estimate 0.058828 Std Error Estimate 0.242544 AIC 8.29281 SBC 34.0061 Number of Residuals 291

 * AIC and SBC do not include log determinant.

 Correlations of Parameter Estimates Variable Parameter y MU y AR1,1 y AR1,2 x NUM1 x NUM1,1 x NUM1,2 x DEN1,1 y MU 1.000 -0.063 0.047 -0.008 -0.016 0.017 -0.049 y AR1,1 -0.063 1.000 -0.927 -0.003 0.007 -0.002 0.015 y AR1,2 0.047 -0.927 1.000 0.023 -0.005 0.005 -0.022 x NUM1 -0.008 -0.003 0.023 1.000 0.713 -0.178 -0.013 x NUM1,1 -0.016 0.007 -0.005 0.713 1.000 -0.467 -0.039 x NUM1,2 0.017 -0.002 0.005 -0.178 -0.467 1.000 -0.720 x DEN1,1 -0.049 0.015 -0.022 -0.013 -0.039 -0.720 1.000

 The ARIMA Procedure

 Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations 6 8.61 4 0.0717 0.024 0.055 -0.073 -0.054 -0.054 0.119 12 15.43 10 0.1172 0.032 0.028 -0.081 0.047 0.022 0.107 18 21.13 16 0.1734 -0.038 0.052 -0.093 -0.013 -0.073 -0.005 24 27.52 22 0.1922 -0.118 -0.002 -0.007 0.076 0.024 -0.004 30 36.94 28 0.1202 0.034 -0.021 0.020 0.094 -0.118 0.065 36 44.26 34 0.1119 -0.025 -0.057 0.113 0.022 0.030 0.065 42 45.62 40 0.2500 -0.017 -0.036 -0.029 -0.013 -0.033 0.017 48 48.60 46 0.3689 0.024 0.069 0.024 0.017 0.022 -0.044

 Crosscorrelation Check of Residuals with Input x To Lag Chi-Square DF Pr > ChiSq Crosscorrelations 5 0.93 3 0.8191 0.008 0.004 0.010 0.008 -0.045 0.030 11 6.60 9 0.6784 0.075 -0.024 -0.019 -0.026 -0.111 0.013 17 13.86 15 0.5365 0.050 0.043 0.014 0.014 -0.141 -0.028 23 18.55 21 0.6142 -0.074 -0.078 0.023 -0.016 0.021 0.060 29 27.99 27 0.4113 -0.071 -0.001 0.038 -0.156 0.031 0.035 35 35.18 33 0.3654 -0.014 0.015 -0.039 0.028 0.046 0.142 41 37.15 39 0.5544 0.031 -0.029 -0.070 -0.006 0.012 -0.004 47 42.42 45 0.5818 0.036 -0.038 -0.053 0.107 0.029 0.021

 The ARIMA Procedure

 Model for variable y Estimated Intercept 53.26307

 Autoregressive Factors Factor 1: 1 - 1.53292 B**(1) + 0.63297 B**(2)

 Input Number 1 Input Variable x Shift 3

 Numerator Factors Factor 1: -0.5352 - 0.37602 B**(1) - 0.51894 B**(2)

 Denominator Factors Factor 1: 1 - 0.54842 B**(1)

 Chapter Contents Previous Next Top