Convergence issue: same model works in two samples, not in a third

Skip to first unread message

Jul 16, 2018, 12:21:07 PM7/16/18
to lavaan
Hi folks,

I'm trying to diagnose the source of a convergence problem in my data. Essentially, I have a model that works in two separate samples (where data were collected at a single point in time), but in a third sample (where data were collected at two points in time), there is a convergence issue. I've tried specifying starting values to levels that make sense, but this has not resolved my issue. 

Any advice? 


Terrence Jorgensen

Jul 17, 2018, 7:02:29 AM7/17/18
to lavaan
in a third sample (where data were collected at two points in time), there is a convergence issue.

So this model is a longitudinal model, different from the cross-sectional model for the first 2 groups?  Have you tried fitting the cross-sectional model to each occasion separately for the third group, to see if it converges on each?  If you post your syntax, it might show whether there is an identification issue.

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

Jul 20, 2018, 12:55:13 AM7/20/18
to lavaan
Thanks for responding, Terrence.

It might help you if you think of the model as exactly the same, but the data are gathered in such a way as to cause a temporal separation in measurement. In this data, here are the details: There are two conditions: (1) All data on the predictor and criterion are gathered simultaneously and (2) data on the predictor are gathered at time 1 and one week later data on the criterion are gathered. 

My syntax is below: <- '

##Substantive factors
PP =~ c(pp1a, pp1b)*PP1 + c(pp2a, pp2b)*PP2 + c(pp3a,pp3b)*PP3 + c(pp4a,pp4b)*PP4 + c(pp5a,pp5b)*PP5 + c(pp6a,pp6b)*PP6 + c(pp7a,pp7b)*PP7 + c(pp8a,pp8b)*PP8 + c(pp9a,pp9b)*PP9 + c(pp10a,pp10b)*PP10
IRB =~ c(irb1a,irb1b)*IRB1 + c(irb2a,irb2b)*IRB2 + c(irb3a,irb3b)*IRB3 + c(irb4a,irb4b)*IRB4 + c(irb5a,irb5b)*IRB5 + c(irb6a,irb6b)*IRB6 + c(irb7a,irb7b)*IRB7
OCBI =~ c(ocbi1a,ocbi1b)*OCBI1 + c(ocbi2a,ocbi2b)*OCBI2 + c(ocbi3a,ocbi3b)*OCBI3 + c(ocbi4a,ocbi4b)*OCBI4 + c(ocbi5a,ocbi5b)*OCBI5 + c(ocbi6a,ocbi6b)*OCBI6 + c(ocbi7a,ocbi7b)*OCBI7
OCBO =~ c(ocbo1a,ocbo1b)*OCBO1 + c(ocbo2a,ocbo2b)*OCBO2 + c(ocbo3a,ocbo3b)*OCBO3 + c(ocbo4a,ocbo4b)*OCBO4 + c(ocbo5a,ocbo5b)*OCBO5 + c(ocbo6a,ocbo6b)*OCBO6 + c(ocbo7a,ocbo7b)*OCBO7

##Method factors
PosAff =~ c(1,1)*PA + c(papp1a, papp1b)*PP1 + c(papp2a, papp2b)*PP2 + c(papp3a,papp3b)*PP3 + c(papp4a,papp4b)*PP4 + c(papp5a,papp5b)*PP5 + c(papp6a,papp6b)*PP6 + c(papp7a,papp7b)*PP7 + c(papp8a,papp8b)*PP8 + c(papp9a,papp9b)*PP9 + c(papp10a,papp10b)*PP10 + c(pairb1a,pairb1b)*IRB1 + c(pairb2a,pairb2b)*IRB2 + c(pairb3a,pairb3b)*IRB3 + c(pairb4a,pairb4b)*IRB4 + c(pairb5a,pairb5b)*IRB5 + c(pairb6a,pairb6b)*IRB6 + c(pairb7a,pairb7b)*IRB7 + c(paocbi1a,paocbi1b)*OCBI1 + c(paocbi2a,paocbi2b)*OCBI2 + c(paocbi3a,paocbi3b)*OCBI3 + c(paocbi4a,paocbi4b)*OCBI4 + c(paocbi5a,paocbi5b)*OCBI5 + c(paocbi6a,paocbi6b)*OCBI6 + c(paocbi7a,paocbi7b)*OCBI7 + c(paocbo1a,paocbo1b)*OCBO1 + c(paocbo2a,paocbo2b)*OCBO2 + c(paocbo3a,paocbo3b)*OCBO3 + c(paocbo4a,paocbo4b)*OCBO4 + c(paocbo5a,paocbo5b)*OCBO5 + c(paocbo6a,paocbo6b)*OCBO6 + c(paocbo7a,paocbo7b)*OCBO7
PA ~~ ((1-.921)*0.824)*PA

#Compute factor loading differences 
pp1c := pp1a-pp1b
pp2c := pp2a-pp2b
pp3c := pp3a-pp3b
pp4c := pp4a-pp4b
pp5c := pp5a-pp5b
pp6c := pp6a-pp6b
pp7c := pp7a-pp7b
pp8c := pp8a-pp8b
pp9c := pp9a-pp9b
pp10c := pp10a-pp10b
irb1c := irb1a-irb1b
irb2c := irb2a-irb2b
irb3c := irb3a-irb3b
irb4c := irb4a-irb4b
irb5c := irb5a-irb5b
irb6c := irb6a-irb6b
irb7c := irb7a-irb7b
ocbi1c := ocbi1a-ocbi1b
ocbi2c := ocbi2a-ocbi2b
ocbi3c := ocbi3a-ocbi3b
ocbi4c := ocbi4a-ocbi4b
ocbi5c := ocbi5a-ocbi5b
ocbi6c := ocbi6a-ocbi6b
ocbi7c := ocbi7a-ocbi7b
ocbo1c := ocbo1a-ocbo1b
ocbo2c := ocbo2a-ocbo2b
ocbo3c := ocbo3a-ocbo3b
ocbo4c := ocbo4a-ocbo4b
ocbo5c := ocbo5a-ocbo5b
ocbo6c := ocbo6a-ocbo6b
ocbo7c := ocbo7a-ocbo7b
papp1c := papp1a-papp1b
papp2c := papp2a-papp2b
papp3c := papp3a-papp3b
papp4c := papp4a-papp4b
papp5c := papp5a-papp5b
papp6c := papp6a-papp6b
papp7c := papp7a-papp7b
papp8c := papp8a-papp8b
papp9c := papp9a-papp9b
papp10c := papp10a-papp10b
pairb1c := pairb1a-pairb1b
pairb2c := pairb2a-pairb2b
pairb3c := pairb3a-pairb3b
pairb4c := pairb4a-pairb4b
pairb5c := pairb5a-pairb5b
pairb6c := pairb6a-pairb6b
pairb7c := pairb7a-pairb7b
paocbi1c := paocbi1a-paocbi1b
paocbi2c := paocbi2a-paocbi2b
paocbi3c:= paocbi3a-paocbi3b
paocbi4c := paocbi4a-paocbi4b
paocbi5c := paocbi5a-paocbi5b
paocbi6c := paocbi6a-paocbi6b
paocbi7c := paocbi7a-paocbi7b
paocbo1c := paocbo1a-paocbo1b
paocbo2c := paocbo2a-paocbo2b
paocbo3c := paocbo3a-paocbo3b
paocbo4c := paocbo4a-paocbo4b
paocbo5c := paocbo5a-paocbo5b
paocbo6c := paocbo6a-paocbo6b
paocbo7c := paocbo7a-paocbo7b

#Factor variances are fixed to 1 to allow estimation.
###Substantive factors
PP ~~ c(1,1)*PP
IRB ~~ c(1,1)*IRB
OCBI ~~ c(1,1)*OCBI
OCBO ~~ c(1,1)*OCBO

##Factor covariances freely estimated (with the exception being the bifactors). However, correlations with the method factors are fixed to zero. Method factors are also constrained to zero.
PP ~~ c(0,0)*PosAff
IRB ~~ c(0,0)*PosAff
OCBI ~~ c(0,0)*PosAff
OCBO ~~ c(0,0)*PosAff

#Compute factor covariances differences.

#Factor means of the both groups are fixed at zero to allow identification.
##Substantive factors
PP ~ c(0, 0)*1
IRB ~ c(0, 0)*1
OCBI ~ c(0, 0)*1
OCBO ~ c(0, 0)*1
methodu <- cfa(, ordered = c("PP1", "PP2", "PP3", 
                                              "PP4", "PP5", "PP6", "PP7", "PP8", "PP9", "PP10", 
                                              "IRB1", "IRB2", "IRB3", "IRB4", "IRB5", "IRB6", "IRB7", "OCBI1",
                                              "OCBI2", "OCBI3", "OCBI4", "OCBI5", "OCBI6", "OCBI7", "OCBO1", 
                                              "OCBO2", "OCBO3", "OCBO4", "OCBO5", "OCBO6", "OCBO7"),
                  group = "COND", data = data3, estimator = "DWLS", parameterization = "theta", information = "expected",

Terrence Jorgensen

Jul 20, 2018, 4:50:57 AM7/20/18
to lavaan
I've seen convergence issues with bifactor and especially MTMM models before, when factors were allowed to correlate.  Does the model converge if all factors are orthogonal?

Also, this is not really a bifactor model as it is traditionally applied.  The factor on which all items load is typically the general substantive factor, whereas each item also loads on one method factor (orthogonal to the substantive factor and often to each other).  In your case, you do not have 1 substantive factor, you have 4.  And you cannot partition out any method variance if you only have a single method that was used to measure all indicators.  The whole point is that there are systematic differences between different methods, which you model by specifying different method factors to explain those.  You might want to ask about this issue on SEMNET, where there are several people with more experience fitting bifactor models who might understand something helpful to you.

Yves Rosseel

Jul 30, 2018, 1:19:26 PM7/30/18
Another things you may try out:

- use the argument optim.init_nelder_mead = TRUE
- switch to another optimizer, eg optim.method = "bfgs" (or "l-bfgs-b")

I would also suggest to start with a much smaller model, and than expand
the model bit by bit.

Reply all
Reply to author
0 new messages