calisgfi Produce a readable display of CALIS GFI statistics calisgfi

SAS Macro Programs: calisgfi

$Version: 1.0-1 (11 Dec 2001)
Michael Friendly
York University


The calisgfi macro ( [download] get calisgfi.sas)

Produce a readable display of CALIS GFI statistics

PROC CALIS, like other structural equation model software, produces a table of goodness of fit statistics that is hard to read because it simply presents a long list of many statistics without any structure. The CALISGFI macro takes an OUTRAM= data set from PROC CALIS, extracts the goodness-of-fit statistics, and produces a more easily understood version.

Method

Very ugly contortions are used to extract and reform the statistics from the OUTRAM data set. The main innovation here is to group and relabel the plethora of fit statistics into coherent categories. This macro was written before ODS was available. I'm not sure if ODS would make this any easier.

Usage

The CALISGFI macro is defined with keyword parameters. The RAM= parameter is required. The arguments may be listed within parentheses in any order, separated by commas. For example:

  %calisgfi(ram=ram1, nv=5);

Parameters

RAM=
Name of the OUTRAM= data set from PROC CALIS
NV=
Number of observed variables in the model. This is needed to calculate the DF for the null model, because it doesn't appear in the OUTRAM= data set.
OUT=
Name of output data set
VERBOSE=
0 or 1. Mainly for testing/debugging.

Example

The following lines read a covariance matrix of four variables, X1, X2, Y1, Y2, and fit a two-factor model, capturing the GFI statistics in an OUTRAM= dataset, RAM4, which is input to the CALISGFI macro.

  data lord(type=cov);
     input _type_ $ _name_ $  x1 x2 y1 y2;
  cards;
  n   .  649       .       .       .
  cov x1 86.3937   .       .       .
  cov x2 57.7751 86.2632   .       .
  cov y1 56.8651 59.3177 97.2850   .
  cov y2 58.8986 59.6683 73.8201 97.8192
  ;
  title "Lord's data: H4- unconstrained two-factor model";
  proc calis data=lord cov noprint outram=ram4;
     lineqs  x1 = beta1 F1  + e1,
              x2 = beta2 F1  + e2,
              y1 = beta3 F2  + e3,
              y2 = beta4 F2  + e4;
     std  F1 F2 = 1,
           e1 e2 e3 e4 = ve1 ve2 ve3 ve4;
     cov  F1 F2 = rho;
  run;
  %include macros(calisgfi);        *-- or include in an autocall library;
  %calisgfi(ram=ram4, nv=4);
Output:
              Model Information

Sample size                                        649
Number of parameters                                 9
Number of active constraints                         0
Null Model Chi-Square (df=6)                  1466.590  (Pr>ChiSq= 0.000)

              Absolute Indices

Fit Function                                  0.001085
Goodness of Fit Index                            0.999
Root Mean Square Residual                        0.272
Chi-Square (df=1)                                0.703  (Pr>ChiSq= 0.402)
Normal Theory Reweighted LS Chi-Square (df=1)    0.703  (Pr>ChiSq= 0.402)
Z-Test for Chi-Square (df=1)                     0.236  (Pr>ChiSq= 0.407)
Critical N                                        3542

              Absolute, Adjusted for Parsimony

GFI Adjusted for Degrees of Freedom              0.995
Parsimonious GFI                                 0.167
RMS Error of Approx Estimate (RMSEA)             0.000  90% CI: ( .  ,0.097)
Probability of Close Fit [Pr(RMSEA <= 0.05)]     0.685
Expected Cross Validation Index (ECVI)           0.029  90% CI: ( .  ,0.039)
Akaike's Information Criterion                  -1.297
Consistent AIC                                  -6.772
Schwarz's Bayesian Criterion                    -5.772
Centrality Index                                     1

              Incremental Indices (vs. Null Model)

Comparative Fit Index                                1
Non-normed Index (Rho)                               1
Normed Fit Index (NFI)                               1
Parsimonious NFI                                 0.167
Normed Index Rho1                                0.997
Non-normed Index Delta2                              1

See also

caliscmp Compare model fits from PROC CALIS
csmpower Power estimation for Covariance Structure Models