Announcement

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

  • Survival analysis Discrete time, main independent variable predicts failure perfectly..

    I use cloglog/logit command for Discrete time hazard model in survival analysis. The dependent variable is Failure (equals 1 if insolvent if that firm year, otherwise 0), the main independent variable is FAMALE (equals I if female, otherwise 0). I do not control for firm or year fixed effect. However, I find that when Failure equals 1, Female always equals 0. Which leads to the bug “!= 0 predicts failure perfectly(FEMALE dropped and obs not used). Even though the regression can still come with some results, but the main independent variable FEMALE has been omitted. This is really annoying. Could there be some solutions to deal with this issue? Looking forward to any comments and suggestions. Thanks!

    My code is:
    cloglog insolvent123 femaleceo $factors
    logit insolvent123 femaleceo $factors
    They report the same statement as mentioned above.

  • #2
    When a predictor perfectly predicts the outcome in a logistic regression, the maximum likelihood estimate for its coefficient is infinity (or negative infinity). Consequently, there is no possibility for the estimation to converge. So Stata (and all other major statistical packages) check for this situation before proceeding and respond by removing the problem from the estimation sample.)

    The only way around this is to not use a maximum-likelihood estimation procedure. -firthlogit-, by Joseph Coveney, available from SSC, uses penalized maximum-likelihood estimation instead. Consequently, it can converge to a finite coefficient estimate in the face of perfect prediction. Be sure to read the entire -help firthlogit- before using so you understand how to work with the results.
    Last edited by Clyde Schechter; 16 Mar 2023, 12:16.

    Comment

    Working...
    X