Announcement

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

  • Penalized log likelihood = -<inf> (could not be evaluated)

    I'm running logistic regressions and found the problem of complete separation in my database. To deal with the problem I'm making use of maximum likelihood penalized through "firthlogit", a Stata's module available for versions 13.1 or higher.
    It happens that when I run "firthlogit" Stata informed me that one of my independent variables had been omitted because of collinearity and then appeared the following information:

    initial: penalized log likelihood = -<inf> (could not be evaluated)
    could not find feasible values
    r(491);
    Would you like to get your help to solve that problem anymore, because I have no idea what is the problem and that generated it.

    Thanks in advance

  • #2
    The output of help firthlogit gives the author's name and email address for reporting bugs or problems with the command. If firthlogit is omitting one of your variables, have you tried leaving it out of the command to be sure that it isn't leading to this problem?

    Comment


    • #3
      The message is from Stata's ml, which is called by firthlogit. You don't give much detail to assess, but my guess is that the model you're attempting to fit is inappropriate for the dataset that you have. If William's suggestion doesn't solve your problem, then you might try successively simpler models until you get convergence, and then feed the coefficient vector to successively more complicated models.

      Comment


      • #4
        Thanks William,

        At first I thought that the omission was something belonging to the maximum likelihood penalty process and the problem could be in some other factor, not necessarily a bug command. So, I followed his advice and removed the omitted variable. Then the command ran normally. I do not know if the statistical point of view what I did is correct because the problem of variable is collinearity, which is not related to the problems of separation and quasi-separation logistic regression, which was what motivated the use of command "firthlogit".

        Comment


        • #5
          If one of your explanatory variables is perfectly collinear, then it's best to omit it. I don't know why having firthlogit omit it for you resulted in a zero initial likelihood and an inability of ml to find any starting values that yield a positive initial likelihood. The code below runs without any problem.
          Code:
          version 14.1
          
          clear *
          set more off
          
          sysuse auto
          foreach var of varlist price-gear_ratio {
              clonevar `var'2 = `var'
          }
          
          firthlogit foreign price-mpg i.rep78 headroom-gear_ratio price2-mpg2 i.rep782 headroom2-gear_ratio2
          scalar define ll = e(ll)
          
          quietly firthlogit foreign price-mpg i.rep78 headroom-gear_ratio
          assert float(ll) == float(e(ll))
          
          exit

          Comment

          Working...
          X