TITLE:
Eq 2.9: Adding Age by Grip Interaction
Age (0=85), Grip (0=9)
DATA:
FILE = MPLUS_Chapter2.csv;
FORMAT = FREE;
DEFINE:
age85 = age - 85;
grip9 = grip - 9;
IF demgroup EQ 1 THEN demNF=0;
IF demgroup EQ 1 THEN demNC=0;
IF demgroup EQ 2 THEN demNF=1;
IF demgroup EQ 2 THEN demNC=0;
IF demgroup EQ 3 THEN demNF=0;
IF demgroup EQ 3 THEN demNC=1;
agegrip = age85*grip9;
VARIABLE:
NAMES = PersonID cog age grip sexMW demgroup;
USEVARIABLES = cog sexMW age85 grip9 demNF demNC agegrip;
MISSING = ALL (-9999);
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
OUTPUT:
TECH3;
MODEL:
cog ON age85 grip9 sexMW (bage85 bgrip9 bsexMW);
cog ON demNF demNC (bdemNF bdemNC);
cog ON agegrip (bagegrip);
[cog] (int);
MODEL TEST:
bage85=0;
bgrip9=0;
bsexMW=0;
bdemNF=0;
bdemNC=0;
bagegrip=0;
MODEL CONSTRAINT:
NEW(est1-est16);
est1 = -1*bdemNF + 1*bdemNC;
est2 = bage85*1 - bagegrip*3;
est3 = bage85*1 + bagegrip*0;
est4 = bage85*1 + bagegrip*3;
est5 = bgrip9*1 - bagegrip*5;
est6 = bgrip9*1 + bagegrip*0;
est7 = bgrip9*1 + bagegrip*5;
est8 = int*1 - bage85*5 + bgrip9*3 - bagegrip*15;
est9 = int*1 + bage85*0 + bgrip9*3 + bagegrip*0;
est10 = int*1 + bage85*5 + bgrip9*3 + bagegrip*15;
est11 = int*1 - bage85*5 + bgrip9*0 + bagegrip*0;
est12 = int*1 + bage85*0 + bgrip9*0 + bagegrip*0;
est13 = int*1 + bage85*5 + bgrip9*0 + bagegrip*0;
est14 = int*1 - bage85*5 - bgrip9*3 + bagegrip*15;
est15 = int*1 + bage85*0 - bgrip9*3 + bagegrip*0;
est16 = int*1 + bage85*5 - bgrip9*3 - bagegrip*15;