different types of exogenous variable in SEM

916 views
Skip to first unread message

Piyush Shah

unread,
Apr 24, 2017, 4:11:51 PM4/24/17
to lavaan
'
#measurement model
     fl =~ Q05r_typsumtemp + Q05r_waves + Q05r_pwrhot + Q05r_cold + Q05r_pwrco + Q05r_uhi + Q05r_cc + Q05r_air
#regressions
     fl ~ Q21 + Q22 + Q39 + Q26
#residual correlations
     Q05r_typsumtemp ~~ Q05r_waves + Q05r_pwrhot
     Q05r_waves ~~ Q05r_pwrhot
     Q05r_cold ~~ Q05r_pwrco
     Q05r_uhi ~~ Q05r_cc + Q05r_air
     Q05r_cc ~~ Q05r_air
 '


I have these problems in the above model. 
1. The dependent variables of measurement model are all ordered factors with five levels. However some variables have empty categories. I am not sure if I can collapse the empty categories. 
2. In the regression, Q21 is a factor with 3 levels, Q22 is an integer and Q 39 is a factor with 2 levels. Is this okay?

I get these warning messages:
Error in lav_samplestats_step1(Y = Data, ov.names = ov.names, ov.types = ov.types,  : 
  lavaan ERROR: some categories of variable `Q05r_waves' are empty in group 1; frequencies are [13 32 0 52 57]
In addition: Warning message:
In lav_data_full(data = data, group = group, cluster = cluster,  :
  lavaan WARNING: exogenous variable(s) declared as ordered in data: Q21 Q39 Q26

Please help

Terrence Jorgensen

unread,
Apr 25, 2017, 5:33:07 AM4/25/17
to lavaan
1. The dependent variables of measurement model are all ordered factors with five levels. However some variables have empty categories. I am not sure if I can collapse the empty categories. 

If a category has zero observations in one group, then there is no way to synchronize the meaning of the thresholds across groups.  Collapsing categories is the only "solution" I am familiar with, but you might find other advice on SEMNET:


2. In the regression, Q21 is a factor with 3 levels, Q22 is an integer and Q 39 is a factor with 2 levels. Is this okay?

No, you need to create indicator variables, like dummy codes or effects codes, then put those in the model syntax:


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

Piyush Shah

unread,
Apr 25, 2017, 12:46:21 PM4/25/17
to lavaan
Thanks Terrence,

1. I will collapse the categories to ensure that there are no blank categories.

2,   I am still confused about that second error:   lavaan WARNING: exogenous variable(s) declared as ordered in data: Q21 Q39 Q26
I had seen the page you suggested and converted them to ordered categorical variables as the page suggested. 

Terrence Jorgensen

unread,
Apr 26, 2017, 2:03:17 AM4/26/17
to lavaan
2,   I am still confused about that second error:   lavaan WARNING: exogenous variable(s) declared as ordered in data: Q21 Q39 Q26
I had seen the page you suggested and converted them to ordered categorical variables as the page suggested. 

That advice is for endogenous variables (outcomes).  Your warning is about exogenous variables (predictors). See the top section of that page, telling you to use k-1 dummy codes.
Reply all
Reply to author
Forward
0 new messages