Chapter Contents Previous Next
 The STATESPACE Procedure

## Example 18.1: Series J from Box and Jenkins

This example analyzes the gas furnace data (series J) from Box and Jenkins. (The data are not shown. Refer to Box and Jenkins (1976) for the data.)

First, a model is selected and fit automatically using the following statements.

```   title1 'Gas Furnace Data';
title2 'Box & Jenkins Series J';
title3 'Automatically Selected Model';

proc statespace data=seriesj cancorr;
var x y;
run;
```

The results for the automatically selected model are shown in Output 18.1.1.

Output 18.1.1: Results for Automatically Selected Model

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure

 Number of Observations 296

 Variable Mean Standard Error x -0.05683 1.072766 y 53.50912 3.202121

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure

 Information Criterion for Autoregressive Models Lag=0 Lag=1 Lag=2 Lag=3 Lag=4 Lag=5 Lag=6 Lag=7 Lag=8 Lag=9 Lag=10 651.3862 -1033.57 -1632.96 -1645.12 -1651.52 -1648.91 -1649.34 -1643.15 -1638.56 -1634.8 -1633.59

 Schematic Representation of Correlations Name/Lag 0 1 2 3 4 5 6 7 8 9 10 x +- +- +- +- +- +- +- +- +- +- +- y -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ + is > 2*std error,  - is < -2*std error,  . is between

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure

 Schematic Representation of PartialAutocorrelations Name/Lag 1 2 3 4 5 6 7 8 9 10 x +. -. +. .. .. -. .. .. .. .. y -+ -- -. .+ .. .. .. .. .. .+ + is > 2*std error,  - is < -2*std error,  . is between

 Yule-Walker Estimates for Minimum AIC Lag=1 Lag=2 Lag=3 Lag=4 x y x y x y x y x 1.925887 -0.00124 -1.20166 0.004224 0.116918 -0.00867 0.104236 0.003268 y 0.050496 1.299793 -0.02046 -0.3277 -0.71182 -0.25701 0.195411 0.133417

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure Canonical Correlations Analysis

 x(T;T) y(T;T) x(T+1;T) Information Criterion Chi Square DF 1 1 0.804883 292.9228 304.7481 8

 x(T;T) y(T;T) x(T+1;T) y(T+1;T) Information Criterion Chi Square DF 1 1 0.906681 0.607529 122.3358 134.7237 7

 x(T;T) y(T;T) x(T+1;T) y(T+1;T) x(T+2;T) Information Criterion Chi Square DF 1 1 0.909434 0.610278 0.186274 -1.54701 10.34705 6

 x(T;T) y(T;T) x(T+1;T) y(T+1;T) y(T+2;T) Information Criterion Chi Square DF 1 1 0.91014 0.618937 0.206823 0.940392 12.80924 6

 x(T;T) y(T;T) x(T+1;T) y(T+1;T) y(T+2;T) y(T+3;T) Information Criterion Chi Square DF 1 1 0.912963 0.628785 0.226598 0.083258 -7.94103 2.041584 5

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure Selected Statespace Form and Preliminary Estimates

 State Vector x(T;T) y(T;T) x(T+1;T) y(T+1;T) y(T+2;T)

 Estimate of Transition Matrix 0 0 1 0 0 0 0 0 1 0 -0.84718 0.026794 1.711715 -0.05019 0 0 0 0 0 1 -0.19785 0.334274 -0.18174 -1.23557 1.787475

 Input Matrix for Innovation 1 0 0 1 1.925887 -0.00124 0.050496 1.299793 0.142421 1.361696

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure Selected Statespace Form and Preliminary Estimates

 Variance Matrix for Innovation 0.035274 -0.00734 -0.00734 0.097569

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure Selected Statespace Form and Fitted Model

 State Vector x(T;T) y(T;T) x(T+1;T) y(T+1;T) y(T+2;T)

 Estimate of Transition Matrix 0 0 1 0 0 0 0 0 1 0 -0.86192 0.030609 1.724235 -0.05483 0 0 0 0 0 1 -0.34839 0.292124 -0.09435 -1.09823 1.671418

 Input Matrix for Innovation 1 0 0 1 1.92442 -0.00416 0.015621 1.258495 0.08058 1.353204

 Gas Furnace Data Box & Jenkins Series J Automatically Selected Model

 The STATESPACE Procedure Selected Statespace Form and Fitted Model

 Variance Matrix for Innovation 0.035579 -0.00728 -0.00728 0.095577

 Parameter Estimates Parameter Estimate Standard Error t Value F(3,1) -0.86192 0.072961 -11.81 F(3,2) 0.030609 0.026167 1.17 F(3,3) 1.724235 0.061599 27.99 F(3,4) -0.05483 0.030169 -1.82 F(5,1) -0.34839 0.135253 -2.58 F(5,2) 0.292124 0.046299 6.31 F(5,3) -0.09435 0.096527 -0.98 F(5,4) -1.09823 0.109525 -10.03 F(5,5) 1.671418 0.083737 19.96 G(3,1) 1.924420 0.058162 33.09 G(3,2) -0.00416 0.035255 -0.12 G(4,1) 0.015621 0.095771 0.16 G(4,2) 1.258495 0.055742 22.58 G(5,1) 0.080580 0.151622 0.53 G(5,2) 1.353204 0.091388 14.81

The two series are believed to have a transfer function relation with the gas rate (variable X) as the input and the CO2 concentration (variable Y) as the output. Since the parameter estimates shown in Output 18.1.1 support this kind of model, the model is reestimated with the feedback parameters restricted to 0. The following statements fit the transfer function (no feedback) model.

```   title3 'Transfer Function Model';
proc statespace data=seriesj printout=none;
var x y;
restrict f(3,2)=0 f(3,4)=0
g(3,2)=0 g(4,1)=0 g(5,1)=0;
run;
```

The last 2 pages of the output are shown in Output 18.1.2.

Output 18.1.2: STATESPACE Output for Transfer Function Model

 Gas Furnace Data Box & Jenkins Series J Transfer Function Model

 The STATESPACE Procedure Selected Statespace Form and Fitted Model

 State Vector x(T;T) y(T;T) x(T+1;T) y(T+1;T) y(T+2;T)

 Estimate of Transition Matrix 0 0 1 0 0 0 0 0 1 0 -0.68882 0 1.598717 0 0 0 0 0 0 1 -0.35944 0.284179 -0.0963 -1.07313 1.650047

 Input Matrix for Innovation 1 0 0 1 1.923446 0 0 1.260856 0 1.346332

 Gas Furnace Data Box & Jenkins Series J Transfer Function Model

 The STATESPACE Procedure Selected Statespace Form and Fitted Model

 Variance Matrix for Innovation 0.036995 -0.0072 -0.0072 0.095712

 Parameter Estimates Parameter Estimate Standard Error t Value F(3,1) -0.68882 0.050549 -13.63 F(3,3) 1.598717 0.050924 31.39 F(5,1) -0.35944 0.229044 -1.57 F(5,2) 0.284179 0.096944 2.93 F(5,3) -0.09630 0.140876 -0.68 F(5,4) -1.07313 0.250385 -4.29 F(5,5) 1.650047 0.188533 8.75 G(3,1) 1.923446 0.056328 34.15 G(4,2) 1.260856 0.056464 22.33 G(5,2) 1.346332 0.091086 14.78

 Chapter Contents Previous Next Top