Announcement

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

  • Logit, Probit and Penalised Maximum Likelihood (PMLE)

    Hi all,

    Just wondering as to why the sample sizes are different when I run Logit/probit and PMLE regression? I am running the model on the same sample, i.e. there are no missing values in my data for all the covariate I use, however, the sample sizes are still different between the two models.

    I use the follwoing commanf:

    firthlogit c $reg2
    estimates store pmle1 ** sample size or number of obs 7081

    logit c $reg2 , r
    estimates store l1 ** sample size or number of obs 6903

    probit c $reg2 ,r
    estimates store p1 ** sample size or number of obs 6903

    After I run the logit and probit I get the following message


    "note: 9.income_week != 0 predicts failure perfectly
    9.income_week dropped and 117 obs not used

    note: 1.educ != 0 predicts failure perfectly
    1.educ dropped and 61 obs not used"

    Is there some way I can avoid these observations to not be dropped?

    Thanks for the help !!


    Kind Regards,
    Aarushi

  • #2
    If you need those observations in order to conduct a likelihood-ratio test* against a reduced model that manages to retain them, then try using the asis option.
    Code:
    logit c <varlist>, asis
    Otherwise, you can mark the unomitted observations for the reduced model.
    Code:
    logit c <varlist>
    generate byte used = e(sample)
    estimates store Full
    logit c <reduced varlist> if used
    lrtest Full
    *I noticed that your using estimates store. But you're also using robust? (Is that what that r is?)

    Comment


    • #3
      Hi Joseph,

      Thanks for your response. , asis works well.

      I wanted to compare the logit results with the penalised maximum likelihood estimates (PMLE).

      Yes, the r is for robust standard error.

      Thanks,
      Aarushi

      Comment


      • #4
        Originally posted by Aarushi Dhingra View Post
        I wanted to compare the logit results with the penalised maximum likelihood estimates (PMLE).
        Note that -firthlogit- does not use robust standard errors and does not even have that option. So, if you're going to compare log-likelihood values via, say, -lrtest-, then you'll probably want to fit the conventional logistic regression model without that option. Also, keep in mind that -firthlogit- has to perform likelihood-ratio testing by constraining the regression coefficient to zero (leaving the term in the model). And if you're just eyeballing the regression coefficients' magnitudes, then you don't need to store the estimates.

        Comment


        • #5
          Hi Joseph,

          Yes, I see firthlogit doesn't have the robust std errors command or the margins command. If I fit the conventional logit model, without asis, the number of observations between the logit and PMLE are diffrent. Since logit drops the values that predict failure perfectly. Can I still compare them with different sample sizes? Since there is a rare event (mean of the rare event is 2%) I am trying to justify the use of PMLE over logit. Any tips for that?

          Thanks for the tip, I store the estimates since PMLE takes a long time to run, but then I use a log file so I see how that is unnecessary. Thanks for all your help!

          Comment


          • #6
            Originally posted by Aarushi Dhingra View Post
            I am trying to justify the use of PMLE over logit. Any tips for that?
            I recommend taking a look at what Richard Williams (also a member of this list) has written on the subject. You can download a PDF here. His writing is very approachable, on-point and comprehensive, and it's worthwhile to see what else he has written on the subject of logistic regression (among other topics).

            Comment


            • #7
              Joseph,

              Great! You have been really helpful, thank you!

              Comment


              • #8
                The next time I update the handout Joseph mentioned, I will add a link to Heinz Leitgöb's excellent chapter in The Sage Research Methods Foundations Project on "Analysis of Rare Events"

                https://methods.sagepub.com/foundati...of-rare-events

                If you are an academic, your library has hopefully purchased online access to SRMF. If not, encourage it to do so! It includes several entries by Stata users, including people on this list.

                Disclaimer: I am a co-editor of SRMF and commissioned many pieces, including Leitgöb's, so I am a little biased.
                -------------------------------------------
                Richard Williams, Notre Dame Dept of Sociology
                StataNow Version: 19.5 MP (2 processor)

                EMAIL: [email protected]
                WWW: https://www3.nd.edu/~rwilliam

                Comment


                • #9
                  Thanks, Richard! I shall look into it.

                  Comment

                  Working...
                  X