Contextual effect for twolevel SEM PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Student 09 posted on Saturday, December 27, 2008 - 3:04 am
Hello

I wonder how to correctly compute a contextual effect when using a twolevel SEM with latent factors.

Following Raudenbush and Bryk (2002, p. 141), for models with groupmean-centering the contexual effect is computed as

beta_between - beta_within.

This could straigtforward be applied to a model where one regresses e.g.
latent factor Y on latent factor X on both levels, and then computes the differences in the unstandardized beta`s. Would this be correct? If so, how could I test the significance of any difference between these two beta`s?

Best
Jan
 Bengt O. Muthen posted on Friday, January 02, 2009 - 8:10 am
This topic is a little involved, which has delayed our answer. There has been some work done on this and we are checking if this is ready to be distributed. One key issue which the observed variable case of R&B doesn't face, is that the formula you give would only be relevant if the within and between factor loadings were equal so you are sure you are dealing with the same latent variable on both levels. That equality often does not hold.
 Student 09 posted on Monday, January 05, 2009 - 9:55 am
Dear Dr. Muthen

I would be very grateful if you would notify me once your work is published - if you are aware of any further published research reports in this field (I am not) please let me know

Best
Jan
 Student 09 posted on Monday, February 16, 2009 - 2:20 am
Dear Dr. Muthen

according to Bryk and Raudenbush (2002, 141), a contexual effect can - besides the grandmean-centred centered approach (e.g. ex9.1a & ex9.1b)- also be computed as: b_between - b_within = b_contextual.

A potential limitation of this approach is that one gets no information whether the resulting difference is significantly different from zero.

To obtain this information apart from the grand-mean centered approach, I am curious whether it would be correct to

A) constrain the within- and between-regression weights of the variable of interest to equality and then

B) compare the fit of a constrained (b_between = b_within) to an unconstrained (b_between /= b_within) model. Then,

C) if the fit of the constrained model would not differ from the unconstrained model, I would argue that the contextual effect (b_between - b_within) is not significant.

Would this procedure be correct?

Thanks
Jan
 Bengt O. Muthen posted on Monday, February 16, 2009 - 6:31 am
See page 231 of the Version 5 User's Guide for how to get this significance information using Model Constraint. See also

Lüdtke, O., Marsh, H.W., Robitzsch, A., Trautwein, U., Asparouhov, T., & Muthén, B. (2008). The multilevel latent covariate model: A new, more reliable approach to group-level effects in contextual studies. Psychological Methods, 13, 203-229.

under Papers, Multilevel SEM.
 Student 09 posted on Monday, February 16, 2009 - 7:42 am
Thanks, I'll check the Ludtke paper. In the meantime, let me ask whether it is correct that the within-slopes must be invariant (=fixed coefficients, variance between groups) for estimating contextual effects?

Thanks a lot!
 Student 09 posted on Monday, February 16, 2009 - 8:22 am
Thanks for the Ludtke et al. reference which, for the time being, clarified my earlier questions.
 Bengt O. Muthen posted on Monday, February 16, 2009 - 8:24 am
The contextual model uses fixed slopes. See the reference our UG gives: Raudenbush & Bryk 2002, p. 140.
 Student 09 posted on Tuesday, February 17, 2009 - 6:40 am
Hi

I am still not clear for which reason grandmean-centering is used in ex9.1b.

I noted that deactivating grandmean-centering yields almost identical results, the only difference being that the y-intercept with grandmean-centered X is 2.036, but without grandmean-centered X the y-intercept is 2.005.

From the UG, I understand that in line with the 'group mean example' by R&B (table 5.11, p. 140), in ex.9.1b beta_c is calculated as gamma01 - gamma10.

For this way of calculating contextual effects R&B do not use grand-mean (X..), but group-mean (X.j) centering only.

Grand-mean centering is used in the right hand example of table 5.11. But because in this second example beta_c is equal to gamma01, this procedure obviously differs from the way contextual effects are estimated in ex9.1.b. That's were my confusion comes from.

So at the risk of asking something very obvious or which could be deduced from the Luedtke et al. paper, I would be very grateful if you could give me an answer a) whether and if so,
b) for which reason grandmean-centering must be used in ex9.1b-types of analysis?

Many thanks for your answer!
 Bengt O. Muthen posted on Tuesday, February 17, 2009 - 10:55 am
Grand-mean centering is not essential for ex9.1b.
 Simon Denny posted on Thursday, August 27, 2009 - 4:27 pm
I have been looking at the paper by Ludtke et al(2008) as I am running a contextual analysis of school climate.

I have a question regarding the paper which is confusing me. On page 207 it states
"Thus, y10 is the specific effect of the group mean after controlling for interindividual differences on X." (1st para top of page)

Shouldn't this be y01 as the contextual effect?

Thanks for your help!
 Linda K. Muthen posted on Friday, August 28, 2009 - 12:51 pm
Oliver Ludtke says it is a typo. "It should be gamma_01 instead of gamma_10."
 Simon Denny posted on Saturday, August 29, 2009 - 3:38 pm
Thanks Linda, a couple of follow-up questions.

1. Why in example in 9.1 do you use Centering = grandmean (x) rather groupmean? I take it that it doesn't really matter in a random intercepts only model. But would groupmean be more appropriate as this is how Mplus decomposes the latent variable (pg 231 users guide).

2. Mplus doesn't produce standardized outputs for variables in model constraint. When I subtract gama01 from gamma10 by hand from the output I get the same as the model constraint estimates. Can I do the same for standardized gamma10 and gama01 output to get standardized contextual coefficients?
 Simon Denny posted on Saturday, August 29, 2009 - 3:48 pm
sorry, just figured out that you can't use GROUPMEAN for variables used in between analyses. But why specify grandmean (x) anyhow?
 Bengt O. Muthen posted on Saturday, August 29, 2009 - 6:31 pm
The Raudenbush-Bryk (2002) page 140 Table 5.11 shows two alternatives, group- and grand-mean centering. As you see there, the grand-mean approach gets you the contextual effect directly as the between-level slope. So here you can use the standardized coefficient directly. As an exercise you can see if you get that by standardizing the subtraction in the group-mean centered alternative.
 Simon Denny posted on Sunday, August 30, 2009 - 2:48 pm
Thanks, that works for the observed covariate group-mean contextual effect.

I guess I was meaning for the second part of example 9.1, why specify grandmean centering for the latent covariate model? As described on page 231 - the latent variable is decomposed as a latent group mean. Hence the need to transform the within and between slopes as in the MODEL CONSTRAINT command.

Is it because Grandmean centering helps the maximum liklihood estimation of the latent group mean?
 Bengt O. Muthen posted on Sunday, August 30, 2009 - 3:09 pm
I don't think that centering is important.
 davide morselli posted on Thursday, August 05, 2010 - 7:08 am
Hi,
I'm testing a cross level mediation in which a L2 predictor (X) has an effect on a L1 dependent latent variable (Y) via an L1 mediator (m) (it's the type 2-1-1). The dependent variable is a 2-level latent factor specified by three indicators which factor loadings are constrainted to be equal across the 2 levels.
According to Preacher, Zyphur & Zhang (2010), to test the mediation I have to free the variance of the mediator at the to levels. Namely to remove m from the WITHIN list in the VARIABLE specification of my Mplus model.
I was wondering if this mean that I need also to control for the contextual effect of m, as suggested by Ludtke et al (2008) or I simply center it on the grandmean.
 davide morselli posted on Thursday, August 05, 2010 - 10:24 am
In addition to previous post, I'm also trying to calculate the effect size of X on Y, on the basis of Marsh et al (2009).
I am interested in the total size of the effect (direct+indirect).
Using Marsh's indications I wrote the model as following:

Model:
%within%
DV_W by R1_CNV (2) ;
DV_W by R2_CNV (1) ;
DV_W by R3_CNV (3);

DV ON MV(b_within);

MV (Psi_W);
DV_W (Theta_W);

%between%

DV_B by R1_CNV (2) ;
DV_B by R2_CNV (1) ;
DV_B by R3_CNV (3);

DV_B ON IV_B (b1_between);
DV_B ON MV (b2_between);
MV ON IV_B (b3_between);

IV_B (Psi2_B);
CNV_B (Theta_B);
MV (Psi_B);

Model constraint:
NEW(ind_eff);
IND_EFF = b3_between*b2_between;

!effect sizes
new(EFFSIZE);
EFFSIZE = (b1_between+IND_EFF)*2*(sqrt(Psi_B + Psi2_B))/sqrt(Psi_W*b_within**2 + Theta_W);

I was wondering if you think the equation for EFFSIZE is correct.
Resulting effect size is .367; I also tried a model without the mediating variable (MV). In that case the effect size results .328

Thank you very much!!

Davide
 Linda K. Muthen posted on Thursday, August 05, 2010 - 10:46 am
The MODEL command should be as follows with neither m nor y on the WITHIN list.

MODEL:
%WITHIN%
y ON m;
%BETWEEN%
y ON m; ! contextual effect
m ON x;

For the second part of your question, please send the full output and your license number to support@statmodel.com.
 Jennifer Yahner posted on Friday, October 01, 2010 - 6:18 am
Dear Dr. Muthen,

Thanks for all your recent help.

I am also trying to estimate a 2-1-1 mediation model.

Are you saying that we should use your more simplified command above instead of the one from Example E of Preacher et al. (2010), which I have written below?

MODEL
%WITHIN%
m y;
y ON m;
%BETWEEN%
x m y;
m ON x(a);
y ON m(b);
y ON x;

MODEL CONSTRAINT:
NEW(indb); !<--Between indirect effect
indb=a*b;

-Jennifer
 Linda K. Muthen posted on Friday, October 01, 2010 - 6:55 am
I was translated what you wrote into the Mplus language. If you want to estimate an indirect effect also, you can use MODEL CONSTRAINT as shown above.
 yin fu posted on Monday, September 12, 2011 - 7:12 am
Dear Dr. Muthen,

I am trying to moderate a contextual effect. I am using a similar syntax code to Marsh et al. 2009. When modeling their model 4 (no random slopes) and their model 5a (random slopes), the contextual effect switches from (significantly) positive to (non-significant) negative in my model.
What could be the reasons for that? The effect stayed similar in the Marsh et al. paper.
Also I am a bit unsure about the "[s] (b_within);" command on the %between% level in Model 5a. Does it say: "the mean of the variance of the slope s on level 2 is called b_within"? Isn't that different to the defining command of (b_within) in model 4?

Thanks for your help, Martin
 Bengt O. Muthen posted on Tuesday, September 13, 2011 - 9:25 am
For your first question it is best if you contact one of the two first authors.

Regarding your second question, the Model 5 statement "[s] (b_within)" says "the mean of the random slope s is given the label b_within". The Model 4 (b_within) is the fixed slope, so the Model 5 label refers to the same thing conceptually, except that in Model 5 the slope also has a variance.
 yin fu posted on Wednesday, September 14, 2011 - 3:43 am
Dear Dr. Muthen,

Thanks for clarifying. I compared my two outputs and the reason for the contextual effect to switch signs is a strongly decreasing Between Level effect.
Is it a normal thing to happen, that the between effect decreases a lot, when a random slope is included in the model, or are chances high that there is something wrong with my data?

Thanks again, Martin
 Bengt O. Muthen posted on Wednesday, September 14, 2011 - 2:13 pm
I think that can happen. See the Raudenbush-Bryk (2002) HLM book.
 Katrin Lintorf posted on Tuesday, May 06, 2014 - 9:02 am
Hello, I would like to test a 2-1-1 mediation hypothesis within a (larger) MSEM. I use the syntax provided by Preacher, Zyphur, & Zhang (2010) and started with a small model consisting only of continuous variables. For this model the MSEM and the UCM produce comparable results. Now I would like to transfer this to a dichotomous mediator and I ask myself how to build analogous models: In the UCM; if I composed the L2-variable of the dichotomous mediator as the mean of this variable, will this be substantially the same as the latent L2-variable in the MSEM? If not: How do I compose a manifest counterpart?

Kind regards
Katrin
 Bengt O. Muthen posted on Tuesday, May 06, 2014 - 6:48 pm
Q1. Yes.

Q2. Use the CLUSTER_MEAN option
 Katrin Lintorf posted on Thursday, May 08, 2014 - 5:34 am
Thank you for the quick reply. Now I have a follow-up question concerning L1. In the UCM, the covariate x and the mediator m have to be group mean centered on L1. However, in Mplus this is not possible for categorical variables.
(1) How do I disentangle within- and between effects of categorical variables in an UCM in Mplus?
(2) How should I imagine the latent version of my dichotomous L1 variable in a MSEM: Is it substantially comparable to a group mean centered manifest version of the variable? If yes, how can I construct analogous models (UCM - MSEM)?

Kind regards
Katrin
 Bengt O. Muthen posted on Thursday, May 08, 2014 - 7:54 am
I think you are getting into a methods research area. If you are going to be serious about a binary mediator you have to study up on the issues. For instance, there is a choice of either taking the WLSMV approach of focusing the modeling on the continuous latent response variable underlying the binary observed variable, or taking the counterfactual causal effect approach (but this is not easy with 2-level models). I describe the issues of a binary mediator in my 2011 and 2014 mediation papers (see our website). With the WLSMV approach the mediator is then continuous so binary-specific issues may no longer be present.
 Katrin Lintorf posted on Monday, July 07, 2014 - 10:33 am
Thank you for the advice. Even if the binary mediator were not focal, my dependent variable is also binary. Furthermore, I have missings in my data. Please correct me, but the usual recommendation is to prefer ML over WLSMV in this case. Concerning that I am no statistician I won’t be able to apply the counterfactual causal effect approach on a 2-level-model. So I will try to keep it simple and divide my model in several regressions, following the classical mediation analysis. In doing so I would like to use the Mplus approach which decomposes covariates in two latent parts.

Now I hope that you can give me an advice or a reference as regards this difficulty: I would like to investigate, whether a compositional effect is mediated and I assume that the Mplus approach is analogous to group mean centering of manifest variables. So bc is not calculated (but should be the difference of bb and bw).

(1) How do I calculate the indirect effect in this case and why? I see two options:
(a) Do I first have to calculate the compositional effects for X-M (a) and M-Y (b) and then their product?
(b) Or do I first have to calculate the product of (a) and (b) on both levels and then the difference of the products?
What are the differences in meaning of the two options?
(2) How do I calculate the standard errors for the “right” option?

Thank you for any hints
Katrin
 Bengt O. Muthen posted on Monday, July 07, 2014 - 4:05 pm
I don't think I know the answers here; seems like it requires methods research.

I assume that you have a model like

Y ON M X;
M ON X;

extended to a 2-level setting with a W predictor of random effects on level 2. But your M and Y are binary.

With missing data on M or Y I would recommend ML over WLSMV.

Even if Y and M were continuous, I am not sure what you mean. By decomposing covariates I don't know if you mean decomposing X or M or both. You say you are interested in whether a compositional (contextual) effect is mediated - but I don't know if you are referring to a level-2 relationship. Perhaps a path diagram of your intentions would be helpful. On top of this your M and Y are binary and latent variable decompositions are tricky here.
 Katrin Lintorf posted on Tuesday, July 08, 2014 - 2:31 am
I am not sure, whether we think of the same model. Please, let me describe my context of application instead of a path model: We know that after primary school the individual SES explains the choice of a school track but beyond that, the mean SES of the class has additional explanatory value (compositional/contextual effect). Let’s consider a metric mediator: I assume that a higher SES results in higher aspirations which in turn promote the choice of a more demanding school track (Other assumptions contain the binary recommendation for a certain track by the teacher as a mediating variable). The questions are, whether the mediation partially/fully breaks up the direct compositional effect of SES on choice and how large the indirect effect is.

Now I would like to analyze my data by classical mediation analysis, i.e. using several regressions instead of a full path model. I thought of following the second part of ex. 9.1 in the users’s guide. The “implicit, latent group mean centering” led me to the questions in my last posting.

Would you still say that my aim requires further methods research or can you think of some suggestions/solutions as regards my questions?

Thank you for your efforts
Katrin
 Bengt O. Muthen posted on Wednesday, July 09, 2014 - 10:45 am
Maybe it would help if you show (a simplified version of) the Mplus input for the version of this model where all the variables are continuous.
 Katrin Lintorf posted on Friday, July 11, 2014 - 5:20 am
If all variables were continuous, I specified the following path model:

ANALYSIS: TYPE = TWOLEVEL;

MODEL: %WITHIN%
track_choice ON SES (c1);
track_choice ON Aspiration (b1);
Aspiration ON SES (a1);
SES track_choice Aspiration; !model missingness

%BETWEEN%
track_choice ON SES (c2);
track_choice ON Aspiration (b2);
Aspiration ON SES (a2);
SES track_choice Aspiration; !model missingness

By using MODEL CONSTRAINT I could calculate the direct contextual effect of SES as c2-c1 and the indirect effects as a1*b1 for Level 1 and a2*b2 for Level 2. Now, I am interested in the indirect contextual effect. I see two options:

MODEL CONSTRAINT: !see Q1a in posting above
NEW(indirect context_a context_b);
context_a = a2-a1;
context_b = b2-b1;
indirect = context_a*context_b;

MODEL CONSTRAINT: !see Q1b in posting above
NEW(context indirect_1 indirect_2);
indirect_1 = a1*b1;
indirect_2 = a2*b2;
context = indirect_2 - indirect_1;

My questions:
1) Which option is the right one for my purpose? Do you know any reference?
2) In case of separate regressions I will have to calculate SE and p manually. How do I calculate them for the respective option?

Thank you for any ideas and hints
Katrin
 Bengt O. Muthen posted on Friday, July 11, 2014 - 5:33 pm
I find page 140 of Raudenbush-Bryk's Second edition helpful where Table 5.11 shows the two alternatives. If you are interested in contextual effects, the right-most alternative gives beta_c directly. That approach would therefore seem to me as the one most useful to expand from regression to the mediation modeling you are interested in. That is, you would focus on the product of slopes on Between. I don't know about references on this specifically. You can still do latent variable decomposition, although I don't see that as essential.

I thought your major question was about switching from continuous to binary variables. In any case that's about all I have to say about this.
 Katrin Lintorf posted on Monday, July 14, 2014 - 10:56 am
I know the mentioned table - and your suggestion (product of slopes after grand-mean-centering) is, what I would have intuitively chosen. Unfortunately, I am not able to give good reasons and I had hoped that you could think of reasons/references to justify the decision.

Nevertheless, thank you for all your efforts and advices.
Katrin
 Christoph Weber posted on Saturday, July 19, 2014 - 3:51 am
Dear Mplus-Team!
How can I get contextual effects in threelevel models?

I use a simple model:

%within%
y ON X (bw);
x;
%between level2%
y ON X (bl2);
X;
%between level3%
y ON X (bl3);
X;

Is the contextual effect of x level2 = bl2 - bw and the contextual effect of x level3 = bl3 - bl2 - bw??
Or is it better to use manifest aggregation of X and use grandmean centering?

Thanks
Chrisotph
 Bengt O. Muthen posted on Saturday, July 19, 2014 - 4:13 pm
Look at the right column of Table 5.11 in the Raudenbush-Bryk book. Not doing group-mean centering gives you the contextual effects on the between levels. The RB book may also discuss this in the 3-level case. So, yes, for simplicity, do manifest aggregation of X and grandmean centering.
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: