Announcement

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

  • How to deal with Omitted Variables

    Hi everyone
    I am trying to run logistic regression but I have some problems.
    here is the :
    Code:
    xtlogit kams2 goingconcern auditortype win_ocf win_roe win_boardindepenence win_auditcost win_fsize win_leverage boardsize i.indcode i.year , re vce(cluster firmcode) nolog
    and the result
    Code:
    note: goingconcern != 0 predicts success perfectly;
          goingconcern omitted and 4 obs not used.
    
    note: 10.indcode != 0 predicts success perfectly;
          10.indcode omitted and 6 obs not used.
    
    note: 28.indcode != 0 predicts failure perfectly;
          28.indcode omitted and 6 obs not used.
    
    note: boardsize omitted because of collinearity.
    note: 54.indcode omitted because of collinearity.
    
    Calculating robust standard errors ...
    
    Random-effects logistic regression                      Number of obs    = 728
    Group variable: firmcode                                Number of groups = 122
    
    Random effects u_i ~ Gaussian                           Obs per group:
                                                                         min =   4
                                                                         avg = 6.0
                                                                         max =   6
    
    Integration method: mvaghermite                         Integration pts. =  12
    
                                                            Wald chi2(26)    =   .
    Log pseudolikelihood = -358.89337                       Prob > chi2      =   .
    
                                         (Std. err. adjusted for 122 clusters in firmcode)
    --------------------------------------------------------------------------------------
                         |               Robust
                   kams2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    ---------------------+----------------------------------------------------------------
            goingconcern |          0  (omitted)
             auditortype |   .8239995   .4402713     1.87   0.061    -.0389165    1.686915
                 win_ocf |  -1.848223   .9876459    -1.87   0.061    -3.783974     .087527
                 win_roe |  -1.704159   .5625449    -3.03   0.002    -2.806726    -.601591
    win_boardindepenence |  -1.528077   .9346605    -1.63   0.102    -3.359978    .3038236
           win_auditcost |  -.0539769   .2998422    -0.18   0.857    -.6416569    .5337031
               win_fsize |   .1582842   .2109013     0.75   0.453    -.2550747    .5716431
            win_leverage |  -1.426802   .9602935    -1.49   0.137    -3.308943    .4553386
               boardsize |          0  (omitted)
                         |
                 indcode |
                     10  |          0  (empty)
                     11  |   1.611654   1.161584     1.39   0.165    -.6650091    3.888317
                     13  |   .3956403   1.605448     0.25   0.805     -2.75098     3.54226
                     14  |   2.886265   1.059655     2.72   0.006     .8093791    4.963152
                     23  |  -.2562683   1.803915    -0.14   0.887    -3.791876    3.279339
                     25  |   -.781918   1.912321    -0.41   0.683    -4.529999    2.966163
                     27  |   1.274422   1.132625     1.13   0.261    -.9454823    3.494326
                     28  |          0  (empty)
                     29  |   2.377334   1.440187     1.65   0.099    -.4453807    5.200049
                     31  |    4.52582   1.551252     2.92   0.004     1.485421    7.566218
                     34  |   .8938229   1.132032     0.79   0.430     -1.32492    3.112566
                     38  |   .5772835   1.030465     0.56   0.575    -1.442391    2.596958
                     42  |  -.8353585   1.301148    -0.64   0.521    -3.385561    1.714844
                     43  |   .5225873   1.182988     0.44   0.659    -1.796026    2.841201
                     44  |    1.11104   1.209117     0.92   0.358    -1.258786    3.480866
                     49  |  -.8858398   1.943006    -0.46   0.648    -4.694061    2.922382
                     53  |  -1.164449   1.276902    -0.91   0.362    -3.667131    1.338232
                     54  |          0  (omitted)
                         |
                    year |
                   1397  |  -.1929489   .2243773    -0.86   0.390    -.6327204    .2468225
                   1398  |   -1.00974   .3571861    -2.83   0.005    -1.709812   -.3096684
                   1399  |  -1.682763   .4669916    -3.60   0.000     -2.59805   -.7674763
                   1400  |  -1.519616    .456696    -3.33   0.001    -2.414724   -.6245087
                   1401  |   .6046043   .6346018     0.95   0.341    -.6391924    1.848401
                         |
                   _cons |  -.6281887   2.727991    -0.23   0.818    -5.974952    4.718575
    ---------------------+----------------------------------------------------------------
                /lnsig2u |   1.388739    .253732                      .8914329    1.886044
    ---------------------+----------------------------------------------------------------
                 sigma_u |   2.002446   .2540423                      1.561609     2.56773
                     rho |   .5493119    .062816                      .4257006     .667122
    --------------------------------------------------------------------------------------
    In this model, the variable” going concern” has been omitted but I need this variable, So how can I fix this?
    For information,” going concern” is a dummy variable.
    Thank you in advance!

  • #2
    Probably being eaten up (perfect correlation) by the i.indcode i.year



    Comment


    • #3
      Actually, the warnings at the top of the regression output explain what happened:
      note: goingconcern != 0 predicts success perfectly;
      goingconcern omitted and 4 obs not used.
      This means that whenever goingconcern is non-zero, kams2 is always 1. This is called perfect prediction, and it is incompatible with maximum likelihood estimation: the maximum likelihood estimate for this coefficient is infinite. Stata (and every statistical package I know of) checks for situations like that, and eliminates such variables from the model. If you were not working with panel data, you could use -firthlogit-, which works by penalized maximum likelihood estimation and can tolerate perfect prediction. But I am not aware of any similar Stata command for panel data.

      You should consider two possible situations underlying this problem. If there is a structural reason why, in the entire universe at all times, goingconcern being true implies kams2 is true, then the true odds ratio for goingconcern really is infinite, and it is inappropriate to try to include it in a logistic model. On the other hand, it may just be that kams2 being false is rare, but not non-existent, in the universe at large when goingconcern is true. In that case, you can, if feasible, solve the problem by getting more data, including some cases that have goingconcern true and kams2 false.

      If a logistic model is inappropriate altogether (per last paragraph) or getting more data is not feasible, consider switching to a linear probability model (-xtreg-), which does not have this problem.

      Comment


      • #4
        Thanks George Ford
        is it correct? or i shloud not use - i.indcode i.year-.
        here is
        Code:
         xtlogit kams2 goingconcern auditortype win_ocf win_roe win_boardindepenence win_auditcost win_fsize win_leverage boardsize, re nol
        > og
        note: goingconcern != 0 predicts success perfectly;
              goingconcern omitted and 4 obs not used.
        
        note: boardsize omitted because of collinearity.
        
        Random-effects logistic regression                   Number of obs    =    740
        Group variable: firmcode                             Number of groups =    124
        
        Random effects u_i ~ Gaussian                        Obs per group:
                                                                          min =      4
                                                                          avg =    6.0
                                                                          max =      6
        
        Integration method: mvaghermite                      Integration pts. =     12
        
                                                             Wald chi2(7)     =  25.78
        Log likelihood = -396.93494                          Prob > chi2      = 0.0006
        
        --------------------------------------------------------------------------------------
                       kams2 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
        ---------------------+----------------------------------------------------------------
                goingconcern |          0  (omitted)
                 auditortype |  -.1828471    .292804    -0.62   0.532    -.7567324    .3910383
                     win_ocf |  -1.338407   .9886855    -1.35   0.176    -3.276195    .5993811
                     win_roe |  -2.471563   .5744298    -4.30   0.000    -3.597425   -1.345701
        win_boardindepenence |  -.8961638   .7710304    -1.16   0.245    -2.407356    .6150281
               win_auditcost |   -.005515   .2336519    -0.02   0.981    -.4634642    .4524343
                   win_fsize |   .1335576   .1499397     0.89   0.373    -.1603188    .4274341
                win_leverage |  -.4147616   .7854918    -0.53   0.597    -1.954297    1.124774
                   boardsize |          0  (omitted)
                       _cons |  -.6893048   2.059058    -0.33   0.738    -4.724984    3.346374
        ---------------------+----------------------------------------------------------------
                    /lnsig2u |   1.485949   .2418019                      1.012027    1.959872
        ---------------------+----------------------------------------------------------------
                     sigma_u |    2.10218   .2541555                      1.658665    2.664286
                         rho |   .5732447   .0591533                      .4554135    .6833099
        --------------------------------------------------------------------------------------
        LR test of rho=0: chibar2(01) = 155.30                 Prob >= chibar2 = 0.000
        I have rerun the model but the results have not changed and "goingconcern" has been omitted.

        Comment


        • #5
          #4 crossed with #3. To O.P.: I think the information in #3 will resolve your problem.

          Comment


          • #6
            ِDear Clyde Schechter and George Ford
            .I appreciate your guidance.

            Comment

            Working...
            X