0

I am using multilevel SEM to investigate the influence of intelligence on the occurrence of team conflict and to examine the impact of conflict on team performance in multicultural teams. intelligence has been measured at the individual level and conflict and performance have been measured at the team level. Intelligence and conflict are latent variables in which each is measured by three observed variables (x1, x2, x3 for measuring intelligence and y1, y2, y3 for measuring conflict). I am analyzing the data by R and lavaan package. Here is my code:

model<-' 
level: 1 
intelligence=~x1+x2+x3
Level: 2
conflict=~y1+y2+y3
conflict~intelligence
performance~conflict'
fitmodel <- cfa(model, data=mydata, std.lv=FALSE, cluster="team_id")

However, I get this error when I run my code:

Error in lav_data_full(data = data, group = group, cluster = cluster, : lavaan ERROR: missing observed variables in dataset: intelligence

I would appreciate if you can help me to resolve this error.

Mah Dav
  • 1
  • 2

2 Answers2

1

I got this from the lavaan page: (https://lavaan.ugent.be/tutorial/before.html)

Some important features are NOT available (yet):

full support for hierarchical/multilevel datasets (multilevel cfa, multilevel sem); however version 0.6 supports two-level cfa/sem with random intercepts only, for continuous complete data

support for variable types other than continuous, binary and ordinal (for example: zero-inflated count data, nominal data, non-Gaussian continuous data)

support for discrete latent variables (mixture models, latent classes)

I suspect that you've violated against the continuous complete data

Thallasos
  • 11
  • 1
0

Besides the acknowledgment that lavaan's MSEM is limited I can offer the additional pointers because there are some flaws in your model specification:

  1. Lavaan treats level 1 and level2 models separately. Therefore if you want to use intelligence as a predictor in level 2, you must specify the measurement model again at level 2.

  2. I am not an expert at SEM so this point could be wrong. But I do feel confused about your level 1 and 2 specifications in general. For instance if your DV was Y, then Y should be present at level 1 and level 2 since it has within and between group variance. But you specify only one measurement model at level 1 and a bunch of new ones at level 2.

Sazid Ahmad
  • 101
  • 2