Lisa.M posted on Tuesday, November 15, 2016 - 2:19 am
Hi, Doc. Muthen. I'm testing a moderated mediation model in level 1. However, the structure of the data is nested within teams. so, in order to eliminate the nested effect and also test the moderated mediation effect, I use the multilevel coding to run this model. I have several questions: 1.is my coding right? 2.although this is a twolevel analysis, there is no varibale in the second level in our model, so about the %between%command, I do not know how to use it
here is my coding, and thank you for your time
TITLE: threat and gc; DATA: file is abusive.csv; VARIABLE:names= SubID gen age edu X W M Y; USEVARIABLES =SubID gen age edu X W M Y Int; CLUSTER IS SubID; within=gen age edu X W M Y Int; DEFINE: Int=X*W; ANALYSIS: TYPE = TWOLEVEL MGROUP; ESTIMATOR = ML; ITERATIONS = 1000; CONVERGENCE = 0.000001;
MODEL:%WITHIN% [Y] (b0); Y ON M (b1);
Y ON X; Y ON W; Y ON Int;
[M] (a0); M ON X (a1); M ON W (a2); M ON Int (a3);
model constraint: new(ind wmodval); wmodval=-1; ind=(a1+a3*wmodval)*b1; output: cinterval(bcbootstrap);
you declare that there is no Between-level variance in these variables. So the Between level model is empty. I think you instead want to exclude your 2 DVs Y and M from this list so that their variances can be estimated on Between.
Lisa.M posted on Tuesday, November 15, 2016 - 5:29 pm
Thank you, Doc. Muthe.and after the changes you suggested, is it right to test my hypotheses using this coding?
Lisa.M posted on Tuesday, November 15, 2016 - 5:31 pm
Sorry, I made a mistake, it is doc. Muthen rather than doc.Muthe.
You should run it to see what Mplus says. Note that bootstrapping is not available with Type=Twolevel. And I don't know what this means
TYPE = TWOLEVEL MGROUP;
Lisa.M posted on Tuesday, November 15, 2016 - 5:48 pm
Thank you, Doc.Muthen. As a new learner, I was following the instructions of the Mplus lanague generator. and this coding did export some results, but I was not sure if it was right.Results suggested that all the variables were not correlated. I guess that might suggest that my coding was wrong. As you suggested that bootstrapping is not available with Type=Twolevel, then what kind of analysis should I take to conduct the testing of my hypotheses? Sincerely appreciation for your knid help.
You don't need to do bootstrapping unless you are worried about a non-symmetric distribution of an indirect effect. And if this is what you are worried about you can use Bayesian analysis which allows non-symmetric distributions of estimates. But Bayes is not stuff for beginners. You may also want to ask beginner questions on SEMNET.
Lisa.M posted on Wednesday, November 16, 2016 - 5:57 pm