Announcement

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

  • Controls at region and country level

    Dear Statalist,

    I am using the ESWB database. Here is an example of my data and my variables of interest:


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str26 country_01 double year byte region double idstd float(fin11 lcar1) byte(k7 b8) float(exporter ownership location) long sector double size byte k9
    "Argentina2017"      2017 4 622836 1 4.1431346 1 1 0 0 1 1 3 1
    "Argentina2017"      2017 4 622402 0  2.995732 1 1 0 0 1 1 2 2
    "Armenia2020"        2020 1 708684 0  2.833213 1 . 0 0 1 2 2 1
    "Armenia2020"        2020 1 709091 .  2.772589 0 0 0 0 1 2 1 .
    "Armenia2020"        2020 1 709039 . 2.1972246 0 0 0 0 0 1 1 .
    "Bangladesh2013"     2013 6 532106 .  3.135494 0 1 0 0 1 2 3 .
    "Bangladesh2013"     2013 6 531680 .  2.564949 0 0 0 0 1 1 2 1
    "Bangladesh2013"     2013 6 531475 1  3.367296 1 0 0 0 1 2 1 1
    "Bangladesh2013"     2013 6 531456 1   3.73767 1 0 0 0 1 1 2 1
    "Bangladesh2013"     2013 6 532327 1  3.295837 0 1 0 0 0 1 3 2
    "Bangladesh2013"     2013 6 532108 .    3.7612 1 0 0 0 1 2 3 .
    "Belarus2018"        2018 1 650533 1  2.397895 0 0 0 0 0 1 1 2
    "Belgium2020"        2020 1 712861 . 3.6635616 0 0 1 1 1 2 1 .
    "Bulgaria2019"       2019 1 679663 1 3.3322046 1 1 0 0 0 1 1 1
    "Chile2010"          2010 4 495884 1 3.4011974 1 0 0 0 1 1 2 1
    "Chile2010"          2010 4 496523 1  3.367296 1 1 0 0 0 1 2 2
    "China2012"          2012 3 523867 .  2.564949 0 1 0 0 1 2 3 .
    "China2012"          2012 3 523997 . 2.6390574 0 0 0 0 1 2 1 .
    "China2012"          2012 3 522465 1  2.772589 0 1 0 0 1 1 2 2
    "China2012"          2012 3 522703 .  2.397895 1 0 0 0 1 1 2 .
    "China2012"          2012 3 522528 .  2.944439 0 1 0 0 1 1 3 .
    "China2012"          2012 3 523751 . 2.1972246 0 0 0 0 1 2 1 .
    "China2012"          2012 3 523976 .  2.772589 0 0 1 0 1 2 1 .
    "China2012"          2012 3 522675 .  2.995732 1 1 1 1 1 1 3 2
    "Colombia2017"       2017 4 625879 0  2.564949 0 1 0 1 1 2 1 1
    "Colombia2017"       2017 4 626322 0  3.465736 1 1 0 0 1 1 1 1
    "Costarica2010"      2010 4 501907 1  3.713572 1 0 0 0 1 2 1 2
    "Costarica2010"      2010 4 502095 1 3.0445225 0 0 0 0 1 2 2 1
    "Czech Republic2019" 2019 1 678733 . 3.3322046 1 1 0 0 0 1 2 .
    "Czech Republic2019" 2019 1 678750 0  3.367296 1 1 0 0 0 1 2 1
    "Czech Republic2019" 2019 1 678819 1  3.295837 1 1 0 0 0 1 3 1
    "Czech Republic2019" 2019 1 678790 .  3.367296 0 1 0 0 0 1 2 .
    "Denmark2020"        2020 1 721422 1 4.5849676 1 1 1 1 0 1 3 1
    "Denmark2020"        2020 1 720880 .  2.944439 1 1 1 0 0 1 2 .
    "Egypt2020"          2020 5 704812 .   1.94591 0 0 0 0 0 2 1 .
    "Egypt2020"          2020 5 706085 . 2.0794415 0 0 0 0 1 2 1 .
    "Egypt2020"          2020 5 704282 .  3.135494 0 1 0 0 1 1 3 .
    "Egypt2020"          2020 5 706221 .  3.433987 0 0 0 0 1 2 2 .
    "Egypt2020"          2020 5 706325 . 1.7917595 0 0 0 0 1 2 1 .
    "Egypt2020"          2020 5 703814 .  3.295837 1 0 1 0 1 1 3 .
    "Egypt2020"          2020 5 704644 .  2.484907 1 0 0 0 1 1 2 .
    "ElSalvador2016"     2016 4 605851 .  3.433987 0 0 0 0 1 2 1 .
    "Ethiopia2015"       2015 2 590852 0  .6931472 0 0 0 0 0 1 1 3
    "Ethiopia2015"       2015 2 590495 1 2.1972246 1 0 0 0 1 2 2 1
    "Finland2020"        2020 1 722038 1 4.7004805 1 1 0 0 0 2 2 1
    "Finland2020"        2020 1 722084 .   3.89182 1 1 1 0 0 1 3 .
    "Finland2020"        2020 1 722262 1 2.0794415 0 0 1 0 0 1 1 1
    "Georgia2019"        2019 1 669347 . 1.3862944 0 . 1 0 0 2 1 .
    "Georgia2019"        2019 1 669739 .  2.772589 0 . 1 0 1 2 2 .
    "Georgia2019"        2019 1 669267 .  2.833213 0 0 0 0 1 2 1 .
    "Georgia2019"        2019 1 669631 .  1.609438 0 0 0 0 1 2 2 .
    "Ghana2013"          2013 2 557991 . 2.3025851 1 0 0 1 0 2 1 .
    "Greece2018"         2018 1 649544 1 3.0445225 1 1 0 0 0 1 3 1
    "Greece2018"         2018 1 649550 1  3.433987 1 . 1 0 0 2 3 1
    "Greece2018"         2018 1 649618 1 2.0794415 1 1 0 0 0 1 2 1
    "Greece2018"         2018 1 649339 . 2.1972246 0 1 0 0 0 1 1 .
    "Hungary2019"        2019 1 680257 .  2.484907 0 0 0 0 0 2 1 .
    "Hungary2019"        2019 1 680544 0 2.6390574 1 0 1 0 0 2 1 1
    "Hungary2019"        2019 1 680471 .  2.772589 0 . 0 0 0 1 1 .
    "India2014"          2014 6 566685 1 1.7917595 0 0 0 0 0 1 2 2
    "India2014"          2014 6 571165 .  1.609438 1 0 0 0 1 1 2 .
    "India2014"          2014 6 565548 1 1.7917595 1 1 0 0 1 1 3 2
    "India2014"          2014 6 563360 . 3.3322046 0 0 0 0 1 2 2 .
    "India2014"          2014 6 571206 1  2.833213 1 1 0 1 1 1 3 2
    "India2014"          2014 6 570433 .   2.70805 1 1 0 0 0 1 3 .
    "India2014"          2014 6 565082 1 2.1972246 0 1 0 0 1 1 1 2
    "India2014"          2014 6 570847 1 3.5263605 1 1 1 0 0 1 3 1
    "India2014"          2014 6 570171 1 1.3862944 1 0 0 0 1 1 1 2
    "India2014"          2014 6 567720 .  3.295837 1 0 0 0 1 1 2 .
    "India2014"          2014 6 567048 . 3.2580965 0 1 0 0 1 1 2 .
    "India2014"          2014 6 570465 .  2.564949 1 1 0 0 0 1 2 .
    "India2014"          2014 6 568138 . 2.3025851 1 0 0 0 0 1 1 .
    "India2014"          2014 6 570509 . 3.0910425 1 1 0 0 0 1 2 .
    "India2014"          2014 6 566869 1   2.70805 1 0 0 0 0 1 1 2
    "India2014"          2014 6 571434 1  2.833213 1 1 0 0 1 1 2 2
    "India2014"          2014 6 569114 .  2.833213 1 0 0 0 0 1 2 .
    "India2014"          2014 6 570345 .   2.70805 1 1 0 0 0 1 3 .
    "India2014"          2014 6 567482 .  2.833213 0 . 0 0 0 1 2 .
    "India2014"          2014 6 565961 1  3.912023 1 1 0 0 0 1 2 2
    "India2014"          2014 6 566068 . 3.2580965 1 1 0 0 0 1 2 .
    "India2014"          2014 6 565400 .  3.583519 0 1 0 0 0 1 2 .
    "India2014"          2014 6 571318 1 2.6390574 1 0 0 0 0 1 2 2
    "India2014"          2014 6 563270 .  1.609438 1 1 0 0 0 2 3 .
    "India2014"          2014 6 568961 .  1.609438 1 0 0 0 0 1 2 .
    "Indonesia2015"      2015 3 591671 .  2.772589 0 0 0 0 1 2 1 .
    "Indonesia2015"      2015 3 591876 .  2.564949 0 0 0 0 1 2 1 .
    "Indonesia2015"      2015 3 591284 1 3.8286414 0 0 0 0 1 1 3 2
    "Indonesia2015"      2015 3 592396 .   2.70805 0 0 0 0 1 1 3 .
    "Indonesia2015"      2015 3 592454 .  2.944439 0 1 0 0 1 1 2 .
    "Indonesia2015"      2015 3 591237 .  2.772589 0 0 0 0 0 1 3 .
    "Indonesia2015"      2015 3 591314 1 2.6390574 0 0 0 0 1 1 1 2
    "Iraq2011"           2011 5 512422 .  1.609438 0 0 0 0 1 1 1 .
    "Iraq2011"           2011 5 512689 .  1.609438 0 0 0 0 . 1 1 .
    "Italy2019"          2019 1 659203 .  3.912023 1 1 0 0 1 1 3 .
    "Italy2019"          2019 1 659189 .  4.304065 1 1 1 0 0 1 3 .
    "Jordan2019"         2019 5 662153 .  3.218876 0 0 0 0 . 2 1 .
    "Kazakhstan2019"     2019 1 663347 1  1.609438 0 0 0 0 1 1 2 1
    "Kazakhstan2019"     2019 1 664042 . 1.7917595 0 0 0 0 1 1 1 .
    "Kazakhstan2019"     2019 1 663650 .         . 0 0 0 . 0 1 2 .
    "Kazakhstan2019"     2019 1 664259 .   1.94591 0 0 0 0 0 2 2 .
    end
    label values region region
    label def region 1 "ECA", modify
    label def region 2 "AFR", modify
    label def region 3 "EAP", modify
    label def region 4 "LAC", modify
    label def region 5 "MNA", modify
    label def region 6 "SAR", modify
    label values k7 k7
    label def k7 0 "No", modify
    label def k7 1 "Yes", modify
    label values b8 b8
    label def b8 0 "No", modify
    label def b8 1 "Yes", modify
    label values ownership ownership
    label def ownership 0 "Domestic", modify
    label def ownership 1 "Foreign", modify
    label values sector sector
    label def sector 1 "Manufacturing", modify
    label def sector 2 "Services", modify
    label values size size
    label def size 1 "Small(<20)", modify
    label def size 2 "Medium(20-99)", modify
    label def size 3 "Large(100 And Over)", modify
    label values k9 K9
    label def K9 1 "Private commercial banks", modify
    label def K9 2 "State-owned banks or government agency", modify
    label def K9 3 "Non-bank financial institutions", modify
    I am trying to estimate the next equation using logistic regression. The code is like this:

    logit fin11 n_outcome lcar1 k7 b8 exporter ownership location sector i.size i.k9

    In one paper that I am using as a reference [Ranasighe & Restuccia (2018), Table 2, page 253], they include region, country and time controls using dummy variables. That is,

    logit fin11 n_outcome lcar1 k7 b8 exporter ownership location sector i.size i.k9 i.country i.region i.year

    All year dummy variables are omitted and 5 country dummies over 60 too due to a collinearity problem. I found that those countries that stata ommits, are one per region. However, I cannot understand why there is a multicollinearity problem, and why in that paper they ignore that problem.

    Thanks in advanced.

  • #2
    Ibai:
    the issue is that some regerssors predict the outcome perfectly (i.e., no variation):
    Code:
    . logit fin11  lcar1 k7 b8 exporter ownership location sector i.size i.k9
    
    note: 3.size != 0 predicts success perfectly;
          3.size omitted and 9 obs not used.
    
    note: ownership != 0 predicts failure perfectly;
          ownership omitted and 1 obs not used.
    
    note: 3.k9 != 0 predicts failure perfectly;
          3.k9 omitted and 1 obs not used.
    
    note: k7 != 1 predicts success perfectly;
          k7 omitted and 8 obs not used.
    
    note: exporter != 0 predicts failure perfectly;
          exporter omitted and 1 obs not used.
    
    note: b8 != 1 predicts success perfectly;
          b8 omitted and 8 obs not used.
    
    note: sector != 1 predicts success perfectly;
          sector omitted and 1 obs not used.
    
    Iteration 0:   log likelihood = -5.2925059  
    Iteration 1:   log likelihood = -1.0422758  
    Iteration 2:   log likelihood =          0  
    Iteration 3:   log likelihood =          0  
    
    Logistic regression                                     Number of obs =      8
                                                            LR chi2(-1)   =  10.59
                                                            Prob > chi2   =      .
    Log likelihood = 0                                      Pseudo R2     = 1.0000
    
    ---------------------------------------------------------------------------------------------------------
                                      fin11 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    ----------------------------------------+----------------------------------------------------------------
                                      lcar1 |  -1333.044          .        .       .            .           .
                                         k7 |          0  (omitted)
                                         b8 |          0  (omitted)
                                   exporter |          0  (omitted)
                                  ownership |          0  (omitted)
                                   location |   -1369.07          .        .       .            .           .
                                     sector |          0  (omitted)
                                            |
                                       size |
                             Medium(20-99)  |   -1648.67          .        .       .            .           .
                       Large(100 And Over)  |          0  (empty)
                                            |
                                         k9 |
    State-owned banks or government agency  |   2264.861          .        .       .            .           .
           Non-bank financial institutions  |          0  (empty)
                                            |
                                      _cons |   4723.917          .        .       .            .           .
    ---------------------------------------------------------------------------------------------------------
    Note: 3 failures and 5 successes completely determined.
    I'd email the Authors of the paper you mention and ask how they managed the issue.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Ibai:
      the issue is that some regerssors predict the outcome perfectly (i.e., no variation):
      Code:
      . logit fin11 lcar1 k7 b8 exporter ownership location sector i.size i.k9
      
      note: 3.size != 0 predicts success perfectly;
      3.size omitted and 9 obs not used.
      
      note: ownership != 0 predicts failure perfectly;
      ownership omitted and 1 obs not used.
      
      note: 3.k9 != 0 predicts failure perfectly;
      3.k9 omitted and 1 obs not used.
      
      note: k7 != 1 predicts success perfectly;
      k7 omitted and 8 obs not used.
      
      note: exporter != 0 predicts failure perfectly;
      exporter omitted and 1 obs not used.
      
      note: b8 != 1 predicts success perfectly;
      b8 omitted and 8 obs not used.
      
      note: sector != 1 predicts success perfectly;
      sector omitted and 1 obs not used.
      
      Iteration 0: log likelihood = -5.2925059
      Iteration 1: log likelihood = -1.0422758
      Iteration 2: log likelihood = 0
      Iteration 3: log likelihood = 0
      
      Logistic regression Number of obs = 8
      LR chi2(-1) = 10.59
      Prob > chi2 = .
      Log likelihood = 0 Pseudo R2 = 1.0000
      
      ---------------------------------------------------------------------------------------------------------
      fin11 | Coefficient Std. err. z P>|z| [95% conf. interval]
      ----------------------------------------+----------------------------------------------------------------
      lcar1 | -1333.044 . . . . .
      k7 | 0 (omitted)
      b8 | 0 (omitted)
      exporter | 0 (omitted)
      ownership | 0 (omitted)
      location | -1369.07 . . . . .
      sector | 0 (omitted)
      |
      size |
      Medium(20-99) | -1648.67 . . . . .
      Large(100 And Over) | 0 (empty)
      |
      k9 |
      State-owned banks or government agency | 2264.861 . . . . .
      Non-bank financial institutions | 0 (empty)
      |
      _cons | 4723.917 . . . . .
      ---------------------------------------------------------------------------------------------------------
      Note: 3 failures and 5 successes completely determined.
      I'd email the Authors of the paper you mention and ask how they managed the issue.
      Hi Carlo,

      Thank you for your answer. May be the example of my data that I posted is not appropiate, because my sample contains almost 20k observations for 60 different countries. When I use my sample, there is no such problem of non-variation (except for two countries, 128 and 259, where the dependent variable fin11, only takes value 1). Here I post the output of my regressions:

      Code:
      . logit fin11  lcar1 k7 b8 exporter ownership location sector  i.size i.k9 if country!=128 & country!=259
      
      Iteration 0:   log likelihood = -12015.957  
      Iteration 1:   log likelihood = -11607.546  
      Iteration 2:   log likelihood = -11603.212  
      Iteration 3:   log likelihood =  -11603.21  
      Iteration 4:   log likelihood =  -11603.21  
      
      Logistic regression                                     Number of obs = 19,284
                                                              LR chi2(12)   = 825.49
                                                              Prob > chi2   = 0.0000
      Log likelihood = -11603.21                              Pseudo R2     = 0.0343
      
      ---------------------------------------------------------------------------------------------------------
                                        fin11 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      ----------------------------------------+----------------------------------------------------------------
                                        lcar1 |  -.1361233   .0234092    -5.81   0.000    -.1820045   -.0902422
                                           k7 |  -.4868381   .0345086   -14.11   0.000    -.5544737   -.4192024
                                           b8 |   .0978016   .0373998     2.62   0.009     .0244994    .1711038
                                     exporter |   .1358803   .0419049     3.24   0.001     .0537483    .2180123
                                    ownership |  -.0660429   .0593194    -1.11   0.266    -.1823068    .0502211
                                     location |  -.1526852   .0323137    -4.73   0.000     -.216019   -.0893514
                                       sector |  -.0317589   .0348871    -0.91   0.363    -.1001364    .0366186
                                              |
                                         size |
                               Medium(20-99)  |   .3366276   .0384094     8.76   0.000     .2613466    .4119086
                         Large(100 And Over)  |   .4284132   .0457756     9.36   0.000     .3386947    .5181317
                                              |
                                           k9 |
      State-owned banks or government agency  |   .6391684   .0392505    16.28   0.000     .5622387     .716098
             Non-bank financial institutions  |  -.1879394   .0882534    -2.13   0.033    -.3609129   -.0149659
                                       Other  |  -1.118749   .1497304    -7.47   0.000    -1.412215   -.8252826
                                              |
                                        _cons |   1.164834   .0928971    12.54   0.000      .982759    1.346909
      ---------------------------------------------------------------------------------------------------------
      
      
      logit fin11  lcar1 k7 b8 exporter ownership location sector  i.size i.k9 i.country i.region i.year if country!=128 & country!=259, vce(cluster country)
      
      note: 2.region omitted because of collinearity.
      note: 3.region omitted because of collinearity.
      note: 4.region omitted because of collinearity.
      note: 5.region omitted because of collinearity.
      note: 6.region omitted because of collinearity.
      note: 2011.year omitted because of collinearity.
      note: 2012.year omitted because of collinearity.
      note: 2013.year omitted because of collinearity.
      note: 2014.year omitted because of collinearity.
      note: 2015.year omitted because of collinearity.
      note: 2016.year omitted because of collinearity.
      note: 2017.year omitted because of collinearity.
      note: 2018.year omitted because of collinearity.
      note: 2019.year omitted because of collinearity.
      note: 2020.year omitted because of collinearity.
      Iteration 0:   log pseudolikelihood = -12015.957  
      Iteration 1:   log pseudolikelihood = -10517.658  
      Iteration 2:   log pseudolikelihood = -10456.646  
      Iteration 3:   log pseudolikelihood = -10455.165  
      Iteration 4:   log pseudolikelihood = -10455.157  
      Iteration 5:   log pseudolikelihood = -10455.157  
      
      Logistic regression                                     Number of obs = 19,284
                                                              Wald chi2(11) =      .
                                                              Prob > chi2   =      .
      Log pseudolikelihood = -10455.157                       Pseudo R2     = 0.1299
      
                                                                (Std. err. adjusted for 60 clusters in country)
      ---------------------------------------------------------------------------------------------------------
                                              |               Robust
                                        fin11 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      ----------------------------------------+----------------------------------------------------------------
                                        lcar1 |  -.0026255   .0310896    -0.08   0.933    -.0635601    .0583091
                                           k7 |  -.0756322   .0849796    -0.89   0.373    -.2421892    .0909249
                                           b8 |   .1249036   .0599805     2.08   0.037      .007344    .2424633
                                     exporter |   .1239388   .0603453     2.05   0.040     .0056641    .2422135
                                    ownership |  -.1570133   .0886548    -1.77   0.077    -.3307736     .016747
                                     location |   -.073328   .0710741    -1.03   0.302    -.2126306    .0659746
                                       sector |   -.036006   .0722839    -0.50   0.618    -.1776798    .1056678
                                              |
                                         size |
                               Medium(20-99)  |    .236467    .067902     3.48   0.000     .1033816    .3695524
                         Large(100 And Over)  |   .2802615   .0597594     4.69   0.000     .1631353    .3973878
                                              |
                                           k9 |
      State-owned banks or government agency  |    .205899   .1349049     1.53   0.127    -.0585098    .4703077
             Non-bank financial institutions  |  -.5018669   .1400135    -3.58   0.000    -.7762883   -.2274456
                                       Other  |  -1.448172   .2553297    -5.67   0.000    -1.948609   -.9477345
                                              |
                                      country |
                                 Armenia2020  |   .8410564   .0679515    12.38   0.000     .7078739    .9742389
                              Bangladesh2013  |   1.940747   .0560378    34.63   0.000     1.830915    2.050578
                                 Belarus2018  |   1.088805   .0677292    16.08   0.000     .9560579    1.221552
                                 Belgium2020  |  -.7362627   .0534814   -13.77   0.000    -.8410843   -.6314411
                                Bulgaria2019  |   .9418924   .0674681    13.96   0.000     .8096574    1.074127
                                   Chile2010  |  -.2639994   .0227351   -11.61   0.000    -.3085594   -.2194393
                                   China2012  |   1.024723   .0985069    10.40   0.000      .831653    1.217793
                                Colombia2017  |  -.3156425   .0340164    -9.28   0.000    -.3823135   -.2489716
                               Costarica2010  |   2.361854   .0622416    37.95   0.000     2.239863    2.483846
                          Czech Republic2019  |   1.085682   .0504358    21.53   0.000     .9868301    1.184535
                                     DRC2013  |   .9636231   .0591854    16.28   0.000     .8476219    1.079624
                                 Denmark2020  |   .8046452   .0573559    14.03   0.000     .6922297    .9170608
                                   Egypt2020  |   2.189421   .0855738    25.59   0.000       2.0217    2.357143
                              ElSalvador2016  |    1.44403   .0393105    36.73   0.000     1.366983    1.521077
                                Ethiopia2015  |   1.999711   .0552656    36.18   0.000     1.891392    2.108029
                                 Finland2020  |   1.285555   .0540564    23.78   0.000     1.179606    1.391504
                                 Georgia2019  |   1.458506   .0769581    18.95   0.000     1.307671    1.609341
                                   Ghana2013  |   1.342579   .0453909    29.58   0.000     1.253615    1.431544
                                  Greece2018  |    1.32009   .0691377    19.09   0.000     1.184583    1.455598
                                 Hungary2019  |   .5087644   .0556327     9.15   0.000     .3997263    .6178025
                                   India2014  |   1.276626   .1067755    11.96   0.000      1.06735    1.485902
                               Indonesia2015  |   1.920738   .0813155    23.62   0.000     1.761362    2.080113
                                 Ireland2020  |  -.2752492   .0561551    -4.90   0.000    -.3853112   -.1651872
                                   Italy2019  |   .1866117   .0570452     3.27   0.001     .0748051    .2984183
                                  Jordan2019  |   2.379368   .0486427    48.92   0.000      2.28403    2.474706
                              Kazakhstan2019  |   1.341468   .0695795    19.28   0.000     1.205095    1.477841
                                   Kenya2018  |    1.06159   .0379502    27.97   0.000     .9872084    1.135971
                                 Lebanon2019  |   1.598772   .0448688    35.63   0.000     1.510831    1.686713
                                  Malawi2014  |   3.072267    .043724    70.27   0.000      2.98657    3.157965
                                Malaysia2015  |  -.2524353   .0440109    -5.74   0.000    -.3386951   -.1661754
                                  Mexico2010  |   .0801382   .0472885     1.69   0.090    -.0125456     .172822
                                 Morocco2019  |   .2515013   .0476869     5.27   0.000     .1580367     .344966
                              Mozambique2018  |   2.857745   .0711215    40.18   0.000     2.718349     2.99714
                                 Myanmar2016  |   3.483534    .078615    44.31   0.000     3.329452    3.637617
                                 Namibia2014  |   .0825441   .0507886     1.63   0.104    -.0169997    .1820879
                             Netherlands2020  |   .9782813   .0586364    16.68   0.000     .8633561    1.093207
                                 Nigeria2014  |   2.219756   .1162971    19.09   0.000     1.991818    2.447694
                                Pakistan2013  |   .6093749   .0310348    19.64   0.000     .5485479     .670202
                                    Peru2017  |  -.0572665   .0387336    -1.48   0.139    -.1331829    .0186499
                             Philippines2015  |   .2686214    .067613     3.97   0.000     .1361025    .4011404
                                  Poland2019  |  -.1279433   .0654054    -1.96   0.050    -.2561356     .000249
                                Portugal2019  |   -.310178   .0595436    -5.21   0.000    -.4268813   -.1934747
                                 Romania2019  |   .4681944   .0407713    11.48   0.000     .3882842    .5481046
                                  Russia2019  |   .7687917   .0671498    11.45   0.000     .6371806    .9004028
                                 Senegal2014  |   1.726422   .0439863    39.25   0.000      1.64021    1.812633
                             SouthAfrica2020  |  -.3516742   .0399193    -8.81   0.000    -.4299146   -.2734339
                              Southsudan2014  |   1.646932   .1122404    14.67   0.000     1.426945    1.866919
                                SriLanka2011  |   1.148261   .0586368    19.58   0.000     1.033335    1.263187
                                  Sweden2020  |   .2509414   .0596349     4.21   0.000     .1340591    .3678237
                                Tanzania2013  |   1.681636   .0713832    23.56   0.000     1.541727    1.821544
                                Thailand2016  |   1.416868   .0353214    40.11   0.000     1.347639    1.486096
                                 Tunisia2020  |   2.507868   .0520452    48.19   0.000     2.405862    2.609875
                                 Türkiye2019  |  -.4211231   .0247566   -17.01   0.000    -.4696452    -.372601
                                  Uganda2013  |   1.203943   .0723268    16.65   0.000     1.062185      1.3457
                                 Ukraine2019  |   .6364521   .0634251    10.03   0.000     .5121413     .760763
                              Uzbekistan2019  |   3.039389   .1113135    27.30   0.000     2.821219     3.25756
                                 Vietnam2015  |   2.447115   .0822275    29.76   0.000     2.285952    2.608278
                                  Zambia2019  |    1.90718   .0582556    32.74   0.000     1.793001    2.021359
                                Zimbabwe2016  |   2.189621    .067767    32.31   0.000       2.0568    2.322442
                                              |
                                       region |
                                         AFR  |          0  (omitted)
                                         EAP  |          0  (omitted)
                                         LAC  |          0  (omitted)
                                         MNA  |          0  (omitted)
                                         SAR  |          0  (omitted)
                                              |
                                         year |
                                        2011  |          0  (omitted)
                                        2012  |          0  (omitted)
                                        2013  |          0  (omitted)
                                        2014  |          0  (omitted)
                                        2015  |          0  (omitted)
                                        2016  |          0  (omitted)
                                        2017  |          0  (omitted)
                                        2018  |          0  (omitted)
                                        2019  |          0  (omitted)
                                        2020  |          0  (omitted)
                                              |
                                        _cons |  -.0454418   .1779288    -0.26   0.798    -.3941758    .3032923
      ---------------------------------------------------------------------------------------------------------
      As you can observe, when I try to control at country, region and year level, the variables region and year are omitted.

      Thank you in advanced!
      Last edited by Ibai Ostolozaga Falcon; 20 Oct 2022, 02:18.

      Comment


      • #4
        Ibai:
        I guess that it may be due to the fact that you have -i.CountyYear-, -i.Region- and -i.Year-.
        There's duplicated information across the three variables; therefore, Stata has to choose which one to keep in.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Ibai:
          I guess that it may be due to the fact that you have -i.CountyYear-, -i.Region- and -i.Year-.
          There's duplicated information across the three variables; therefore, Stata has to choose which one to keep in.
          Carlo,

          Thank you again. Even if I replace my variable i.country by i.Country, I get the same problem.

          Code:
            
           logit fin11  lcar1 k7 b8 exporter ownership location sector  i.size i.k9 i.Country i.region i.year if country!=128 & country!=259, vce(cluster country) 
          
          note: 2.region omitted because of collinearity.
          note: 3.region omitted because of collinearity.
          note: 4.region omitted because of collinearity.
          note: 5.region omitted because of collinearity.
          note: 6.region omitted because of collinearity.
          note: 2011.year omitted because of collinearity.
          note: 2012.year omitted because of collinearity.
          note: 2013.year omitted because of collinearity.
          note: 2014.year omitted because of collinearity.
          note: 2015.year omitted because of collinearity.
          note: 2016.year omitted because of collinearity.
          note: 2017.year omitted because of collinearity.
          note: 2018.year omitted because of collinearity.
          note: 2019.year omitted because of collinearity.
          note: 2020.year omitted because of collinearity.
          Iteration 0:   log pseudolikelihood = -12015.957  
          Iteration 1:   log pseudolikelihood = -10517.658  
          Iteration 2:   log pseudolikelihood = -10456.646  
          Iteration 3:   log pseudolikelihood = -10455.165  
          Iteration 4:   log pseudolikelihood = -10455.157  
          Iteration 5:   log pseudolikelihood = -10455.157  
          
          Logistic regression                                     Number of obs = 19,284
                                                                  Wald chi2(11) =      .
                                                                  Prob > chi2   =      .
          Log pseudolikelihood = -10455.157                       Pseudo R2     = 0.1299
          
                                                                    (Std. err. adjusted for 60 clusters in country)
          ---------------------------------------------------------------------------------------------------------
                                                  |               Robust
                                            fin11 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
          ----------------------------------------+----------------------------------------------------------------
                                            lcar1 |  -.0026255   .0310896    -0.08   0.933    -.0635601    .0583091
                                               k7 |  -.0756322   .0849796    -0.89   0.373    -.2421892    .0909249
                                               b8 |   .1249036   .0599805     2.08   0.037      .007344    .2424633
                                         exporter |   .1239388   .0603453     2.05   0.040     .0056641    .2422135
                                        ownership |  -.1570133   .0886548    -1.77   0.077    -.3307736     .016747
                                         location |   -.073328   .0710741    -1.03   0.302    -.2126306    .0659746
                                           sector |   -.036006   .0722839    -0.50   0.618    -.1776798    .1056678
                                                  |
                                             size |
                                   Medium(20-99)  |    .236467    .067902     3.48   0.000     .1033816    .3695524
                             Large(100 And Over)  |   .2802615   .0597594     4.69   0.000     .1631353    .3973878
                                                  |
                                               k9 |
          State-owned banks or government agency  |    .205899   .1349049     1.53   0.127    -.0585098    .4703077
                 Non-bank financial institutions  |  -.5018669   .1400135    -3.58   0.000    -.7762883   -.2274456
                                           Other  |  -1.448172   .2553297    -5.67   0.000    -1.948609   -.9477345
                                                  |
                                          Country |
                                         Armenia  |   .8410564   .0679515    12.38   0.000     .7078739    .9742389
                                      Bangladesh  |   1.940747   .0560378    34.63   0.000     1.830915    2.050578
                                         Belarus  |   1.088805   .0677292    16.08   0.000     .9560579    1.221552
                                         Belgium  |  -.7362627   .0534814   -13.77   0.000    -.8410843   -.6314411
                                        Bulgaria  |   .9418924   .0674681    13.96   0.000     .8096574    1.074127
                                           Chile  |  -.2639994   .0227351   -11.61   0.000    -.3085594   -.2194393
                                           China  |   1.024723   .0985069    10.40   0.000      .831653    1.217793
                                        Colombia  |  -.3156425   .0340164    -9.28   0.000    -.3823135   -.2489716
                                Congo, Dem. Rep.  |   .9636231   .0591854    16.28   0.000     .8476219    1.079624
                                      Costa Rica  |   2.361854   .0622416    37.95   0.000     2.239863    2.483846
                                  Czech Republic  |   1.085682   .0504358    21.53   0.000     .9868301    1.184535
                                         Denmark  |   .8046452   .0573559    14.03   0.000     .6922297    .9170608
                                Egypt, Arab Rep.  |   2.189421   .0855738    25.59   0.000       2.0217    2.357143
                                     El Salvador  |    1.44403   .0393105    36.73   0.000     1.366983    1.521077
                                        Ethiopia  |   1.999711   .0552656    36.18   0.000     1.891392    2.108029
                                         Finland  |   1.285555   .0540564    23.78   0.000     1.179606    1.391504
                                         Georgia  |   1.458506   .0769581    18.95   0.000     1.307671    1.609341
                                           Ghana  |   1.342579   .0453909    29.58   0.000     1.253615    1.431544
                                          Greece  |    1.32009   .0691377    19.09   0.000     1.184583    1.455598
                                         Hungary  |   .5087644   .0556327     9.15   0.000     .3997263    .6178025
                                           India  |   1.276626   .1067755    11.96   0.000      1.06735    1.485902
                                       Indonesia  |   1.920738   .0813155    23.62   0.000     1.761362    2.080113
                                         Ireland  |  -.2752492   .0561551    -4.90   0.000    -.3853112   -.1651872
                                           Italy  |   .1866117   .0570452     3.27   0.001     .0748051    .2984183
                                          Jordan  |   2.379368   .0486427    48.92   0.000      2.28403    2.474706
                                      Kazakhstan  |   1.341468   .0695795    19.28   0.000     1.205095    1.477841
                                           Kenya  |    1.06159   .0379502    27.97   0.000     .9872084    1.135971
                                         Lebanon  |   1.598772   .0448688    35.63   0.000     1.510831    1.686713
                                          Malawi  |   3.072267    .043724    70.27   0.000      2.98657    3.157965
                                        Malaysia  |  -.2524353   .0440109    -5.74   0.000    -.3386951   -.1661754
                                          Mexico  |   .0801382   .0472885     1.69   0.090    -.0125456     .172822
                                         Morocco  |   .2515013   .0476869     5.27   0.000     .1580367     .344966
                                      Mozambique  |   2.857745   .0711215    40.18   0.000     2.718349     2.99714
                                         Myanmar  |   3.483534    .078615    44.31   0.000     3.329452    3.637617
                                         Namibia  |   .0825441   .0507886     1.63   0.104    -.0169997    .1820879
                                     Netherlands  |   .9782813   .0586364    16.68   0.000     .8633561    1.093207
                                         Nigeria  |   2.219756   .1162971    19.09   0.000     1.991818    2.447694
                                        Pakistan  |   .6093749   .0310348    19.64   0.000     .5485479     .670202
                                            Peru  |  -.0572665   .0387336    -1.48   0.139    -.1331829    .0186499
                                     Philippines  |   .2686214    .067613     3.97   0.000     .1361025    .4011404
                                          Poland  |  -.1279433   .0654054    -1.96   0.050    -.2561356     .000249
                                        Portugal  |   -.310178   .0595436    -5.21   0.000    -.4268813   -.1934747
                                         Romania  |   .4681944   .0407713    11.48   0.000     .3882842    .5481046
                              Russian Federation  |   .7687917   .0671498    11.45   0.000     .6371806    .9004028
                                         Senegal  |   1.726422   .0439863    39.25   0.000      1.64021    1.812633
                                    South Africa  |  -.3516742   .0399193    -8.81   0.000    -.4299146   -.2734339
                                     South Sudan  |   1.646932   .1122404    14.67   0.000     1.426945    1.866919
                                       Sri Lanka  |   1.148261   .0586368    19.58   0.000     1.033335    1.263187
                                          Sweden  |   .2509414   .0596349     4.21   0.000     .1340591    .3678237
                                        Tanzania  |   1.681636   .0713832    23.56   0.000     1.541727    1.821544
                                        Thailand  |   1.416868   .0353214    40.11   0.000     1.347639    1.486096
                                         Tunisia  |   2.507868   .0520452    48.19   0.000     2.405862    2.609875
                                         Turkiye  |  -.4211231   .0247566   -17.01   0.000    -.4696452    -.372601
                                          Uganda  |   1.203943   .0723268    16.65   0.000     1.062185      1.3457
                                         Ukraine  |   .6364521   .0634251    10.03   0.000     .5121413     .760763
                                      Uzbekistan  |   3.039389   .1113135    27.30   0.000     2.821219     3.25756
                                         Vietnam  |   2.447115   .0822275    29.76   0.000     2.285952    2.608278
                                          Zambia  |    1.90718   .0582556    32.74   0.000     1.793001    2.021359
                                        Zimbabwe  |   2.189621    .067767    32.31   0.000       2.0568    2.322442
                                                  |
                                           region |
                                             AFR  |          0  (omitted)
                                             EAP  |          0  (omitted)
                                             LAC  |          0  (omitted)
                                             MNA  |          0  (omitted)
                                             SAR  |          0  (omitted)
                                                  |
                                             year |
                                            2011  |          0  (omitted)
                                            2012  |          0  (omitted)
                                            2013  |          0  (omitted)
                                            2014  |          0  (omitted)
                                            2015  |          0  (omitted)
                                            2016  |          0  (omitted)
                                            2017  |          0  (omitted)
                                            2018  |          0  (omitted)
                                            2019  |          0  (omitted)
                                            2020  |          0  (omitted)
                                                  |
                                            _cons |  -.0454418   .1779288    -0.26   0.798    -.3941758    .3032923
          ---------------------------------------------------------------------------------------------------------
          As far as I know, it could be related with the matrix X? That is, could be region and year dummy variables linear combinations of country dummies?

          Comment


          • #6
            Ibai:
            yes, I think so.
            As an aside, since you have panel data, why not going -xtlogit-?
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X