Effect coding PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 yin fu posted on Wednesday, September 28, 2011 - 3:16 am
I have a 2-level model with 3 categorical variables on level 2.
In order to differentiate their effects, I used effect coding like this
d1 d2
x1 1 0
x2 0 1
x3 -1 -1

Mplus then gives out the extimate and standard error for x1 and x2 (difference compared to a global mean). I am able to calculate the the estimate for x3 myself, but how can I come up with the standard error?

Thanks a lot for your help,
 Linda K. Muthen posted on Wednesday, September 28, 2011 - 6:02 am
Use MODEL CONSTRAINT to calculate the estimate for x3 and you will get a standard error for it.
 Bruno Chauvin posted on Tuesday, October 03, 2017 - 7:31 am
As you suggested in a previous post about the dummy variables (January 31, 2010), I used the following dummy variable coding for my 3-category ethnicity variable (initially coded "1" for White = comparison group, "2" for Black, and "3" for Hispanic)
In the define command, I wrote:
DEFINE: Black=0;
IF (Ethnicity == 2) then Black=1;
IF (Ethnicity == 3) then Hispanic=1;
It worked.

Now, I wish to do the same thing by using an effect coding such as:
C1 C2
White 1 1
Black -1 0
Hispanic 0 -1

But I fail to write the correct syntax to implement it. Do I need to use the DEFINE command? The MODEL CONSTRAINT command? If so, in what way?

Could you please give me an example of syntax to do this?

Thank you very much for your help.
 Bengt O. Muthen posted on Tuesday, October 03, 2017 - 5:15 pm
This is a question suitable for SEMNET.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message