ARIMA Procedure

Example 7.3 Model for Series J Data from Box and Jenkins

(View the complete code for this example.)

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 analyzed; then, the full model, transfer function and noise, is fit to the data.

The following statements read Input Gas Rate and Output COSubscript 2 from a gas furnace. (Data values are not shown. The full example including data is in the SAS/ETS sample library.)

title1 'Gas Furnace Data';
title2 '(Box and Jenkins, Series J)';
data seriesj;
   input x y @@;
   label x = 'Input Gas Rate'
         y = 'Output CO2';
datalines;
-0.109  53.8  0.000  53.6  0.178  53.5  0.339  53.5

   ... more lines ...   

The following statements produce Output 7.3.1 through Output 7.3.11:

proc arima data=seriesj;

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

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

   /*--- Cross-correlation of prewhitened series ---------------*/
   identify var=y crosscorr=(x) nlag=12;
   run;

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

   /*--- Final Model - look at residuals ----------------------*/
   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. The correlation analysis suggests an AR(3) model.

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 Deviation1.070952
Number of Observations296


Output 7.3.2: IDENTIFY Statement Results for X: Trend and Correlation

IDENTIFY Statement Results for X: Trend and Correlation


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

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

Conditional Least Squares Estimation
ParameterEstimateStandard
Error
t ValueApprox
Pr > |t|
Lag
MU-0.122800.10902-1.130.26090
AR1,11.976070.0549935.94<.00011
AR1,2-1.374990.09967-13.80<.00012
AR1,30.343360.055026.24<.00013

Constant Estimate-0.00682
Variance Estimate0.035797
Std Error Estimate0.1892
AIC-141.667
SBC-126.906
Number of Residuals296


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 are shown in Output 7.3.4, Output 7.3.5, Output 7.3.6, and Output 7.3.7. 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.4: Summary Table: Y Cross-Correlated with X

Correlation of y and x
Number of Observations296
Variance of transformed series y0.131438
Variance of transformed series x0.035357

Both series have been prewhitened.



Output 7.3.5: Prewhitening Filter

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


Output 7.3.6: IDENTIFY Statement Results for Y: Trend and Correlation

IDENTIFY Statement Results for Y: Trend and Correlation


Output 7.3.7: IDENTIFY Statement for Y Cross-Correlated with X

IDENTIFY Statement for Y Cross-Correlated with X


The ESTIMATE statement results for the transfer function model with no structure on the noise term are shown in Output 7.3.8, Output 7.3.9, and Output 7.3.10.

Output 7.3.8: Estimation Output of the First Transfer Function Model

Conditional Least Squares Estimation
ParameterEstimateStandard
Error
t ValueApprox
Pr > |t|
LagVariableShift
MU53.322560.049261082.51<.00010y0
NUM1-0.564670.22405-2.520.01230x3
NUM1,10.426230.464720.920.35981x3
NUM1,20.299140.355060.840.40022x3
DEN1,10.600730.0410114.65<.00011x3

Constant Estimate53.32256
Variance Estimate0.702625
Std Error Estimate0.838227
AIC728.0754
SBC746.442
Number of Residuals291


Output 7.3.9: Model Summary: First Transfer Function Model

Model for variable y
Estimated Intercept53.32256

Input Number 1
Input Variablex
Shift3

Numerator Factors
Factor 1: -0.5647 - 0.42623 B**(1) - 0.29914 B**(2)

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


Output 7.3.10: Residual Analysis: First Transfer Function Model

Residual Analysis: First Transfer Function Model


The residual correlation analysis suggests an AR(2) model for the noise part of the model. The ESTIMATE statement results for the final transfer function model with AR(2) noise are shown in Output 7.3.11.

Output 7.3.11: Estimation Output of the Final Model

Conditional Least Squares Estimation
ParameterEstimateStandard
Error
t ValueApprox
Pr > |t|
LagVariableShift
MU53.263040.11929446.48<.00010y0
AR1,11.532910.0475432.25<.00011y0
AR1,2-0.632970.05006-12.64<.00012y0
NUM1-0.535220.07482-7.15<.00010x3
NUM1,10.376030.102873.660.00031x3
NUM1,20.518950.107834.81<.00012x3
DEN1,10.548410.0382214.35<.00011x3

Constant Estimate5.329425
Variance Estimate0.058828
Std Error Estimate0.242544
AIC8.292809
SBC34.00607
Number of Residuals291


Output 7.3.12: Residual Analysis of the Final Model

Residual Analysis of the Final Model


Output 7.3.13: Model Summary of the Final Model

Model for variable y
Estimated Intercept53.26304

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

Input Number 1
Input Variablex
Shift3

Numerator Factors
Factor 1: -0.5352 - 0.37603 B**(1) - 0.51895 B**(2)

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


Last updated: June 19, 2025