Convergence issue

4,022 views
Skip to first unread message

Tiffany

unread,
Sep 11, 2014, 5:48:04 PM9/11/14
to lav...@googlegroups.com
Hi everyone, 

I am trying to fit a relatively simple SEM, but I keep getting non-convergence error that I can't seem to understand. 
Any comment would be much appreciated.  Thank you so much. 

CODE:
model<-'
# measurement model 
XR_H=~HV205+Sanavg
TR_H=~HV201+HV209+HV237+HV213
H_C=~age+V501+H11
D_H=~H11+V404+age

# regressions
D_H~XR_H+TR_H
# residual correlations
'

fit <- sem(model, data = ind_new, link="logit", ordered=c("HV205,H11,V404"))
summary(fit, fit.measures= TRUE, standardized = TRUE, rsquare=TRUE)


WARNING: 
In lavaan::lavaan(model = model, data = ind_new, ordered = c("HV205,H11,V404"),  :
  lavaan WARNING: model has NOT converged!


SUMMARY:
** WARNING ** lavaan (0.5-16) did NOT converge after 10000 iterations
** WARNING ** Estimates below are most likely unreliable

                                                  Used       Total
  Number of observations                         47745       48243

  Estimator                                       DWLS
  Minimum Function Test Statistic                   NA
  Degrees of freedom                                NA
  P-value (Unknown)                                 NA

Parameter estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem

                   Estimate  Std.err  Z-value  P(>|z|)   Std.lv  Std.all
Latent variables:
  XR_H =~
    HV205             1.000                               0.342    0.739
    Sanavg            0.727                               0.249    0.824
  TR_H =~
    HV201             1.000                               0.058    0.155
    HV209             4.029                               0.235    0.611
    HV237             2.820                               0.164    0.335
    HV213             5.138                               0.299    0.601
  H_C =~
    age               1.000                              47.731   30.368
    V501             -0.000                              -0.002   -0.017
    H11               0.000                               0.000    0.000
  D_H =~
    H11               0.000                               0.000    0.000
    V404              0.039                               0.136    0.287
    age             -14.214                             -49.928  -31.766

Regressions:
  D_H ~
    XR_H              5.289                               0.515    0.515
    TR_H            -84.835                              -1.407   -1.407
  H11 ~
    H_C              -0.022                              -1.068   -3.697
    D_H               0.320                               1.123    3.885

Covariances:
  XR_H ~~
    TR_H              0.018                               0.889    0.889
    H_C             -12.555                              -0.769   -0.769
  TR_H ~~
    H_C              -2.760                              -0.993   -0.993

Intercepts:
    HV205             0.312                               0.312    0.673
    Sanavg            0.334                               0.334    1.105
    HV201             0.828                               0.828    2.198
    HV209             0.180                               0.180    0.468
    HV237             0.405                               0.405    0.825
    HV213             0.460                               0.460    0.922
    age               2.913                               2.913    1.853
    V501              1.016                               1.016    8.087
    H11               0.092                               0.092    0.318
    V404              0.662                               0.662    1.398
    XR_H              0.000                               0.000    0.000
    TR_H              0.000                               0.000    0.000
    H_C               0.000                               0.000    0.000
    D_H               0.000                               0.000    0.000

Variances:
    HV205             0.097                               0.097    0.454
    Sanavg            0.029                               0.029    0.321
    HV201             0.139                               0.139    0.976
    HV209             0.092                               0.092    0.626
    HV237             0.214                               0.214    0.888
    HV213             0.159                               0.159    0.639
    age               0.364                               0.364    0.148
    V501              0.016                               0.016    1.000
    H11               0.082                               0.082    0.981
    V404              0.205                               0.205    0.918
    XR_H              0.117                               1.000    1.000
    TR_H              0.003                               1.000    1.000
    H_C            2278.254                               1.000    1.000
    D_H               0.537                               0.044    0.044

R-Square:

    HV205             0.546
    Sanavg            0.679
    HV201             0.024
    HV209             0.374
    HV237             0.112
    HV213             0.361
    age               0.852
    V501              0.000
    H11               0.019
    V404              0.082
    D_H               0.956
Warning message:
In .local(object, ...) :
  lavaan WARNING: fit measures not available if model did not converge

Edward Rigdon

unread,
Sep 11, 2014, 6:11:16 PM9/11/14
to lav...@googlegroups.com
Your factors H_C and D_H share two indicators, having only one unique indicator each.  The DH factor is dependent on XRH and TRH.  HC does not predict anything, and is not predicted, so it just sits there covarying by default with XRH and TRH.  Is that the model you meant to specify?  Is it important to have HC in the model?  The identification problem comes about because HC and DH share indicators.  It is possible that you could achieve identification if you specify starting values for the Loadings for the indicators loading on HC and DH.
-Ed Rigdon

Sent from my iPad
--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at http://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Yves Rosseel

unread,
Sep 18, 2014, 3:00:15 AM9/18/14
to lav...@googlegroups.com

> fit <- sem(model, data = ind_new, link="logit", ordered=c("HV205,H11,V404"))

Note that the 'link' argument is (at least in 0.5-16, silently) ignored
when using the default estimator DWLS.

Yves.

Hashim Javed

unread,
Sep 20, 2022, 2:25:20 AM9/20/22
to lavaan
Dear Tiffany, 

Kindly check if you are using sub-sample for analysis, and if you are using a variable to make sub-sample based on its value, 
then don't include that variable as covariates. (The variables included using '+' sign)
And also use aliases with all the variables included using '+' sign.

For Example:
XR_H=~HV205+Sanavg
TR_H=~HV201+HV209+HV237+HV213

use instead: 
XR_H=~HV205 + a*Sanavg
TR_H=~HV201 + c1*HV209 + c2*HV237 + c3*HV213

Reply all
Reply to author
Forward
0 new messages