group differences in contrasts PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Katerina Rnic posted on Wednesday, August 12, 2020 - 5:17 pm
Dear Mplus team,

We are wanting to look at overall differences in minutes spent ruminating in-person, over texting, over social media, and over the phone. Data were collected using twice-daily diaries over two weeks, so data are clustered within participants. Our hypothesis was that individuals ruminate more in person than they do via the other communication domains. I was able to test contrasts between minutes ruminating in-person versus the other domains, but now we want to see if sex moderates these contrasts. I have dummy coded sex and added it to the model as a between-level variable, and I have regressed sex on each type of co-rumination. However, I'm not sure how to test sex as a moderator of these contrasts. I have attached my input. Can you please advise?

usevariables are Sex_dummy Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone;

between = Sex_dummy;

type is twolevel random;

Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone;

Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone on Sex_dummy;

Model test:
0 = p1 - p2;
0= p1 - p3;
0 = p1-p4;

output: sampstat
 Bengt O. Muthen posted on Wednesday, August 12, 2020 - 5:46 pm
Looks fine.
 Katerina Rnic posted on Wednesday, August 12, 2020 - 6:18 pm
Dear Dr. Muthen,

Thanks so much for looking over my syntax!

Is there a way to test whether each contrast (e.g., 0 = p1 - p2) differs between males and females?
 Bengt O. Muthen posted on Thursday, August 13, 2020 - 6:21 pm
You can regress your 4 variables on sex and label those coefficients to be used in Model Constraint.
 Katerina Rnic posted on Friday, August 14, 2020 - 11:46 am
Dear Dr. Muthen,

Thanks so much for your advice.
Do you mean to do something like this?

Mins_Inperson on Sex_dummy(p1);
Mins_Texting on Sex_dummy(p2);
Mins_Socialmedia on Sex_dummy(p3);
Mins_Overphone on Sex_dummy(p4);

Model test:
0 = p1 - p2;
0 = p1 - p3;
0 = p1 - p4;

My understanding is that this would then compare the moderating effects for each of the variables. However, I would like to test whether the difference in mean levels among variables differs by sex. What I want to do is create variables that represents the difference in intercepts for each variable compared with the mins_inperson variable, and regress each of those on sex to see if there is significant moderation, but I can't seem to find a way to do that. Here is what I have tried but I can't seem to find a way to get this to run. Can you please advise? Is there a better way to go about this?

Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone;
textdiff on Sex_dummy;
Socdiff on Sex_Dummy;
Phonediff on Sex_Dummy;

Model constraint:
new (textdiff socdiff phonediff);
textdiff = p1 - p2;
socdiff = p1 - p3;
phonediff = p1 - p4;
 Bengt O. Muthen posted on Friday, August 14, 2020 - 2:24 pm
This is not how to do it. For each variable, you now have 2 parameters, not 1, e.g.:

textdiff on sex_dummy (b1);
[textdiff] (a1);

where b1 is the slope and a1 is the intercept in this regression. Following regular dummy variable regression, for sex_dummy = 0, the intercept that you want to compare with other variables is a1. For sex_dummy=1, the intercept is a1+b1.
 Katerina Rnic posted on Monday, August 17, 2020 - 9:56 am
Thanks so much for your help Dr. Muthen.
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