Announcement

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

  • Selection of intpoints - some of them work others do not?

    Dear All
    I am quite confused.

    I'm trying to run a multilevel mixed-effects logistic regression with meqrlogit:
    meqrlogit f_taeller _t int_start slope_under int_slut slope_efter xsin xcos if hosp_id==19, || organisation: R.database, noconstant covariance(identity) , binomial(f_naevner) intpoints(?) or

    When I run it with intpoint (3) i works fine, but with intpoint (6) it says:
    numerical derivatives are approximate
    flat or discontinuous region encountered

    can anyone explain me why?

    Regards
    ​Søren


  • #2
    The likelihood function for these multi-level logistic models involves an integral over the random effects. The integral cannot be evaluated in closed form and Stata approximates it numerically. The -intpoints()- option instructs Stata how many points in the range of integration to use in the approximation. A larger value of intpoints() leads to a more accurate approximation, but increase computation time. The results you are getting with intpoints(6) are probably more accurate than those with intpoints(3), and at this level of granularity Stata is finding a difficult area of the likelihood that got overlooked (smoothed out, if you wish) with intpoints(3). If you go to even finer resolution, say inpoints(9) or higher, this problem may get worse, or it may get better.

    In any case, if Stata kept on calculating more iterations after it gave you the message, and if the final iteration contained no warnings or error messages, then you can use the results. The fact that problems were encountered along the way is not a barrier.

    If the message came in association with the final iteration, then you cannot trust the final estimates. Changing to a higher value of intpoints() may help you (though, as noted earlier, it might also make it worse). Another possibility is to try -melogit- instead of -meqrlogit- if you haven't arlready done so (though most people go to -meqrlogit- after -melogit- has failed). And sometimes specifying the -difficult- option helps.

    If, ultimately, you are not able to estimate this model, try simplifying it. Unfortunately, there are some models that simply can't be fit.

    Comment


    • #3
      Thank you Clyde. This was very helpful

      Comment


      • #4
        Hi Clyde,

        I was wondering if you could provide some insight into your statement:

        Another possibility is to try -melogit- instead of -meqrlogit- if you haven't arlready done so (though most people go to -meqrlogit- after -melogit- has failed).
        Why do you suppose most people go to -meqrlogit- after -melogit- has failed?

        I have found that -melogit- tends to converge in many cases where -meqrlogit- does not converge (even after supplying starting values to -meqrlogit- from a simpler model).

        Thanks,

        Tom
        Last edited by Tom Weichle; 14 Sep 2016, 10:25.

        Comment


        • #5
          Well, -melogit- is an older command that dates back to when Stata first introduced multi-level logistic regression, so I think that, if only out of habit, people tend to use it first and then switch to -meqrlogit- if -melogit- won't converge. Indeed, when Stata introduced -meqrlogit-, the manual sections of both commands recommended trying -meqrlogit- when -melogit- failed to converge. I don't recall seeing any recommendation in the other direction.

          That said, I think everyone agrees that multi-level logistic likelihood functions can be very difficult to maximize, and having two different algorithms whose strengths and weaknesses complement each other is helpful. I don't think there's a rule about which one should be tried first, and I'm not aware of any data on which one works better in practice. If your experience has been that -meqrlogit- fails with appreciable frequency and -melogit- can rescue those cases, I don't find that surprising.

          Comment


          • #6
            Thanks Clyde! Very much appreciated!

            Comment

            Working...
            X