New to lavaan: Getting an error after model fit

337 views
Skip to first unread message

Fae Millongo

unread,
Apr 18, 2023, 4:16:37 AM4/18/23
to lavaan
Hi colleagues,

I am getting an error in lavaan after running a MIMIC model for the effect of maternal empowerment on underfive malnutrition using Demographic Health Survey data, I found a certain thread with some solutions usbut i did not understand since I am new to lavaan.

Here's the error:

summary(fit) lavaan 0.6.15 did NOT end normally after 2918 iterations ** WARNING ** Estimates below are most likely unreliable Estimator ML Optimization method NLMINB Number of model parameters 30 Used Total Number of observations 370 16058 Parameter Estimates: Standard errors Standard Information Expected Information saturated (h1) model Structured Latent Variables: Estimate Std.Err z-value P(>|z|) child_malnutrition =~ stunting 1.000 wasting 0.344 NA underweight 320.800 NA Regressions: Estimate Std.Err z-value P(>|z|) child_malnutrition ~ colostrum 0.000 NA ors -0.000 NA familyplanning -0.000 NA foodgroups -0.000 NA visits 0.000 NA occupation -0.000 NA respIncome 0.000 NA resphealthdec -0.000 NA lhhpurchases -0.000 NA ownhouse 0.000 NA wland 0.000 NA maternalage -0.000 NA maternaleduc 0.000 NA BMI_cat -0.000 NA child_age 0.000 NA childgender -0.000 NA birthorder 0.000 NA twin 0.001 NA residence 0.000 NA hhhage -0.000 NA hhgender -0.000 NA religion 0.000 NA wstatus -0.000 NA anc 0.000 NA Variances: Estimate Std.Err z-value P(>|z|) .stunting 0.205 NA .wasting 0.031 NA .underweight -17.575 NA .child_malntrtn 0.000 NA
Here's the code that I used:
indicators <- c("stunting", "wasting", "underweight")

independent_vars<- c("colostrum", "ors", "familyplanning","foodgroups", "visits", "occupation", "respIncome", "resphealthdec", "lhhpurchases", "ownhouse", "wland")

control_vars <- c("maternalage", "maternaleduc", "BMI_cat", "wland", "child_age", "childgender", "birthorder", "twin", "residence", "hhhage", "hhgender", "residence", "religion", "wstatus", "anc")

model<- "
  # Latent variable with indicators
  child_malnutrition =~ stunting + wasting + underweight

  # Independent variables
  child_malnutrition ~ colostrum + ors + familyplanning + foodgroups + visits + occupation + respIncome + resphealthdec + lhhpurchases + ownhouse + wland
 
  # Control variables
  child_malnutrition ~ maternalage + maternaleduc + BMI_cat + child_age + childgender + birthorder + twin + residence + hhhage + hhgender + residence + religion + wstatus + anc
"

fit <- sem(model, data = April_4_Dat)

summary(fit)
Please assist. I have been trying the model for a month now. Today I have just come across this group. Thank you team.

Faith

Terrence Jorgensen

unread,
Apr 18, 2023, 9:03:35 AM4/18/23
to lavaan
Your underweight variance seems to be much larger than other variances.  Try dividing it by 10 or 100 to make the SDs more similar across modeled variables. 

Also, are you sure it is appropriate to model child_malnutrition as a common factor?  Sometimes composites are better represented as formative constructs.  It may be worth looking into confirmatory composite analysis, if you are interested in the "measurement" properties of the composite.


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

Faith Millongo

unread,
Apr 18, 2023, 10:09:06 AM4/18/23
to lav...@googlegroups.com
Thanks Prof Terrence,


Your underweight variance seems to be much larger than other variances.  Try dividing it by 10 or 100 to make the SDs more similar across modeled variables.

Please share a syntax on how I can do this. 

And thank you for the video. I will have a look at it. Hoping that my model will converge.

Thanks Prof


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/5dadbef8-7c05-44ea-be37-11843269a6c9n%40googlegroups.com.

Jasper Bogaert

unread,
Apr 18, 2023, 10:34:12 AM4/18/23
to lavaan
Hi,

(Not entirely sure, but) I think you should just divide the variable underweight by 10 or 100, just try this: 

underweight.small <- underweight/100

and then use the variable  underweight.small  in your model syntax instead of underweight. This will make sure that the standard deviation is more similar to those of the other variables in your model.

Best regards,

Jasper

Op dinsdag 18 april 2023 om 16:09:06 UTC+2 schreef mill...@gmail.com:

Keith Markus

unread,
Apr 18, 2023, 11:51:32 AM4/18/23
to lavaan
Faith,
The below article may be of interest to you if you are interested in measurement properties of a composite. The article focuses on formative measurement which differs from composite models by allowing a disturbance term with a non-zero variance.  However, the same general considerations apply.

Markus, K. A. (2018).  Three conceptual impediments to developing scale theory for formative scales.  Methodology, 14, 156-164.  doi: 10.1027/1614-2241/a000154

Abstract: Bollen and colleagues have advocated the use of formative scales despite the fact that formative scales lack an adequate underlying theory to guide development or validation such as that which underlies reflective scales. Three conceptual impediments impede the development of such theory: the redefinition of measurement restricted to the context of model fitting, the inscrutable notion of conceptual unity, and a systematic conflation of item scores with attributes. Setting aside these impediments opens the door to progress in developing the needed theory to support formative scale use. A broader perspective facilitates consideration of standard scale development concerns as applied to formative scales including scale development, item analysis, reliability, and item bias. While formative scales require a different pattern of emphasis, all five of the traditional sources of validity evidence apply to formative scales. Responsible use of formative scales requires greater attention to developing the requisite underlying theory.

Keith

------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/

Faith Millongo

unread,
Apr 22, 2023, 11:32:57 PM4/22/23
to lav...@googlegroups.com
Thank you all.

So i tried creating a composite variable for child malnutrition:  childmalnutrition_comp =~ 0.5*stunting + 0.3*wasting + 0.2*underweight

and the model converged after
summary(fit, fit.measures= TRUE, standardized = TRUE, rsquare=TRUE).

However, I would like to capture the effect of each of the independent variables on stunting, wasting and underweight as child malnutrition indicators. I am not able to capture this if I measure child malnutrition as a composite variable. refer to my code below:
# Define child malnutrition composite variable
childmalnutrition_comp =~ 0.5*stunting + 0.3*wasting + 0.2*underweight

# Create model syntax

model <- "
  # Latent variable with indicators
  childmalnutrition_comp ~ colostrum + ors + familyplanning + foodgroups + visits + occupation + respIncome + resphealthdec + lhhpurchases + ownhouse + wland

  # Control variables
  childmalnutrition_comp ~ maternalage + maternaleduc + BMI_cat + child_age + childgender + birthorder + twin + residence + hhhage + hhgender + religion + wstatus + anc
"

# Fit model
fit <- sem(model, data = April_4_Dat).

Data attached

--
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.

Faith Millongo

unread,
Apr 25, 2023, 11:29:45 PM4/25/23
to lav...@googlegroups.com
Please assist me

Edward Rigdon

unread,
Apr 26, 2023, 10:27:31 AM4/26/23
to lav...@googlegroups.com
     You certainly could specify the other variables as predictors of stunting, wasting and underweight. You don't need the "child malnutrition" construct for that.
     The under-identification in your factor model may be due to low correlations between the three indicators, but may also be the result of widely varying variances across the three indicators. Software sometimes behaves like this if variances are substantially different. If that is the case, try dividing the larger variance indicator values by some constant like 10 or 100 to bring it more into line with the others.
--Ed Rigdon

Faith Millongo

unread,
May 11, 2023, 7:12:52 AM5/11/23
to lav...@googlegroups.com
Thank you everyone. My model finally converged. I tried fitting the model per indicator, and it worked.

Thank you very much.

Reply all
Reply to author
Forward
0 new messages