Announcement

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

  • How does Stata check for (Quasi-)Complete Separation?

    Dear Statalist,

    I'm interested in finding out technical details on how Stata actually checks for separation, both of the quasi-compete and complete case (especially for procedures logit, logistic, mlogit).

    I've looked at the documentation of the procedures and the corresponding probit models, as well as the documentation of glm, binreg, ml, maximize and estimate but couldn't find a description on how it is actually done. The closest I came to I'm looking for was in the documentation to logit https://www.stata.com/manuals13/rlogit.pdf#rlogit (Example 2) but it only speaks of the user-visible results of the check rather than the check itself.

    Any pointers to where this is documented in detail would be very much appreciated.



  • #2
    Dear Statalist,

    apologies for bumping this thread up, but I'm still very much interested in the technical details of how Stata checks for (quasi-)complete separation. In the documentation for logit https://www.stata.com/manuals13/rlogit.pdf#rlogit in Example 2 it is stated:

    Stata watches for these sorts of problems, alerts us, fixes them, and properly fits the model.
    and then

    Stata noted that fact “note: 1.repair !=0 predicts failure perfectly”. [...] Stata then went on to say “1.repair dropped and 10 obs not used”. This is Stata eliminating the problem. First 1.repair had to be removed from the model because it would have an infinite coefficient. Then the 10 observations that led to the problem had to be eliminated, as well, so as not to bias the remaining coefficients in the model
    So clearly Stata has a way to check for the fact that there is separation, what the variables are that cause it and what observations are responsible.

    I'm currently in the process of writing a scientific article and would like to know exactly how these checks are done to include and document them in the article. So far I've found such checks documented for SPSS, SAS and R, but Stata's solution continues to elude me.

    The technical note in logit manual does not go in much more details either unfortunately. I'd be very grateful for a pointer to where this is documented in the (mathematical) details as I really want to include Stata's solution which seems to me to be the most sophisticated one implemented in popular statistic software.

    Comment


    • #3
      Originally posted by Thomas Rusch View Post
      . . . clearly Stata has a way to check for the fact that there is separation . . . I'd be very grateful for a pointer to where this is documented in the (mathematical) details as I really want to include Stata's solution which seems to me to be the most sophisticated one implemented in popular statistic software.
      viewsource logit.ado suggests that checking for complete or quasicomplete separation is done via a call to _rmcoll with an undocumented logit option. _rmcoll is a built-in command (compiled C code) and its entry in the user's manual does not contain a Methods and formulas section. If I had to guess then it would be that it uses the same general approach that other software offerings do, but perhaps StataCorp wants to keep the details of its method proprietary (trade secret).

      Comment


      • #4
        Thanks, this is helpful already! What happens in _rmcoll under the hood has also been asked here: https://www.statalist.org/forums/for...ood-of-_rmcoll which gives the same info that it is not documented.I will reach out to StataCorp and ask them if they are willing to share details.
        Last edited by Thomas Rusch; 13 Dec 2025, 05:48.

        Comment

        Working...
        X