mediation analysis with mixed models

203 views
Skip to first unread message

Konstantinos Chiotis

unread,
Nov 6, 2015, 8:06:32 AM11/6/15
to lavaan
Dear all,

I am quite new in mediation analysis and especially using lavaan. I would like to run mediation analysis (bootstrapping) for mixed models and I find it quite challenging. 

My outcome (Y) is an ordered categorical variable, ordinal, while my treatment (X) and mediator (M) are continuous. Therefore I use a cumulative link mixed model in combination to a linear mixed effect model. My script is looking like this:

lme(M ~ X, random=~1|ID, data=test)
clmm2(Y ~ X + M, random=ID, data=test)

My first question is whether I can perform the bootstrapping in lavaan. If yes could someone with a little bit more experience help me start?

I have a couple of covariates for the models, however including those I guess is the easy part of the story.

Any help is much appreciated.

Thanks

Kostas

Terrence Jorgensen

unread,
Nov 8, 2015, 4:48:38 AM11/8/15
to lavaan
I am quite new in mediation analysis and especially using lavaan. I would like to run mediation analysis (bootstrapping) for mixed models and I find it quite challenging. 

lavaan does not handle mixed-effects models.  You are using an unrelated package (nlme) in your syntax.

My first question is whether I can perform the bootstrapping in lavaan. If yes could someone with a little bit more experience help me start?

If you were actually fitting a model in lavaan, you could look at the example in the help page ?bootstrapLavaan, but since you are not using lavaan, you would need to look into using the R package "boot"


Terry

Reply all
Reply to author
Forward
0 new messages