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