Announcement

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

  • margins not estimable

    Hello, everyone! I have encountered unestimable margins when running a logistic regression with an interaction.

    Here is my output.
    Code:
    . logit homeown i.raceth##i.forborn $dems $ses yrsusa i.linguiso $other if both==1, nocons
    
    Iteration 0:   log likelihood = -1276644.7  
    Iteration 1:   log likelihood = -849822.09  
    Iteration 2:   log likelihood = -846538.72  
    Iteration 3:   log likelihood = -846524.62  
    Iteration 4:   log likelihood = -846524.62  
    
    Logistic regression                             Number of obs     =  1,841,809
                                                    Wald chi2(125)    =  507020.07
    Log likelihood = -846524.62                     Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------------------------------------------------
                                                   homeown |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------------------------------------------------+----------------------------------------------------------------
                                                    raceth |
                                                   4. NHC  |   .6385632    .027372    23.33   0.000     .5849151    .6922114
                                                   5. NHJ  |   .5653426   .0400141    14.13   0.000     .4869164    .6437688
                                                   6. NHF  |   -.098571   .0338973    -2.91   0.004    -.1650085   -.0321335
                                                   7. NHI  |  -.1735716   .0397069    -4.37   0.000    -.2513957   -.0957475
                                                   8. NHK  |  -.2241101   .0483639    -4.63   0.000    -.3189015   -.1293186
                                                   9. NHV  |    .348966   .0560098     6.23   0.000     .2391888    .4587433
                                                           |
                                                 1.forborn |  -1.316316   .0124516  -105.71   0.000    -1.340721   -1.291912
                                                           |
                                            raceth#forborn |
                                                 4. NHC#1  |   .3350237   .0314141    10.66   0.000     .2734531    .3965943
                                                 5. NHJ#1  |  -1.139156   .0558045   -20.41   0.000    -1.248531   -1.029781
                                                 6. NHF#1  |   .0531232   .0382891     1.39   0.165     -.021922    .1281684
                                                 7. NHI#1  |   .0593582   .0423115     1.40   0.161    -.0235708    .1422871
                                                 8. NHK#1  |  -.0756405   .0529992    -1.43   0.154     -.179517     .028236
                                                 9. NHV#1  |   .4663223   .0603573     7.73   0.000     .3480241    .5846204
                                                           |
                                                       age |   .0706146   .0014749    47.88   0.000     .0677239    .0735054
                                                      age2 |  -.0002098   .0000164   -12.82   0.000    -.0002419   -.0001778
                                                  1.female |    .006187   .0039075     1.58   0.113    -.0014716    .0138457
                                                           |
                                                    marst3 |
                                       previously married  |  -1.198443   .0050531  -237.17   0.000    -1.208347   -1.188539
                                            never married  |  -1.298763   .0049671  -261.47   0.000    -1.308498   -1.289027
                                                           |
                                                     educ5 |
                                              HS graduate  |    .340975   .0098948    34.46   0.000     .3215815    .3603685
                                             Some college  |   .5482986   .0096026    57.10   0.000     .5294779    .5671193
                                        Bachelor's degree  |   .9143729   .0098288    93.03   0.000     .8951088    .9336369
                                                    Grad+  |   .9483004   .0102377    92.63   0.000     .9282348     .968366
                                                           |
                                                   logfinc |   .1916358   .0013543   141.50   0.000     .1889814    .1942903
                                                    yrsusa |   .0399718    .000417    95.86   0.000     .0391545    .0407891
                                                1.linguiso |  -.4252366   .0133153   -31.94   0.000     -.451334   -.3991391
                                                   1.mover |  -1.289979    .005414  -238.27   0.000    -1.300591   -1.279368
                                                           |
                                                   met2013 |
                       10580. albany-schenectady-troy, ny  |  -3.652022   .0430616   -84.81   0.000    -3.736421   -3.567623
                                   10740. albuquerque, nm  |  -3.687591   .0502616   -73.37   0.000    -3.786102    -3.58908
                 ...
                 49660. youngstown-warren-boardman, oh-pa  |  -3.260858   .0470553   -69.30   0.000    -3.353084   -3.168631
    ------------------------------------------------------------------------------------------------------------------------
    
    . margins raceth, at(forborn=(0 1)) 
    
    Predictive margins                              Number of obs     =  1,841,809
    Model VCE    : OIM
    
    Expression   : Pr(homeown), predict()
    
    1._at        : forborn         =           0
    
    2._at        : forborn         =           1
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
      _at#raceth |
       1#1. NHW  |          .  (not estimable)
       1#4. NHC  |          .  (not estimable)
       1#5. NHJ  |          .  (not estimable)
       1#6. NHF  |          .  (not estimable)
       1#7. NHI  |          .  (not estimable)
       1#8. NHK  |          .  (not estimable)
       1#9. NHV  |          .  (not estimable)
       2#1. NHW  |          .  (not estimable)
       2#4. NHC  |          .  (not estimable)
       2#5. NHJ  |          .  (not estimable)
       2#6. NHF  |          .  (not estimable)
       2#7. NHI  |          .  (not estimable)
       2#8. NHK  |          .  (not estimable)
       2#9. NHV  |          .  (not estimable)
    ------------------------------------------------------------------------------
    After reading manuals and researching on this topic, it seems that it is likely caused by empty cells. However, I am using a large dataset and there is no empty cell when I run the crosstab.

    Code:
    . tab raceth forborn if both==1,m
    
                |        forborn
         raceth |         0          1 |     Total
    ------------+----------------------+----------
         1. NHW | 1,564,121    116,852 | 1,680,973 
         4. NHC |     9,099     40,712 |    49,811 
         5. NHJ |     4,945      3,989 |     8,934 
         6. NHF |     4,850     21,479 |    26,329 
         7. NHI |     3,595     38,288 |    41,883 
         8. NHK |     2,442     13,908 |    16,350 
         9. NHV |     1,732     15,797 |    17,529 
    ------------+----------------------+----------
          Total | 1,590,784    251,025 | 1,841,809
    When I add noestimcheck, the results show up and they look reasonable. Should I trust the results? I found out this old post http://statalist.1588530.n2.nabble.c...td3407157.html and it seems that noestimcheck needs to be used with great caution with interaction terms. I am using Stata 16.

    Thanks!
Working...
X