SEM Model not Converging

1,588 views
Skip to first unread message

Fundira Talent

unread,
Feb 28, 2023, 7:51:14 PM2/28/23
to lav...@googlegroups.com
May you please assist me! 

My model for SEM is not converging, lavaan is giving me an error  message; Warning message:
In lav_object_summary(object = object, header = header, fit.measures = fit.measures,  :
  lavaan WARNING: fit measures not available if model did not converge.
Background: Initially my odinal data (on likert scale -5) was giving me an error message for non positive definiteness NPD,usisng "WLSMV" as my estimator. I then applied smoothing procedure, and then used the resultant sample covariance matrix to run my model, and which is giving me non-convergence error message. Below is the code i am running and the results coming up. 
May you please advise which estimator is the best when running ordinal data using sample cov matrix as well.

trial <- read.csv("GoatsNu.csv")
trialdata <-trial %>% dplyr::select(c("prodcapcommercialbreeds":"fapeensustainability"))

VarHeadings <- c( "Q01", "Q02", "Q03", "Q04", "Q05", "Q06", "Q07",
                  "Q08", "Q09", "Q10", "Q11", "Q12", "Q13", "Q14",
                  "Q15", "Q16", "Q17", "Q18", "Q19","Q20", "Q21",
                  "Q22","Q23", "Q24", "Q25", "Q26", "Q27","Q28",
                  "Q29", "Q30", "Q31", "Q32", "Q33","Q34", "Q35",
                  "Q36", "Q37", "Q38", "Q39", "Q40","Q41")
names(trialdata) <- VarHeadings
colnames(trialdata)
trialdata <- cor.smooth(trialdata, eig.tol=10^-12)
cor.smoother(trialdata,cut=.01)


#Measurement Model
m7a<-'PCap =~ Q01 + Q02 + Q03 +Q04 +Q05+Q06 + Q07
GvP =~ Q08 + Q09 +Q10 +Q11+ Q12 + Q13  
FnI =~ Q14 +Q15+ Q16+ +Q17+ Q18  
MAO =~ Q19 + Q20 + Q21+Q22+Q23+ Q24  
CapD =~ Q25 + Q26 +Q27+Q28+Q29+Q30
MIP=~ Q31+Q32+Q33+Q34+Q35+Q36
FIP =~  Q37 +Q38 +Q39+Q40+Q41
#Constrain variance

# Regressions
FIP ~ GvP + FnI + PCap+ MAO + MIP+ CapD'

ml7a <- sem(m7a, sample.cov = trialdata,sample.nobs = 156, std.lv=TRUE)
summary(ml7a, standardized=TRUE, fit.measures=TRUE)
semPaths (ml7a, what = "paths", whatLabels = "par")

Results are shown in pictures here attached;

image.png
image.png
image.png
image.png
I am also suspecting collinearity is the problem and I do not know how to deal with it, I am still new to SEM and lavaan.

Please kindly help.


Rönkkö, Mikko

unread,
Mar 1, 2023, 12:44:55 AM3/1/23
to lav...@googlegroups.com

Hi,

 

Instead of applying a smoother, you should try to understand why the covariance matrix is nonpositive definite. Non-positive definiteness means that at least one of the variables either does not have variance or is perfectly predicted by other variables. This may occur because of data preparation error. Inspect the variance and for example regress each indicator on all others one at a time.

 

Another thing that I see is that the FIP factor seems really weird. Are the indicators correlated? If the indicators are not correlated, then the factor vanishes and the model cannot be estimated. I suggest estimating just a model for FIP to see if that converges. If not, inspect the covariances. If they are low, the factor does not exist and you need to rethink your model.

 

I taught a short class about model convergence last spring. If you are new to model non-convergence, you might find the materials useful:

 

https://www.youtube.com/watch?v=4_ip9F8EpVs&list=PL6tc6IBlZmOVpqQ94Oy6OouHHZ2QNGXRQ

 

The first is just a general intro and the second video goes to the topic. I used stata for the examples, but what I explain applies to R as well.

 

Mikko

I am also suspecting collinearity is the problem and I do not know how to deal with it, I am still new to SEM and lavaan.
 
Please kindly help.
 
 

--
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/CAJsFmQzEchG%3DUR%2B4ZsTu3mGX%3DuOO47bFrsBpG3hh281KqNODTA%40mail.gmail.com.

Fundira Talent

unread,
Mar 1, 2023, 7:31:21 AM3/1/23
to lav...@googlegroups.com
Thank you so much, I will follow your steps to investigate the culture of NPD, maybe I will drop other items first before dropping the whole variable, do you think it is possible?

Many many thanks

Reply all
Reply to author
Forward
0 new messages