Announcement

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

  • Outliers in logit regression

    Dear Members
    Pls i have a logit model and i want to check for outliers if any, can i use Discrepancy Measures, Leverage Measure or Influence Measure? Can any one help me to suggest the best technique for checking outliers in logit regression model.

    Adamu Idris
    Thank you

  • #2
    Welcome to the Stata Forum/ Statalist,

    You may wish to start by checking the - predict - options
    Best regards,

    Marcos

    Comment


    • #3
      Just a few additional comments:

      The - predict - suite of commands after - logit - may do all the trick to you.

      That said, shall you wish to start by spotting "unexpected" predictions (for 0 as well as for 1), you may install the SPost 13 user-written program (whose authors are Long and Freese) and take a look at the "least likely" observations.

      Please see the example below:

      Code:
      . webuse auto
      (1978 Automobile Data)
      
      . logit foreign mpg weight price
      
      Iteration 0:   log likelihood =  -45.03321  
      Iteration 1:   log likelihood = -22.244792  
      Iteration 2:   log likelihood = -18.069284  
      Iteration 3:   log likelihood = -17.184699  
      Iteration 4:   log likelihood = -17.161975  
      Iteration 5:   log likelihood = -17.161893  
      Iteration 6:   log likelihood = -17.161893  
      
      Logistic regression                             Number of obs     =         74
                                                      LR chi2(3)        =      55.74
                                                      Prob > chi2       =     0.0000
      Log likelihood = -17.161893                     Pseudo R2         =     0.6189
      
      ------------------------------------------------------------------------------
           foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               mpg |  -.1210918   .0956855    -1.27   0.206     -.308632    .0664483
            weight |  -.0068497   .0019996    -3.43   0.001    -.0107688   -.0029306
             price |   .0009264   .0003074     3.01   0.003      .000324    .0015288
             _cons |   14.42237   5.414367     2.66   0.008      3.81041    25.03434
      ------------------------------------------------------------------------------
      
      . leastlikely mpg weight price
      
      Outcome: 0 (Domestic)
      
           +---------------------------------+
           |     Prob   mpg   weight   price |
           |---------------------------------|
        7. | .4689675    26    2,230   4,453 |
       24. | .0590667    28    1,800   4,389 |
       43. | .1115502    34    1,800   4,425 |
       44. | .3827862    25    2,200   4,482 |
       45. | .4946957    26    2,520   6,486 |
           +---------------------------------+
      
      Outcome: 1 (Foreign)
      
           +---------------------------------+
           |     Prob   mpg   weight   price |
           |---------------------------------|
       59. | .6395237    21    2,750   8,129 |
       66. | .4159626    35    2,050   3,798 |
       68. | .2831717    31    2,200   3,748 |
       69. | .3212464    18    2,670   5,719 |
       71. | .6186626    41    2,040   5,397 |
           +---------------------------------+

      Hopefully that helps.
      Last edited by Marcos Almeida; 17 Sep 2017, 07:10.
      Best regards,

      Marcos

      Comment


      • #4
        Hi Marcos,
        Thank you for your quick response. I will do that and report.
        Thank you
        Adamu

        Comment


        • #5
          While less elegant, you can also run a regression. Some of the diagnostics (like leverage) might be informative.

          Comment


          • #6
            Thank You Bromiley for the precise answer.
            Adamu

            Comment


            • #7
              Dear Respected Members,
              Pls, just a follow-up question (s) regarding detection of outliers in logit regression using the responses from Marcos and Bromiley. I detected some outliers in my data. However, could anyone suggest the best method of getting rid of them? The materials I laid hands on are for OLS such as taking the log of the of the dependent variable among others and not for Logit regression if I understood it very well.

              Thank you
              Adamu Idris

              Comment


              • #8
                Adamu:
                the general advice is not to get rid of outliers, unless they prove a mistaken data entry.
                That said:
                - you shoud investigate whether the data generating process allows extreme values;
                - you may want to reporttwo regresion models (with and without the so called outliers) and comment on the difference in coefficients.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  I agree strongly that any impulse to omit outliers just because they are awkward to handle is better turned into an inclination to handle outliers as part of modelling all the data. Transforming predictors can pull in outliers and may make sense on other grounds.

                  Comment


                  • #10
                    Thank you, Carlo and Nick. I will attempt to make some transportation and if it works fine otherwise I will report two logit regression models and discuss them as suggested by Carlo. Thank you all once again for the quick responses.

                    Adamu

                    Comment

                    Working...
                    X