Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Introduction to Structural Equations with Latent Variables

Path Diagrams and the RAM Model

Complicated models are often easier to understand when they are expressed as path diagrams. One advantage of path diagrams over equations is that variances and covariances can be shown directly in the path diagram. Loehlin (1987) provides a detailed discussion of path diagrams.

It is customary to write the names of manifest variables in rectangles and names of latent variables in ovals. The coefficients in each equation are indicated by drawing arrows from the independent variables to the dependent variable. Covariances between exogenous variables are drawn as two-headed arrows. The variance of an exogenous variable can be displayed as a two-headed arrow with both heads pointing to the exogenous variable, since the variance of a variable is the covariance of the variable with itself. Here is a path diagram for the spleen data, explicitly showing all latent variables and variances of exogenous variables.

icaf1.gif (2295 bytes)

Figure 14.5: Path Diagram: Spleen

There is an easier way to draw the path diagram based on McArdle's reticular action model (RAM) (McArdle and McDonald 1984). McArdle uses the convention that a two-headed arrow that points to an endogenous variable actually refers to the error or disturbance term associated with that variable. A two-headed arrow with both heads pointing to the same endogenous variable represents the error or disturbance variance for the equation that determines the endogenous variable; there is no need to draw a separate oval for the error or disturbance term. Similarly, a two-headed arrow connecting two endogenous variables represents the covariance between the error of disturbance terms associated with the endogenous variables. The RAM conventions allow the previous path diagram to be simplified, as follows.

icaf2.gif (1639 bytes)

Figure 14.6: Path Diagram: Spleen

The RAM statement in PROC CALIS provides a simple way to transcribe a path diagram based on the reticular action model. Assign the integers 1, 2, 3,... to the variables in the order in which they appear in the SAS data set or in the VAR statement, if you use one. Assign subsequent consecutive integers to the latent variables displayed explicitly in the path diagram (excluding the error and disturbance terms implied by two-headed arrows) in any order. Each arrow in the path diagram can then be identified by two numbers indicating the variables connected by the path. The RAM statement consists of a list of descriptions of all the arrows in the path diagram. The descriptions are separated by commas. Each arrow description consists of three or four numbers and, optionally, a name in the following order:

  1. The number of heads the arrow has.
  2. The number of the variable the arrow points to, or either variable if the arrow is two-headed.
  3. The number of the variable the arrow comes from, or the other variable if the arrow is two-headed.
  4. The value of the coefficient or (co)variance that the arrow represents.

  5. A name if the arrow represents a parameter to be estimated, in which case the previous number is taken to be the initial estimate of the parameter. Omit the name if the arrow represents a constant. If you specify a name, the fourth number may be omitted.

The model for the spleen data can be specified with the RAM statement, as follows:

       /* 1 sqrtrose  */
       /* 2 sqrtnucl  */
       /* 3 factrose  */
       /* 4 factnucl  */
   proc calis data=spleen cov stderr method=ml outram=splram1;
      var sqrtrose sqrtnucl;
      ram 1 1 3 1,         /* sqrtrose <- factrose */
          1 2 4 1,         /* sqrtnucl <- factnucl */
          1 3 4 beta,      /* factrose <- factnucl */
          2 1 1 .25,       /* error variance for sqrtrose */
          2 2 2 .25,       /* error variance for sqrtnucl */
          2 3 3 v_dist,  /* disturbance variance for factrose */
          2 4 4 v_factnu;    /* variance of factnucl */
   run;

The resulting output in RAM form is displayed in Figure 14.7.

The CALIS Procedure
Covariance Structure Analysis: Maximum Likelihood Estimation

RAM Estimates
Term Matrix Row Column Parameter Estimate Standard
Error
t Value
1 2 sqrtrose 1 F1 3 . 1.00000    
1 2 sqrtnucl 2 F2 4 . 1.00000    
1 2 F1 3 F2 4 beta 0.39074 0.07708 5.07
1 3 E1 1 E1 1 . 0.25000    
1 3 E2 2 E2 2 . 0.25000    
1 3 D1 3 D1 3 v_dist 0.38153 0.28556 1.34
1 3 D2 4 D2 4 v_factnu 10.50458 4.58577 2.29

Figure 14.7: Spleen Data: RAM Model

You can request an output data set containing the model specification by using the OUTRAM= option in the PROC CALIS statement. Names for the latent variables can be specified in a VNAMES statement.

   proc calis data=spleen cov stderr method=ml outram=splram1;
      var sqrtrose sqrtnucl;
      vnames 1 factrose factnucl,
             2 err_rose err_nucl disturb factnucl;
      ram 1 1 3 1,         /* sqrtrose <- factrose */
          1 2 4 1,         /* sqrtnucl <- factnucl */
          1 3 4 beta,      /* factrose <- factnucl */
          2 1 1 .25,       /* error variance for sqrtrose */


          2 2 2 .25,       /* error variance for sqrtnucl */
          2 3 3 v_dist,    /* disturbance variance for factrose */
          2 4 4 v_factnu;  /* variance of factnucl */
   run;

   proc print;
   run;

The RAM output is displayed in Figure 14.8.

The CALIS Procedure
Covariance Structure Analysis: Maximum Likelihood Estimation

RAM Estimates
Term Matrix Row Column Parameter Estimate Standard
Error
t Value
1 2 sqrtrose 1 factrose 3 . 1.00000    
1 2 sqrtnucl 2 factnucl 4 . 1.00000    
1 2 factrose 3 factnucl 4 beta 0.39074 0.07708 5.07
1 3 err_rose 1 err_rose 1 . 0.25000    
1 3 err_nucl 2 err_nucl 2 . 0.25000    
1 3 disturb 3 disturb 3 v_dist 0.38153 0.28556 1.34
1 3 factnucl 4 factnucl 4 v_factnu 10.50458 4.58577 2.29

Figure 14.8: Spleen Data: RAM Model with Names for Latent Variables

The OUTRAM= data set contains the RAM model as you specified it in the RAM statement, but it contains the final parameter estimates and standard errors instead of the initial values.

Obs _TYPE_ _NAME_ _MATNR_ _ROW_ _COL_ _ESTIM_ _STDERR_
1 MODEL _IDE_ 1 2 4 1.0000 0.00000
2 MODEL _A_ 2 4 4 6.0000 2.00000
3 MODEL _P_ 3 4 4 3.0000 0.00000
4 VARNAME sqrtrose 2 . 1 . .
5 VARNAME sqrtnucl 2 . 2 . .
6 VARNAME factrose 2 . 3 . .
7 VARNAME factnucl 2 . 4 . .
8 VARNAME err_rose 3 . 1 . .
9 VARNAME err_nucl 3 . 2 . .
10 VARNAME disturb 3 . 3 . .
11 VARNAME factnucl 3 . 4 . .
12 METHOD ML . . . . .
13 STAT N . . . 12.0000 .
14 STAT FIT . . . 0.0000 .
15 STAT GFI . . . 1.0000 .
16 STAT AGFI . . . . .
17 STAT RMR . . . 0.0000 .
18 STAT PGFI . . . 0.0000 .
19 STAT NPARM . . . 3.0000 .
20 STAT DF . . . 0.0000 .
21 STAT N_ACT . . . 0.0000 .
22 STAT CHISQUAR . . . 0.0000 .
23 STAT P_CHISQ . . . 0.0000 .
24 STAT CHISQNUL . . . 13.2732 .
25 STAT RMSEAEST . . . 0.0000 .
26 STAT RMSEALOB . . . . .
27 STAT RMSEAUPB . . . . .
28 STAT P_CLOSFT . . . . .
29 STAT ECVI_EST . . . 0.7500 .
30 STAT ECVI_LOB . . . . .
31 STAT ECVI_UPB . . . . .
32 STAT COMPFITI . . . 1.0000 .
33 STAT ADJCHISQ . . . . .
34 STAT P_ACHISQ . . . . .
35 STAT RLSCHISQ . . . 0.0000 .
36 STAT AIC . . . 0.0000 .
37 STAT CAIC . . . 0.0000 .
38 STAT SBC . . . 0.0000 .
39 STAT CENTRALI . . . 1.0000 .
40 STAT BB_NONOR . . . . .
41 STAT BB_NORMD . . . 1.0000 .
42 STAT PARSIMON . . . 0.0000 .
43 STAT ZTESTWH . . . . .
44 STAT BOL_RHO1 . . . . .
45 STAT BOL_DEL2 . . . 1.0000 .
46 STAT CNHOELT . . . . .
47 ESTIM   2 1 3 1.0000 0.00000
48 ESTIM   2 2 4 1.0000 0.00000
49 ESTIM beta 2 3 4 0.3907 0.07708
50 ESTIM   3 1 1 0.2500 0.00000
51 ESTIM   3 2 2 0.2500 0.00000
52 ESTIM v_dist 3 3 3 0.3815 0.28556
53 ESTIM v_factnu 3 4 4 10.5046 4.58577

Figure 14.9: Spleen Data: OUTRAM= Data Set with Final Parameter Estimates

This data set can be used as input to another run of PROC CALIS with the INRAM= option in the PROC CALIS statement. For example, if the iteration limit is exceeded, you can use the RAM data set to start a new run that begins with the final estimates from the last run. Or you can change the data set to add or remove constraints or modify the model in various other ways. The easiest way to change a RAM data set is to use the FSEDIT procedure, but you can also use a DATA step. For example, you could set the variance of the disturbance term to zero, effectively removing the disturbance from the equation, by removing the parameter name v_dist in the _NAME_ variable and setting the value of the estimate to zero in the _ESTIM_ variable:

   data splram2(type=ram);
      set splram1;
      if _name_='v_dist' then
         do;
            _name_=' ';
            _estim_=0;
         end;
   run;

   proc calis data=spleen inram=splram2 cov stderr;
   run;

The resulting RAM output is displayed in Figure 14.10.

The CALIS Procedure
Covariance Structure Analysis: Maximum Likelihood Estimation

RAM Estimates
Term Matrix Row Column Parameter Estimate Standard
Error
t Value
1 2 sqrtrose 1 factrose 3 . 1.00000    
1 2 sqrtnucl 2 factnucl 4 . 1.00000    
1 2 factrose 3 factnucl 4 beta 0.40340 0.05078 7.94
1 3 err_rose 1 err_rose 1 . 0.25000    
1 3 err_nucl 2 err_nucl 2 . 0.25000    
1 3 disturb 3 disturb 3 . 0    
1 3 factnucl 4 factnucl 4 v_factnu 10.45846 4.56608 2.29

Figure 14.10: Spleen Data: RAM Model with INRAM= Data Set

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.