Finding Right Lavaan Tool for My Multilevel Data

40 views
Skip to first unread message

rjrich...@gmail.com

unread,
Oct 25, 2018, 9:09:00 AM10/25/18
to lavaan
Hi Lavaan users group,

I am trying to fit a model with both latent and observed indicator variables. As shown in the image below (how I'm conceptualizing my model), I am thinking that two observed variables at level 2 interact to influence a mediation measured at level 1, which in turn, predicts two outcome variables measured at level 1.

lavaanModel.jpg


While I was thinking that I was going to be able to answer this question using lavaan multilevel sem, I can see that having dichotomous indicators for my mediator will be problematic. As far as I understand it, multilevel sem in lavaan works only when all variables are continuous. My question for the group is whether there are any other solutions for testing this model using lavaan? I would prefer not to use black box software like Mplus. Maybe the lavaan.survey package would be appropriate? I'm not sure but it might work because the data are clustered and I'm using predictors measured at level 2.

Thanks for any help.

Terrence Jorgensen

unread,
Oct 26, 2018, 5:47:52 AM10/26/18
to lavaan
As far as I understand it, multilevel sem in lavaan works only when all variables are continuous.

Currently correct.

My question for the group is whether there are any other solutions for testing this model using lavaan? I would prefer not to use black box software like Mplus.

How many indicators of the mediator?  You could sum them to create a single observed mediator to run this in lavaan.  The power to detect mediated effects would only be substantially lower if your items are not reliable (low loadings) and you don't have many of them. 

If you are savvy with programming, you could use blavaan (the Bayesian extension) to specify a basic basic model using lavaan syntax, then update the generated JAGS or Stan syntax as needed to fit your actual model.

Maybe the lavaan.survey package would be appropriate? I'm not sure but it might work because the data are clustered and I'm using predictors measured at level 2.

lavaan.survey also does not handle categorical endogenous variables.  I think lavaan might still offer cluster-robust SEs with categorical outcomes, so you could try that, but I'm not sure how badly biased your estimated effects would be if you couldn't account for the fact that your causes only vary at Level 2.

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

James Rae

unread,
Oct 26, 2018, 6:31:45 AM10/26/18
to lav...@googlegroups.com
On Fri, Oct 26, 2018 at 5:47 AM Terrence Jorgensen <tjorge...@gmail.com> wrote:
As far as I understand it, multilevel sem in lavaan works only when all variables are continuous.

Currently correct.

My question for the group is whether there are any other solutions for testing this model using lavaan? I would prefer not to use black box software like Mplus.

How many indicators of the mediator?  You could sum them to create a single observed mediator to run this in lavaan.  The power to detect mediated effects would only be substantially lower if your items are not reliable (low loadings) and you don't have many of them. 


There are 3 dichotomous indicators for the mediator. I'm sure the loadings will be high for these 3 items, but it's still not that many to sum and treat as continuous.
 
If you are savvy with programming, you could use blavaan (the Bayesian extension) to specify a basic basic model using lavaan syntax, then update the generated JAGS or Stan syntax as needed to fit your actual model.

Maybe the lavaan.survey package would be appropriate? I'm not sure but it might work because the data are clustered and I'm using predictors measured at level 2.

lavaan.survey also does not handle categorical endogenous variables.  I think lavaan might still offer cluster-robust SEs with categorical outcomes, so you could try that, but I'm not sure how badly biased your estimated effects would be if you couldn't account for the fact that your causes only vary at Level 2.

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

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages