Quick guide for comparing groups in  structural equation modeling.  Could compare correlation (covariance) matrices but here we are comparing two parameters (regression coefficients) between males and females.  The overall model we start with here comes from the final run of the mediation guide where it was shown that factor 2 “work effort” is shown to account for a significant level.

Merle Canfield

Before any runs the data file must be split into to files – one for female data and another for male data.  Split the file by first saving the full file into one identified and male and the other identified as female.  Then for each file select male or female in the following manner.

Saving female (female was coded as 1.0 in the original file) database.

Save the male data set in a similar manner selecting gendern =2.0.

Then using the EDS file (above from the mediation example) generate runs on both the female and male data set.  Each time you save the EQX file into and EQS file.  The EQS file is then a syntax file that can be modified which needs to be done when comparing groups.  Save both the female EQS file into a single EQS file.  That file is listed below with the changes is RED that need to be changed to compare the two parameters in question.  These parameters are: (1) factor 2 to factor 1, and (2) factor 3 to factor 1.  The question being answered is: are these two parameters the same or different for the two groups?

/TITLE

Model built by EQS 6 for Windows

/SPECIFICATIONS

DATA='q:\semguide\lsqfemale.ess';

VARIABLES=209; CASES=450; groups=2;

METHOD=ML; ANALYSIS=COVARIANCE; MATRIX=RAW;

/LABELS

V1=LNAME; V2=MI; V3=OCCUP; V4=GROUP; V5=GENDER;

V6=GENDERN; V7=EDUC; V8=TDATE; V9=BDATE; V10=AGE;

V11=TAGE; V12=ENJOY; V13=FGOOD; V14=WORTH; V15=FEARFUL;

V16=ANGRY; V17=TENSE; V18=SHY; V19=WORNOUT; V20=FITIN;

V26=CONFUSE; V27=USELESS; V28=HURTSEL; V29=SAY; V30=JEALOUS;

V31=SLEEP; V32=FUN; V33=ALCOHOL; V34=DRUGS; V35=LIVELY;

V36=LONELY; V37=INSECURE; V38=WORRIED; V39=SORRY; V40=OUTGOING;

V46=SUSPICIS; V47=SATISFID; V48=NECESITS; V49=FAIR; V50=AMBITOUS;

V51=COUTEOUS; V52=CRETIVE; V53=LOYAL; V54=HANDS; V55=DIFERENT;

V61=KIND; V62=BUSY; V63=SUCESFUL; V64=CHARM; V65=TOUCHED;

V66=CHARGE; V67=GRUDGE; V68=COURAGE; V69=FUTURE; V70=HITPEOLE;

V71=LKWORK; V72=PEOPLE; V73=WHATDO; V74=DOWILL; V75=DISAGREE;

V76=SIXSENSE; V77=SHOW; V78=LAW; V79=HCONFLIC; V80=BODY;

V81=BETTER; V82=PURPOSE; V83=ARRANGE; V84=INCLUDED; V85=STANDUP;

V86=NEGATIVE; V87=POSITIVE; V88=CONCETRT; V89=BEHAVIOR; V90=GJOB;

V91=INTEFER; V92=GENTLE; V93=MONEY; V94=THINGS; V95=IDEAS;

V96=DEATH; V97=SPUR; V98=LIFE; V99=PAID; V100=PUNISHED;

V101=HELP; V102=QUIT; V103=EXCITING; V104=LIKEME; V105=OUTSELF;

V106=POSITON; V107=FIRM; V108=ALONG; V109=EXPRESS; V110=CONFRONT;

V111=RESOLVED; V112=SPTALK; V113=SPCONFLT; V114=SPFEE; V115=SPSUPP;

V116=SPPROD; V117=SPLEIS; V118=FMTALK; V119=FMCONFLT; V120=FMFEE;

V121=FMSUPP; V122=FMPROD; V123=FMLEIS; V124=FRTALK; V125=FRCONFLT;

V126=FRFEE; V127=FRSUPP; V128=FRPROD; V129=FRLEIS; V130=WKTALK;

V131=WKCONFLT; V132=WKFEE; V133=WKSUPP; V134=WKPROD; V135=WKLEIS;

V136=WORKING; V137=PARENTNG; V138=COMUTING; V139=SLEEPNG; V140=EATING;

V146=RELAXING; V147=LOVING; V148=NOTHING; V149=PSPORTS; V150=OBSPORT;

V151=RELIGON; V152=CLASSES; V153=CONCERTS; V154=SERVORG; V155=MOVIES;

V156=TOGETHER; V157=COUNSEL; V158=PUBSERV; V159=HYGIENE; V160=HOUSEWOR;

V161=CREATING; V162=ERRANDS; V163=VOLUNTER; V164=DRIVING; V165=DINNING;

V166=HOUSEWK; V167=TVDRAMA; V168=TVSPORT; V169=TVNEWS; V170=TVTALK;

V171=TTALK; V172=ACCEPT; V173=CARE; V174=COPING; V175=DEP1;

V176=DRUGALC; V177=DSM3; V178=DSTRS; V179=DSTRS2; V180=EMPLOY;

V186=LEIS4; V187=LEIS5; V188=PARAN; V189=QUAL; V190=REL1;

V191=REL2; V192=REL3; V193=REL4; V194=VALUE; V195=FEMALE;

V196=MALE; V197=GENDERX; V198=XANGRY; V199=XTENSE; V200=XAGE;

V201=XFUN; V202=XFITIN; V203=GXANGRY; V204=GXTENSE; V205=AXANGRY;

/EQUATIONS

V12 =   *F3 + E12;

V13 =   *F3 + E13;

V14 =   *F3 + E14;

V19 =   *F2 + *V12 + *V38 + E19;

V23 =   *F1 + E23;

V38 =   *F3 + E38;

V43 =   1F1 + *V14 + E43;

V47 =   *F1 + *V38 + E47;

V56 =   *F2 + E56;

V57 =   1F2 + E57;

V63 =   *F1 + *V13 + E63;

V90 =   *F2 + E90;

F1 =   *F2 + *F3 + D1;

F2 =   *F3 + D2;

/VARIANCES

F3 = 1;

E12 = *;

E13 = *;

E14 = *;

E19 = *;

E23 = *;

E38 = *;

E43 = *;

E47 = *;

E56 = *;

E57 = *;

E63 = *;

E90 = *;

D1 = *;

D2 = *;

/COVARIANCES

E43,E23 = *;

E47,E23 = *;

E47,E43 = *;

E63,E23 = *;

E63,E43 = *;

E63,E47 = *;

/PRINT

FIT=ALL;

TABLE=EQUATION;

/OUTPUT

Parameters;

Standard Errors;

RSquare;

Listing;

DATA='EQSOUT.ETS';

/END

/TITLE

Model built by EQS 6 for Windows

/SPECIFICATIONS

DATA='q:\semguide\lsqmale.ess';

VARIABLES=209; CASES=188;

METHOD=ML; ANALYSIS=COVARIANCE; MATRIX=RAW;

/LABELS

V1=LNAME; V2=MI; V3=OCCUP; V4=GROUP; V5=GENDER;

V6=GENDERN; V7=EDUC; V8=TDATE; V9=BDATE; V10=AGE;

V11=TAGE; V12=ENJOY; V13=FGOOD; V14=WORTH; V15=FEARFUL;

V16=ANGRY; V17=TENSE; V18=SHY; V19=WORNOUT; V20=FITIN;

V26=CONFUSE; V27=USELESS; V28=HURTSEL; V29=SAY; V30=JEALOUS;

V31=SLEEP; V32=FUN; V33=ALCOHOL; V34=DRUGS; V35=LIVELY;

V36=LONELY; V37=INSECURE; V38=WORRIED; V39=SORRY; V40=OUTGOING;

V46=SUSPICIS; V47=SATISFID; V48=NECESITS; V49=FAIR; V50=AMBITOUS;

V51=COUTEOUS; V52=CRETIVE; V53=LOYAL; V54=HANDS; V55=DIFERENT;

V61=KIND; V62=BUSY; V63=SUCESFUL; V64=CHARM; V65=TOUCHED;

V66=CHARGE; V67=GRUDGE; V68=COURAGE; V69=FUTURE; V70=HITPEOLE;

V71=LKWORK; V72=PEOPLE; V73=WHATDO; V74=DOWILL; V75=DISAGREE;

V76=SIXSENSE; V77=SHOW; V78=LAW; V79=HCONFLIC; V80=BODY;

V81=BETTER; V82=PURPOSE; V83=ARRANGE; V84=INCLUDED; V85=STANDUP;

V86=NEGATIVE; V87=POSITIVE; V88=CONCETRT; V89=BEHAVIOR; V90=GJOB;

V91=INTEFER; V92=GENTLE; V93=MONEY; V94=THINGS; V95=IDEAS;

V96=DEATH; V97=SPUR; V98=LIFE; V99=PAID; V100=PUNISHED;

V101=HELP; V102=QUIT; V103=EXCITING; V104=LIKEME; V105=OUTSELF;

V106=POSITON; V107=FIRM; V108=ALONG; V109=EXPRESS; V110=CONFRONT;

V111=RESOLVED; V112=SPTALK; V113=SPCONFLT; V114=SPFEE; V115=SPSUPP;

V116=SPPROD; V117=SPLEIS; V118=FMTALK; V119=FMCONFLT; V120=FMFEE;

V121=FMSUPP; V122=FMPROD; V123=FMLEIS; V124=FRTALK; V125=FRCONFLT;

V126=FRFEE; V127=FRSUPP; V128=FRPROD; V129=FRLEIS; V130=WKTALK;

V131=WKCONFLT; V132=WKFEE; V133=WKSUPP; V134=WKPROD; V135=WKLEIS;

V136=WORKING; V137=PARENTNG; V138=COMUTING; V139=SLEEPNG; V140=EATING;

V146=RELAXING; V147=LOVING; V148=NOTHING; V149=PSPORTS; V150=OBSPORT;

V151=RELIGON; V152=CLASSES; V153=CONCERTS; V154=SERVORG; V155=MOVIES;

V156=TOGETHER; V157=COUNSEL; V158=PUBSERV; V159=HYGIENE; V160=HOUSEWOR;

V161=CREATING; V162=ERRANDS; V163=VOLUNTER; V164=DRIVING; V165=DINNING;

V166=HOUSEWK; V167=TVDRAMA; V168=TVSPORT; V169=TVNEWS; V170=TVTALK;

V171=TTALK; V172=ACCEPT; V173=CARE; V174=COPING; V175=DEP1;

V176=DRUGALC; V177=DSM3; V178=DSTRS; V179=DSTRS2; V180=EMPLOY;

V186=LEIS4; V187=LEIS5; V188=PARAN; V189=QUAL; V190=REL1;

V191=REL2; V192=REL3; V193=REL4; V194=VALUE; V195=FEMALE;

V196=MALE; V197=GENDERX; V198=XANGRY; V199=XTENSE; V200=XAGE;

V201=XFUN; V202=XFITIN; V203=GXANGRY; V204=GXTENSE; V205=AXANGRY;

V206=AXTENSE; V207=GXFUN; V208=GXFITIN; V209=UNGOLD;

/LMTEST

/EQUATIONS

V12 =   *F3 + E12;

V13 =   *F3 + E13;

V14 =   *F3 + E14;

V19 =   *F2 + *V12 + *V38 + E19;

V23 =   *F1 + E23;

V38 =   *F3 + E38;

V43 =   1F1 + *V14 + E43;

V47 =   *F1 + *V38 + E47;

V56 =   *F2 + E56;

V57 =   1F2 + E57;

V63 =   *F1 + *V13 + E63;

V90 =   *F2 + E90;

F1 =   *F2 + *F3 + D1;

F2 =   *F3 + D2;

/VARIANCES

F3 = 1;

E12 = *;

E13 = *;

E14 = *;

E19 = *;

E23 = *;

E38 = *;

E43 = *;

E47 = *;

E56 = *;

E57 = *;

E63 = *;

E90 = *;

D1 = *;

D2 = *;

/COVARIANCES

E43,E23 = *;

E47,E23 = *;

E47,E43 = *;

E63,E23 = *;

E63,E43 = *;

E63,E47 = *;

/PRINT

FIT=ALL;

TABLE=EQUATION;

/OUTPUT

Parameters;

Standard Errors;

RSquare;

Listing;

DATA='EQSOUT.ETS';

/CON

(1,f1,f3)=(2,f1,f3);

(1,f1,f2)=(2,f1,f2);

/END

The limited output follows:

GOODNESS OF FIT SUMMARY FOR METHOD = ML

INDEPENDENCE MODEL CHI-SQUARE        =    2252.817 ON   132 DEGREES OF FREEDOM

INDEPENDENCE AIC =  1988.81743   INDEPENDENCE CAIC =  1292.54885

MODEL AIC =     2.37993          MODEL CAIC =  -430.15056

CHI-SQUARE =      166.380 BASED ON      82 DEGREES OF FREEDOM

PROBABILITY VALUE FOR THE CHI-SQUARE STATISTIC IS       .00000

FIT INDICES

-----------

BENTLER-BONETT     NORMED FIT INDEX =      .926

BENTLER-BONETT NON-NORMED FIT INDEX =      .936

COMPARATIVE FIT INDEX (CFI)         =      .960

BOLLEN   (IFI) FIT INDEX            =      .961

MCDONALD (MFI) FIT INDEX            =      .924

LISREL    GFI  FIT INDEX            =      .950

LISREL   AGFI  FIT INDEX            =      .904

ROOT MEAN-SQUARE RESIDUAL (RMR)     =      .151

STANDARDIZED RMR                    =      .049

ROOT MEAN-SQUARE ERROR OF APPROXIMATION (RMSEA)    =      .044

90% CONFIDENCE INTERVAL OF RMSEA  (        .034,        .054)

The model fits.

And there is no difference between either of the parameters in the two groups.

UNIVARIATE TEST STATISTICS:

NO    CONSTRAINT    CHI-SQUARE   PROBABILITY

--    -----------   ----------   -----------

1    CONSTR:   1         .034        .853

2    CONSTR:   2         .954        .329

CUMULATIVE MULTIVARIATE STATISTICS              UNIVARIATE INCREMENT

----------------------------------              --------------------

STEP  PARAMETER   CHI-SQUARE  D.F.  PROBABILITY       CHI-SQUARE  PROBABILITY

---- -----------  ----------  ----  -----------       ----------  -----------

1  CONSTR:   2       .954      1       .329              .954        .329

2  CONSTR:   1      1.145      2       .564              .190        .663