Skip to content

Logit: strong but not perfect (?) separation #2282

Open

Description

@josef-pkt

see http://stackoverflow.com/questions/28568623/statsmodels-logistic-regresion-type-problems/28590006#28590006

optimization fails to converge, most observations are predicted close to 0 or 1, standard errors of some parameters are huge, eigenvalues of exog don't have a problem (in rescaled version)
but we don't get perfect separation, and no perfect separation exception.

GLM with IRLS has all params at around 1e+14

Activity

  1. kshedden commented on Feb 23, 2015

    @kshedden
    Contributor

    A little bit of regularization (L1 or L2) would take care of this. A regularization PR for GLMs should be coming in a few weeks.

  2. josef-pkt commented on Feb 23, 2015

    @josef-pkt
    MemberAuthor

    We have L1 regularization for Logit, but it would hide the non-identification problem in this case. We don't identify partial separation yet, and are not yet able to give a good error message.

    http://www.ats.ucla.edu/stat/mult_pkg/faq/general/complete_separation_logit_models.htm
    mentions Firth penalization at the end, but I just saw this a short time ago and didn't check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions