SEM with SAS Proc Calis

This lesson will use the same data used in the earlier lesson, SEM With Amos: Ski Satisfaction.

Copy and paste this code into the SAS editor and run it.

options formdlim='-' nodate pagno=min;

data ski(type=cov);

INPUT _TYPE_ $ _NAME_ $ NumYrs DaySki SnowSat FoodSat SenSeek;

CARDS;

N . 100 100 100 100 100

cov NumYrs 2.74 . . . .

cov DaySki 0.80 3.25 . . .

cov SnowSat 0.68 0.28 1.23 . .

cov FoodSat 0.65 0.35 0.72 1.87 .

cov SenSeek 2.02 2.12 2.10 2.12 27.00

proc calis cov omethod=nr pAll;

LINEQS

NumYrs = b1 F1 + E1,

DaySki = b2 F1 + E2,

SnowSat = 1 F2 + E3,

FoodSat = b4 F2 + E4,

F2 = b5 F1 + b6 SenSeek + D2;

STD

E1-E4 = v1-v4,

SenSeek=v5,

D2=v6,

F1=1;

run;

Notice that the input variance/covariance matrix is included in the program.

The “cov” option indicates that the variance/covariance matrix is to be analyzed (rather than the correlation matrix, even if the input data is a correlation matrix); “omethod=nr” requests that the Newton-Raphson optimization technique be employed (just think of this as the particular type of magic that is used to reach the solution) ;“pAll” command results in all available output being printed.

The “LINEQS” command indicates that the model will be specified with linear equations that follow.

·  “NumYrs = b1 F1 + E1,” specifies that NumYrs is related to the first factor (F1, LoveSki) by the regression coefficient b1, which is to be estimated. E1 is the error.

·  “DaySki = b2 F1 + E2,” relates DaySki to F1 with coefficient b2,

·  “SnowSat = 1 F2 + E3,” relates SnowSat to F2 (SkiSat) and fixes the coefficient to 1.

·  “FoodSat = b4 F2 + E4,” relates FoodSat to F2 with coefficient b4.

·  “F2 = b5 F1 + b6 SenSeek + D2;” relates F2 to F1 with coefficient b5 and to SenSeek with coefficient b6. D2 is the disturbance.

Under “STD” the variance parameters are defined.

·  “E1-E4 = v1-v4,” declares the error variances as parameters to be estimated.

·  “SenSeek=v5,” declares the variance of SenSeek as a parameter to be estimated.

·  “D2=v6,” declares the disturbance of SkiSat to be a parameter to be estimated.

·  “F1=1;” fixes the variance of LoveSki to 1.

The extensive output includes most of the statistics included in the output produced by AMOS. Do note that the Wald test is available in SAS, but not in AMOS.

·  Return to Wuensch’s Stats Lessons Page

·  Annotated output

·  An Introduction to Structural Equation Modeling (SEM)

·  SEM with AMOS

·  Introduction to SEM with SAS

Karl L. Wuensch
Dept. of Psychology, East Carolina University, Greenville, NC USA
October, 2013