[R-sig-ME] Mixed models and mediation

Adam D. I. Kramer adik at ilovebacon.org
Tue Dec 1 07:30:48 CET 2009


 	Could anyone recommend a document or resource for doing a mediation
analysis for some glmer models?  I've seen a few hints of "mediation using
mixed models" in general online (something akin to "do a sobel test with the
estimates and standard errors, but bootstrap significance"), but no examples
of anybody doing this in R.

 	My research question is basically summarized like this: Does whether
a person (subjID) chooses an option offered to them (chosen) depend on the
value of that option (value) as well as how many options they've seen
already (option)?  Specifically, does adding "value" to the model partially
mediate the role that option plays?  There is also another nesting factor, a
between-subjects condition (thisDist), in which values are nested.

g <- glmer(chosen ~ option + value + (1|subjID) + (value|thisDist), data=r1,

...my intuition would be to use boot() to randomly vary the levels of
"value" within each subject and re-run glmer() a few thousand times to
estimate a standard error for the fixed effect of "option" with something
like "value" in the model, but I wanted to see whether anybody had done an
analysis like this before I think too hard about reinventing the wheel.

Many thanks,
Adam D. I. Kramer
Ph.D. Candidate, Social Psychology
University of Oregon
adik at uoregon.edu

More information about the R-sig-mixed-models mailing list