Bayes posterior distributions for cov... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Dmitriy Poznyak posted on Wednesday, July 18, 2012 - 2:16 am
Dear Mplus team,

I fit a multilevel SEM with cross-level interaction effects with Bayesian MCMC estimation method. The model fits just fine. The problem is with plotting the interaction effects, which are of substantive interest.

My understanding is that I can't plot the marginal effects (Z*X on Y) within Mplus. I wonder though, whether I might be able to get the output of the posterior distributions for covariance matrix (for X Y and Z) and plot the interaction effects in R or Stata?

I would definitely appreciate your insight on this.

Thank you,
Dmitriy
 Bengt O. Muthen posted on Wednesday, July 18, 2012 - 5:48 pm
You can express how y changes as a function of x, moderated by z (say if z is the level 2 predictor). Why do you want the cov matrix? For confidence intervals?
 Dmitriy Poznyak posted on Wednesday, July 18, 2012 - 6:20 pm
Dr. Muthen, thank you for your reply.

I did calculate the effects by hand and the reason why I need the covariance matrix is precisely what you've mentioned--confidence intervals.
 Bengt O. Muthen posted on Thursday, July 19, 2012 - 3:02 am
I assume that z is a level 2 variable and y and x level 1 variables. You can get the covariance matrix for z and the between part variation of y (and x) and you can get the covariance matrix of the within part of y (and x) - all by doing a fully saturated model.

But isn't it easier to express the interaction effect you want in Model Constraint, say

New(yest);
yest = (gamma0 + gamma1*z)*x;

where z moderates the effect of x on y and where, conditioning on z and x, you choose different values of z (say high, middle, low) and vary x over its relevant range. This gives you not only the estimated y but also its SE and can then do a 95% CI.
 Dmitriy Poznyak posted on Thursday, July 19, 2012 - 3:49 am
This begins to make sense--thank you once again for the explanation.

Could you please also point me at the more detailed description of the "Model Constraint" procedure you are referring to? I remember using it before to assess the indirect effects, which is somewhat different from what I want to do now.

Particularly, it's not clear to me how exactly I manipulate the value of z (between-level predictor) in the Model Constraint statement. I assume I can not just type the value of z I want to use (e.g. mean z) in the statement.
 Bengt O. Muthen posted on Thursday, July 19, 2012 - 12:11 pm
You can say, as an example,

ANALYSIS: TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
s | y ON x;
%BETWEEN%
y ON z;
[s] (gam0);
s ON z (gam1);
y WITH s;

model constraint:
new(ylow yhigh);
ylow = (gam0+gam1*(-1))*level1;
yhigh = (gam0+gam1*1)*level1;

where the -1, +1 are the z values (say 1 SD below and above the mean) and "level1" is where you plug in the different x values for which you want the y information.
 Dmitriy Poznyak posted on Thursday, July 19, 2012 - 6:47 pm
This now sounds like a perfect solution. Thank you very much again for the explanation.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: