Previous Page | Next Page

The MODEL Procedure

Analyzing the Structure of Large Models

PROC MODEL provides several features to aid in analyzing the structure of the model program. These features summarize properties of the model in various forms.

The following Klein’s model program is used to introduce the LISTDEP, BLOCK, and GRAPH options.

   proc model  out=m data=klein listdep graph block;
      endogenous c p w i x wsum k y;
      exogenous  wp g t year;
      parms c0-c3 i0-i3 w0-w3;
      a: c = c0 + c1 * p + c2 * lag(p) + c3 * wsum;
      b: i = i0 + i1 * p + i2 * lag(p) + i3 * lag(k);
      c: w = w0 + w1 * x + w2 * lag(x) + w3 * year;
      x = c + i + g;
      y = c + i + g-t;
      p = x-w-t;
      k = lag(k) + i;
      wsum = w + wp;
      id year;
   run;

Dependency List

The LISTDEP option produces a dependency list for each variable in the model program. For each variable, a list of variables that depend on it and a list of variables it depends on is given. The dependency list produced by the example program is shown in Figure 18.89.

Figure 18.89 A Portion of the LISTDEP Output for Klein’s Model
The MODEL Procedure

Dependency Listing For Program
Symbol----------- Dependencies
c Current values affect: RESID.c ERROR.c PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y
p Current values affect: PRED.c RESID.c ERROR.c PRED.i RESID.i ERROR.i RESID.p ERROR.p
  Lagged values affect: PRED.c PRED.i
w Current values affect: RESID.w ERROR.w PRED.p RESID.p ERROR.p PRED.wsum RESID.wsum ERROR.wsum
i Current values affect: RESID.i ERROR.i PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y PRED.k RESID.k ERROR.k
x Current values affect: PRED.w RESID.w ERROR.w RESID.x ERROR.x PRED.p RESID.p ERROR.p
  Lagged values affect: PRED.w
wsum Current values affect: PRED.c RESID.c ERROR.c RESID.wsum ERROR.wsum
k Current values affect: RESID.k ERROR.k
  Lagged values affect: PRED.i RESID.i ERROR.i PRED.k
y Current values affect: RESID.y ERROR.y
wp Current values affect: PRED.wsum RESID.wsum ERROR.wsum
g Current values affect: PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y
t Current values affect: PRED.y RESID.y ERROR.y PRED.p RESID.p ERROR.p
year Current values affect: PRED.w RESID.w ERROR.w
c0 Current values affect: PRED.c RESID.c ERROR.c
c1 Current values affect: PRED.c RESID.c ERROR.c
c2 Current values affect: PRED.c RESID.c ERROR.c
c3 Current values affect: PRED.c RESID.c ERROR.c
i0 Current values affect: PRED.i RESID.i ERROR.i
i1 Current values affect: PRED.i RESID.i ERROR.i
i2 Current values affect: PRED.i RESID.i ERROR.i
i3 Current values affect: PRED.i RESID.i ERROR.i
w0 Current values affect: PRED.w RESID.w ERROR.w
w1 Current values affect: PRED.w RESID.w ERROR.w
w2 Current values affect: PRED.w RESID.w ERROR.w
w3 Current values affect: PRED.w RESID.w ERROR.w
PRED.c Depends on current values of: p wsum c0 c1 c2 c3
  Depends on lagged values of: p
  Current values affect: RESID.c ERROR.c
RESID.c Depends on current values of: PRED.c c p wsum c0 c1 c2 c3
ERROR.c Depends on current values of: PRED.c c p wsum c0 c1 c2 c3
ACTUAL.c Current values affect: RESID.c ERROR.c PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y
PRED.i Depends on current values of: p i0 i1 i2 i3
  Depends on lagged values of: p k
  Current values affect: RESID.i ERROR.i
RESID.i Depends on current values of: PRED.i p i i0 i1 i2 i3
  Depends on lagged values of: k
ERROR.i Depends on current values of: PRED.i p i i0 i1 i2 i3
  Depends on lagged values of: k
ACTUAL.i Current values affect: RESID.i ERROR.i PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y PRED.k RESID.k ERROR.k
PRED.w Depends on current values of: x year w0 w1 w2 w3
  Depends on lagged values of: x
  Current values affect: RESID.w ERROR.w
RESID.w Depends on current values of: PRED.w w x year w0 w1 w2 w3
ERROR.w Depends on current values of: PRED.w w x year w0 w1 w2 w3
ACTUAL.w Current values affect: RESID.w ERROR.w PRED.p RESID.p ERROR.p PRED.wsum RESID.wsum ERROR.wsum
PRED.x Depends on current values of: c i g
  Current values affect: RESID.x ERROR.x
RESID.x Depends on current values of: PRED.x c i x g
ERROR.x Depends on current values of: PRED.x c i x g
ACTUAL.x Current values affect: PRED.w RESID.w ERROR.w RESID.x ERROR.x PRED.p RESID.p ERROR.p
  Lagged values affect: PRED.w
PRED.y Depends on current values of: c i g t
  Current values affect: RESID.y ERROR.y
RESID.y Depends on current values of: PRED.y c i y g t
ERROR.y Depends on current values of: PRED.y c i y g t
ACTUAL.y Current values affect: RESID.y ERROR.y
PRED.p Depends on current values of: w x t
  Current values affect: RESID.p ERROR.p
RESID.p Depends on current values of: PRED.p p w x t
ERROR.p Depends on current values of: PRED.p p w x t
ACTUAL.p Current values affect: PRED.c RESID.c ERROR.c PRED.i RESID.i ERROR.i RESID.p ERROR.p
  Lagged values affect: PRED.c PRED.i
PRED.k Depends on current values of: i
  Depends on lagged values of: k
  Current values affect: RESID.k ERROR.k
RESID.k Depends on current values of: PRED.k i k
ERROR.k Depends on current values of: PRED.k i k
ACTUAL.k Current values affect: RESID.k ERROR.k
  Lagged values affect: PRED.i RESID.i ERROR.i PRED.k
PRED.wsum Depends on current values of: w wp
  Current values affect: RESID.wsum ERROR.wsum
RESID.wsum Depends on current values of: PRED.wsum w wsum wp
ERROR.wsum Depends on current values of: PRED.wsum w wsum wp
ACTUAL.wsum Current values affect: PRED.c RESID.c ERROR.c RESID.wsum ERROR.wsum

BLOCK Listing

The BLOCK option prints an analysis of the program variables based on the assignments in the model program. The output produced by the example is shown in Figure 18.90.

Figure 18.90 The BLOCK Output for Klein’s Model
The MODEL Procedure
Model Structure Analysis
(Based on Assignments to Endogenous Model Variables)

Exogenous Variables wp g t year
Endogenous Variables c p w i x wsum k y

Block Structure of the System
Block 1 c p w i x wsum

Dependency Structure of the System
Block 1 Depends On All_Exogenous
k Depends On Block 1 All_Exogenous
y Depends On Block 1 All_Exogenous

One use for the block output is to put a model in recursive form. Simulations of the model can be done with the SEIDEL method, which is efficient if the model is recursive and if the equations are in recursive order. By examining the block output, you can determine how to reorder the model equations for the most efficient simulation.

Adjacency Graph

The GRAPH option displays the same information as the BLOCK option with the addition of an adjacency graph. An X in a column in an adjacency graph indicates that the variable associated with the row depends on the variable associated with the column. The output produced by the example is shown in Figure 18.91.

The first and last graphs are straightforward. The middle graph represents the dependencies of the nonexogenous variables after transitive closure has been performed (that is, A depends on B, and B depends on C, so A depends on C). The preceding transitive closure matrix indicates that K and Y do not directly or indirectly depend on each other.

Figure 18.91 The GRAPH Output for Klein’s Model
Adjacency Matrix for Graph of System
Variable   c p w i x wsum k y wp g t year
                    * * * *
c   X X . . . X . . . . . .
p   . X X . X . . . . . X .
w   . . X . X . . . . . . X
i   . X . X . . . . . . . .
x   X . . X X . . . . X . .
wsum   . . X . . X . . X . . .
k   . . . X . . X . . . . .
y   X . . X . . . X . X X .
wp * . . . . . . . . X . . .
g * . . . . . . . . . X . .
t * . . . . . . . . . . X .
year * . . . . . . . . . . . X

(Note: * = Exogenous Variable.)


Transitive Closure Matrix of Sorted System
Block Variable   c p w i x wsum k y
1 c   X X X X X X . .
1 p   X X X X X X . .
1 w   X X X X X X . .
1 i   X X X X X X . .
1 x   X X X X X X . .
1 wsum   X X X X X X . .
  k   X X X X X X X .
  y   X X X X X X . X

Adjacency Matrix for Graph of System Including Lagged Impacts
Block Variable   c p w i x wsum k y wp g t year
                      * * * *
1 c   X L . . . X . . . . . .
1 p   . X X . X . . . . . X .
1 w   . . X . L . . . . . . X
1 i   . L . X . . L . . . . .
1 x   X . . X X . . . . X . .
1 wsum   . . X . . X . . X . . .
  k   . . . X . . L . . . . .
  y   X . . X . . . X . X X .
  wp * . . . . . . . . X . . .
  g * . . . . . . . . . X . .
  t * . . . . . . . . . . X .
  year * . . . . . . . . . . . X

(Note: * = Exogenous Variable.)


Previous Page | Next Page | Top of Page