Announcement

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

  • melogit vs. meqrlogit

    Hi StataList'ers

    My question is about the equivalence of melogit and meqrlogit. I understand from my reading that these two commands should, for most applications, produce near identical results. I also understand that meqrlogit is the updated version of xtmelogit and is used mostly as a fall back option where there are convergence issues with melogit.

    In my current analysis (see output below), however, these two modelling options produce very different results. I would be grateful for any Statalist advice on why this is the case and which of the two commands would be most appropriate given their differences?

    Thanks in advance

    Jason

    ************************************************** ******************

    Code:
    melogit r_dishonest || int_uid:, cov(identity)
    
    Fitting fixed-effects model:
    
    Iteration 0:   log likelihood = -10747.072  
    Iteration 1:   log likelihood = -10127.166  
    Iteration 2:   log likelihood = -10124.841  
    Iteration 3:   log likelihood =  -10124.84  
    
    Refining starting values:
    
    Grid node 0:   log likelihood = -9877.2839
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -9877.2839  
    Iteration 1:   log likelihood = -9738.9099  
    Iteration 2:   log likelihood = -9728.8859  
    Iteration 3:   log likelihood = -9728.8644  
    Iteration 4:   log likelihood = -9728.8644  
    
    Mixed-effects logistic regression               Number of obs     =     45,868
    Group variable:         int_uid                 Number of groups  =        118
    
                                                    Obs per group:
                                                                  min =          3
                                                                  avg =      388.7
                                                                  max =      3,861
    
    Integration method: mvaghermite                 Integration pts.  =          7
    
                                                    Wald chi2(0)      =          .
    Log likelihood = -9728.8644                     Prob > chi2       =          .
    ------------------------------------------------------------------------------
     r_dishonest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _cons |   -2.22833   .0305417   -72.96   0.000     -2.28819   -2.168469
    -------------+----------------------------------------------------------------
    int_uid      |
       var(_cons)|   1.926716    .329128                      1.378519    2.692916
    ------------------------------------------------------------------------------
    LR test vs. logistic model: chibar2(01) = 791.95      Prob >= chibar2 = 0.0000
    
    
    ******************************************************************************************
    
    
    meqrlogit r_dishonest || int_uid:, var cov(identity)
    
    Refining starting values:
    
    Iteration 0:   log likelihood = -9515.8781  
    Iteration 1:   log likelihood = -9502.5658  
    Iteration 2:   log likelihood = -9502.5658  (backed up)
    
    Performing gradient-based optimization:
    
    Iteration 0:   log likelihood = -9502.5658  
    Iteration 1:   log likelihood = -9500.6897  
    Iteration 2:   log likelihood = -9500.6488  
    Iteration 3:   log likelihood = -9500.6487  
    
    Mixed-effects logistic regression               Number of obs     =     45,868
    Group variable: int_uid                         Number of groups  =        118
    
                                                    Obs per group:
                                                                  min =          3
                                                                  avg =      388.7
                                                                  max =      3,861
    
    Integration points =   7                        Wald chi2(0)      =          .
    Log likelihood = -9500.6487                     Prob > chi2       =          .
    
    ------------------------------------------------------------------------------
     r_dishonest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _cons |  -3.280746   .0889715   -36.87   0.000    -3.455127   -3.106365
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    int_uid: Identity            |
                      var(_cons) |   .6619889   .1182727      .4664153    .9395689
    ------------------------------------------------------------------------------
    LR test vs. logistic model: chibar2(01) = 1248.38     Prob >= chibar2 = 0.0000

  • #2
    Bumping this: I am still struggling to understand how two "equivalent" approaches can produce such divergent parameter estimates - and then, more importantly, what justifies the choice for one over the other. Are there any StataLister's with experience and on this?

    Thanking you in advance,

    Jason

    Comment


    • #3
      Well, I have never seen this kind of large discrepancy before. I suspect nobody is responding because nobody else has either. If I were you, I would send the data, code, and output to Stata Technical Support.

      Comment


      • #4
        My generic advice is to make sure Stata is up to date. Barring that, a replicable example would be nice if you could somehow produce one. But I suspect Clyde's advice is the best.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Thanks Clyde and Richard.

          I'm comforted somewhat by your comments. I was going crazy trying to find an online resource which could help to explain the discrepancy.

          My strategy thus far was to run the one-level logjt, and then rely on the melogit which produces the most comparable level-one intercept (taking into account the adjustment for the level-two variance). In the present example, I can use the melogit because it converges without any estimation issues. Unfortunately, though, as I begin to add more complexity to the model - like a random slope - melogit has trouble finding a solution. Following Stata's advice, I would then move to meqrlogit, but the differences in this base intercept-only model made me question that approach.

          I'll contact Stata and see what advice they can provide!

          Best

          Jason

          Comment


          • #6
            Hello,

            Was there an update on this issue from Stata Technical Support? I am having the same issue.

            Thank you,
            Besu

            Comment


            • #7
              Sorry to be so late to this discussion: but if I had to choose one technique for Jason's example,, it would be meqrlogit, Both techniques are trying to maximize the log-likelihood and that for meqrlogit is larger. Jason, let me also point out the strong preference in Statalist for complete real names in FAQ 6:

              6. Why are real names preferred?

              You are asked to post on Statalist using your full real name, including given name(s) and a family name, such as "Ronald Fisher" or "Gertrude M. Cox". Giving full names is one of the ways in which we show respect for others and is a long tradition on Statalist. It is also much easier to get to know people when real names are used.

              If you overlook this on first registration, it is easy to fix. Click on “Contact us” located at the bottom right-hand corner of every page.
              Steve Samuels
              Statistical Consulting
              [email protected]

              Stata 14.2

              Comment


              • #8
                Although this topic is quite old, I would like to give additional information regarding the occurence of different results between melogit and meqrlogit.
                I don't know which version you've used, but in my case, the results of random intercept models from melogit and meqrlogit differed strongly while working with Stata 14.1. However, the same code produces very similar results for melogit and meqrlogit in Stata 14.2. The results of melogit in version 14.2 are in line with those from xtmelogit and meglm,link(logit) family(binomial). So it might be the case that something was wrong with the optimization of melogit in Stata 14.1.
                Hope this helps.
                Best,
                Marvin
                Last edited by Marvin Buermann; 07 Jan 2020, 05:14.

                Comment

                Working...
                X