[Mediation-information] Multilevel analysis for complex surveys

Angel Rodriguez angel.rodriguez at matiainstituto.net
Tue Aug 26 18:49:49 CEST 2014


Dear subscribers,

I want to carry out a mediation analysis with variables collected in a survey (for more information, see the thread "causally dependent mediators"). It was a complex survey with strata and individuals clustered in census sections. I do not have census section variables, but I want the models to be aware that individuals are not independent because they're grouped in census sections.

My first question is if I should use mediation with glmer.

In that case, my second question would be about the syntax to carry out this. In the example in Tingley's "mediation: R Package for Causal Mediation Analysis", the proposed models are:


R> library(lme4)
R> set.seed(2014)
R> med.fit <- glmer(attachment ~ catholic + gender + income + pared + (1|SCH_ID),
+ family = binomial(link = "logit"), data = student)
R> out.fit <- glmer(fight ~ catholic*attachment +
+ gender + income + pared + (1 + attachment|SCH_ID),
+ family = binomial(link = "logit"), data = student)

I don't understand why in med.fit the term related to the clustering units is (1|SCH_ID), while (1 + attachment|SCH_ID) is the term in the out.fit.

Thank you very much,

Angel Rodriguez-Laso
Research Project Manager
Matia Instituto Gerontologico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20140826/5228e3ae/attachment.html>


More information about the Mediation-information mailing list