Multilevel Mediation in Lavaan, centering of variables

635 views
Skip to first unread message

TheSamplethief

unread,
Mar 31, 2021, 6:21:30 AM3/31/21
to lavaan
Hello everyone,

I want to perform Multilevel Mediation Analyses in R with Lavaan, but I came across a Problem:

Normally, at least that is what I've learned, it is important to group-mean center level-1 variables and grand-mean center level-2 variables for multilevel analyses. So that's what I did when trying to do multilevel mediation in lavaan as well.

Not surprising, I got tons of errors when first trying, but after lots of troubleshooting, I simply went for the non-centered variables and it worked perfectly.

So my question is: Is it not necessary to do group/grand-mean centering for multilevel mediation analyses in lavaan (maybe because Lavaan does the centering itself by default)?

Thanks in advance for you help!

Terrence Jorgensen

unread,
Mar 31, 2021, 2:10:21 PM3/31/21
to lavaan

it is important to group-mean center level-1 variables and grand-mean center level-2 variables for multilevel analyses.

Only predictors.  If you group-mean-center the outcome, there can be no Level-2 variance.   And if you group-mean-center a predictor, then its Level-2 component (i.e., the cluster means) will not be able to explain any Level-2 variance unless you also include that as a predictor.  The advice in MLM to do mean centering is entirely dependent on how you want to interpret coefficients (and variance components), so you wouldn't mean-center dummy codes, because 0 already has a useful meaning.    

So my question is: Is it not necessary to do group/grand-mean centering for multilevel mediation analyses in lavaan (maybe because Lavaan does the centering itself by default)?

lavaan automatically separates the within and between components of Level-1 variables, so there is no need.  But since you can have fixed-effects of exogenous Level-1 variables that do not appear in the Level-2 model (see the ?Demo.twolevel help-page example), you could very well cluster-mean-center them if you wanted.  Regardless, yes you can grand-mean-center exogenous Level-2 variables if you want to be able to interpret the intercept that way.  

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Dark Sleep

unread,
Apr 1, 2021, 12:36:42 PM4/1/21
to lav...@googlegroups.com
Thanks a lot for the very helpful answer!

Am Mittwoch, 31. März 2021, 20:18:05 MESZ hat Terrence Jorgensen <tjorge...@gmail.com> Folgendes geschrieben:


--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/KLRELn4f5AU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lavaan/0892bb3c-75ab-465e-83de-976d3cf3aef9n%40googlegroups.com
.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages