Yuli Tak posted on Thursday, June 13, 2013 - 7:04 am
I'm am trying to understand a 2-way interaction gender x condition (both dichotomous variables) in a regression model using clustered imputed data. To understand the interaction completely I have to recode the variables, to change the reference group of gender. Is there a way by which this is possible in Mplus? I understood that the Define option might work. Is this possible? Where in the syntax should it be written? Should I save the data first before running the analysis?
title: Imputation adolescent vars T4 effect data: FILE IS imputelist.dat; FORMAT IS 4f8.0, 14f8.2; TYPE=individual; TYPE=imputation; variable:NAMES ARE imp id con sex age_at1 eth sch scn_at1 age_at4 u1-u4 u12 u14 x1 x2 x12; define: if sex=0 then sex=1; if sex=1 then sex=0; USEVARIABLES ARE age_at1 eth sch scn_at1 x12 con sex u12 int1 int2; IDVARIABLE IS id; missing=blank; cluster=sch; CATEGORICAL IS x12;
define: int1=con*sex; int2=con*u12; model: x12 on age_at1 eth scn_at1 con sex u12 int1 int2;