Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Constraints and Convergence in GSEM


    Hello everyone,

    I´m working for the first time with gsem (have used sem in the past, but never with latent variables) but some of my paths have constraints. From origen to iseienc and from CapSocial to iseienc both paths are constrained in 1. I dont know why this is happening, is there a way to remove the constraints?
    I have tried clicking on the variable properties, but the constraints option is empty.
    I have not defined any constraints and the default should be no constraints.

    Another problem i have is that model does not converge, is there a way to fix this ? I have limited the iterations so it doesnt go on forever. Does this mean i should drop the model if it doesnt converge?

    I dont have this issues if i use SEM, but im using gsem becouse i want to add a factor variable later on.

    Thanks in advanced.


    Click image for larger version

Name:	model.png
Views:	1
Size:	37.2 KB
ID:	1553140



    Code:
    gsem (eduenc -> iseienc, ) (eduenc -> CapSocial, ) (origen -> edumad, ) (origen -> edupad, ) (origen -> iseienc, ) (orige
    > n -> eduenc, ) (origen -> iseipad, ) (CapSocial -> Promedio, ) (CapSocial -> Rango, ) (CapSocial -> Cantidad, ) (CapSoc
    > ial -> iseienc, ), iterate(10) latent(origen CapSocial ) nocapslatent
    
    Fitting fixed-effects model:
    
    Iteration 0:   log likelihood = -28992.582  
    Iteration 1:   log likelihood = -28992.582  
    
    Refining starting values:
    
    Grid node 0:   log likelihood = -28252.542
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -28252.542  (not concave)
    Iteration 1:   log likelihood = -28146.861  (not concave)
    Iteration 2:   log likelihood = -28004.628  (not concave)
    Iteration 3:   log likelihood = -27919.286  (not concave)
    Iteration 4:   log likelihood = -27754.613  (not concave)
    Iteration 5:   log likelihood = -27666.845  (not concave)
    Iteration 6:   log likelihood = -27609.593  (not concave)
    Iteration 7:   log likelihood = -27575.328  (not concave)
    Iteration 8:   log likelihood = -27569.421  (not concave)
    Iteration 9:   log likelihood = -27565.038  (not concave)
    Iteration 10:  log likelihood = -27561.758  (not concave)
    convergence not achieved
    
    Generalized structural equation model             Number of obs   =       1065
    Log likelihood = -27561.758
    
     ( 1)  [iseienc]CapSocial = 1
     ( 2)  [iseienc]origen = 1
    ---------------------------------------------------------------------------------
                    |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
    iseienc <-      |
             eduenc |   3.298683   .1417819    23.27   0.000     3.020796    3.576571
          CapSocial |          1  (constrained)
             origen |          1  (constrained)
              _cons |  -.0889786   1.867755    -0.05   0.962    -3.749711    3.571754
    ----------------+----------------------------------------------------------------
    edumad <-       |
             origen |   1.130008   .1737318     6.50   0.000     .7894996    1.470516
              _cons |   8.035564   .1430889    56.16   0.000     7.755115    8.316013
    ----------------+----------------------------------------------------------------
    edupad <-       |
             origen |   1.354431   .2069727     6.54   0.000     .9487722     1.76009
              _cons |   8.335485   .1505348    55.37   0.000     8.040442    8.630527
    ----------------+----------------------------------------------------------------
    eduenc <-       |
             origen |   .7723909   .1216538     6.35   0.000     .5339538    1.010828
              _cons |   12.03884   .1281875    93.92   0.000      11.7876    12.29008
    ----------------+----------------------------------------------------------------
    CapSocial <-    |
             eduenc |    .215886    .051505     4.19   0.000     .1149381    .3168339
    ----------------+----------------------------------------------------------------
    iseipad <-      |
             origen |   4.610932   .7088203     6.51   0.000      3.22167    6.000194
              _cons |   35.69681    .602912    59.21   0.000     34.51512    36.87849
    ----------------+----------------------------------------------------------------
    Promedio <-     |
          CapSocial |   1.280268   .0986791    12.97   0.000      1.08686    1.473675
              _cons |   41.47886   .9247388    44.85   0.000     39.66641    43.29132
    ----------------+----------------------------------------------------------------
    Rango <-        |
          CapSocial |   3.786942   .2248784    16.84   0.000     3.346189    4.227696
              _cons |   38.41039   2.401502    15.99   0.000     33.70353    43.11725
    ----------------+----------------------------------------------------------------
    Cantidad <-     |
          CapSocial |   .1946782    .012783    15.23   0.000      .169624    .2197325
              _cons |    3.58376   .1295336    27.67   0.000     3.329879    3.837641
    ----------------+----------------------------------------------------------------
    var(e.CapSocial)|   41.95461   5.503892                      32.44242    54.25579
         var(origen)|   10.69443   3.291886                      5.849878    19.55099
    ----------------+----------------------------------------------------------------
      var(e.iseienc)|   257.2707   12.18112                      234.4704    282.2881
       var(e.edumad)|   7.893567   .4534471                      7.053033     8.83427
       var(e.edupad)|   4.060075   .4400654                       3.28302    5.021049
       var(e.eduenc)|    11.1164   .5270597                      10.12993    12.19894
      var(e.iseipad)|   149.3474   8.319458                      133.9002    166.5767
     var(e.Promedio)|   178.8124    7.96542                      163.8626    195.1262
        var(e.Rango)|   2.626589          .                             .           .
     var(e.Cantidad)|   1.579653    .075704                      1.438031    1.735222
    ---------------------------------------------------------------------------------
    Warning: convergence not achieved

  • #2
    Still can´t solve this issue, any ideas ?
    The problem seems to appear when i use GSEM with latent variables. Any other combination (gsem without latent, sem with latent, etc) seems to work.

    Comment


    • #3
      Have you thought about simplifying your model? I don't know about the subject matter, but frankly just looking at the diagram, it looks a little Rube Goldberg-ish, especially with the paths that involve origen, eduenc, iseienc and CapSocial.

      Moreover, you say that you terminated the iterations early and the output clearly shows that. But, at least for the iteration log that is produced, it looks like the log-likelihood was systematically changing each iteration. Are you saying that, if left long enough, it would have reached some kind of flat region in the log-likelihood and stopped changing?

      Comment


      • #4
        I have tried simplifying, the problem seems to appear when I use latent variables with gsem, it gets slow (takes a lot of time for each iteration) or it keeps iterating forever.
        sem seems to work, but i wanted to use gsem to include a factor variable.

        I´ll see what i can do, ill try simplifying the model, maybe i´ll avoid using the latent variables and going with observed variables.

        Thanks

        Comment


        • #5
          Joaquin Carrascosa did you find a solution to converge the model. I am facing the same issue whenever I add a latent variable. Thanks

          Comment


          • #6
            Joaquin Carrascosa, this could be due to the sample size you have. If it is so small, you may want to reduce the complexity of the model.
            One of the ways to do this is by beginning with simpler relationships then you advance the model as you build on.

            Comment

            Working...
            X