Announcement

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

  • Time dummy in First-differenced model (xtivreg, fd)

    Dear Statalisters,

    I am analyzing whether Government expenditures have the potential to reduce income inequality in a Dynamic Panel data of 30 countries (1995-2020).
    I first computed fixed effects estimators (with country and time FE), and I now want to run a First-differenced model because I suspect endogeneity in my independent variables.

    I get satisfactory results with the following code
    Code:
    xtivreg gini_std_WIID l.gini_std_WIID total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP TaxIn Trade CPI (l.gini_std_WIID=l2.gini_std_WIID), fd
    but I want to add time fixed effects. I have created year dummies and tried running the following code
    Code:
    xtivreg gini_std_WIID l.gini_std_WIID total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP TaxIn Trade CPI y* (l.gini_std_WIID=l2.gini_std_WIID), fd
    but I get an error message
    Code:
    no observations
    r(2000);
    Is there any other way to include time FE?

    Thanks a lot for your help!
    Melanie

  • #2
    You need to show a data example using dataex. Presumably the y variables are the year indicators. I would use the raw year variable and the -xi- prefix.

    Code:
    xi: xtivreg gini_std_WIID l.gini_std_WIID total_GE educ_GE health_GE ///
    defence_GE social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP ///
    TaxIn Trade CPI i.year (l.gini_std_WIID=l2.gini_std_WIID), fd

    Comment


    • #3
      Andrew Musau many thanks, the code you suggested worked ! However, would you have any idea as to why some year dummies are omitted in the output?

      Here are the results:
      Code:
      . xi: xtivreg gini_std_WIID l.gini_std_WIID total_GE educ_GE health_GE ///
      > defence_GE social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP ///
      > TaxIn Trade CPI i.Year (l.gini_std_WIID=l2.gini_std_WIID), fd
      i.Year            _IYear_1995-2020    (naturally coded; _IYear_1995 omitted)
      note: _IYear_1996 omitted because of collinearity
      note: _IYear_2019 omitted because of collinearity
      note: _IYear_2020 omitted because of collinearity
      
      First-differenced IV regression
      Group variable:    code                         Number of obs     =        236
      Time variable:     Year                         Number of groups  =         23
      
      R-sq:                                           Obs per group:
           within  = 0.0023                                         min =          1
           between = 0.9736                                         avg =       10.5
           overall = 0.3033                                         max =         22
      
                                                      Wald chi2(35)     =      72.17
      corr(u_i, Xb)  = -0.8817                        Prob > chi2       =     0.0002
      
      --------------------------------------------------------------------------------
      D.             |
       gini_std_WIID |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ---------------+----------------------------------------------------------------
       gini_std_WIID |
                 LD. |  -.1110515     .06198    -1.79   0.073    -.2325301    .0104271
                 LD. |          0  (omitted)
                     |
            total_GE |
                 D1. |   .0007157   .0003155     2.27   0.023     .0000973    .0013342
                     |
             educ_GE |
                 D1. |   .0021579   .0030257     0.71   0.476    -.0037723    .0080881
                     |
           health_GE |
                 D1. |   .0019043   .0022039     0.86   0.388    -.0024153     .006224
                     |
          defence_GE |
                 D1. |  -.0056059   .0040337    -1.39   0.165    -.0135117    .0022999
                     |
      social_prot_GE |
                 D1. |  -.0059998   .0015968    -3.76   0.000    -.0091294   -.0028703
                     |
            logGDPpc |
                 D1. |   .4622962   .2122797     2.18   0.029     .0462356    .8783568
                     |
       logGDPpc2biis |
                 D1. |  -.0248289   .0110295    -2.25   0.024    -.0464464   -.0032114
                     |
                  hc |
                 D1. |    -.12696   .0806283    -1.57   0.115    -.2849885    .0310684
                     |
              Unempl |
                 D1. |   .0021737   .0006778     3.21   0.001     .0008453    .0035021
                     |
                TaxP |
                 D1. |    .001509   .0015737     0.96   0.338    -.0015754    .0045935
                     |
               TaxIn |
                 D1. |  -.0003949   .0011544    -0.34   0.732    -.0026575    .0018678
                     |
               Trade |
                 D1. |  -.0001708   .0001047    -1.63   0.103     -.000376    .0000344
                     |
                 CPI |
                 D1. |   .0000148   .0000125     1.19   0.235    -9.63e-06    .0000393
                     |
         _IYear_1996 |
                 D1. |          0  (omitted)
                     |
         _IYear_1997 |
                 D1. |          0  (omitted)
                     |
         _IYear_1998 |
                 D1. |  -.0026607   .0055489    -0.48   0.632    -.0135363    .0082148
                     |
         _IYear_1999 |
                 D1. |  -.0024451   .0074091    -0.33   0.741    -.0169667    .0120765
                     |
         _IYear_2000 |
                 D1. |   .0001629   .0083332     0.02   0.984    -.0161699    .0164956
                     |
         _IYear_2001 |
                 D1. |  -.0017249   .0087581    -0.20   0.844    -.0188905    .0154407
                     |
         _IYear_2002 |
                 D1. |   .0109178    .009372     1.16   0.244    -.0074511    .0292867
                     |
         _IYear_2003 |
                 D1. |   .0039363   .0101623     0.39   0.699    -.0159814    .0238539
                     |
         _IYear_2004 |
                 D1. |   .0005478   .0105167     0.05   0.958    -.0200646    .0211603
                     |
         _IYear_2005 |
                 D1. |  -.0021923   .0105222    -0.21   0.835    -.0228155    .0184309
                     |
         _IYear_2006 |
                 D1. |  -.0024169    .010316    -0.23   0.815    -.0226358    .0178021
                     |
         _IYear_2007 |
                 D1. |   .0006733   .0098855     0.07   0.946    -.0187018    .0200485
                     |
         _IYear_2008 |
                 D1. |   .0032879   .0094897     0.35   0.729    -.0153115    .0218873
                     |
         _IYear_2009 |
                 D1. |   -.000285   .0093279    -0.03   0.976    -.0185673    .0179974
                     |
         _IYear_2010 |
                 D1. |  -.0013544   .0086565    -0.16   0.876    -.0183208     .015612
                     |
         _IYear_2011 |
                 D1. |  -.0056802   .0080233    -0.71   0.479    -.0214056    .0100451
                     |
         _IYear_2012 |
                 D1. |  -.0059552   .0074223    -0.80   0.422    -.0205026    .0085923
                     |
         _IYear_2013 |
                 D1. |   -.003165   .0068066    -0.46   0.642    -.0165057    .0101758
                     |
         _IYear_2014 |
                 D1. |   -.000337   .0060993    -0.06   0.956    -.0122914    .0116174
                     |
         _IYear_2015 |
                 D1. |   .0021063   .0052062     0.40   0.686    -.0080977    .0123104
                     |
         _IYear_2016 |
                 D1. |   .0011598   .0043187     0.27   0.788    -.0073047    .0096242
                     |
         _IYear_2017 |
                 D1. |   .0022314     .00333     0.67   0.503    -.0042953     .008758
                     |
         _IYear_2018 |
                 D1. |  -.0011162   .0021712    -0.51   0.607    -.0053717    .0031393
                     |
         _IYear_2019 |
                 D1. |          0  (omitted)
                     |
         _IYear_2020 |
                 D1. |          0  (omitted)
                     |
               _cons |   .0032111   .0016038     2.00   0.045     .0000677    .0063544
      ---------------+----------------------------------------------------------------
             sigma_u |  .06859658
             sigma_e |  .00955687
                 rho |  .98095954   (fraction of variance due to u_i)
      --------------------------------------------------------------------------------
      Instrumented:   L.gini_std_WIID
      Instruments:    L.gini_std_WIID total_GE educ_GE health_GE defence_GE
                      social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP TaxIn Trade
                      CPI _IYear_1997 _IYear_1998 _IYear_1999 _IYear_2000 _IYear_2001
                      _IYear_2002 _IYear_2003 _IYear_2004 _IYear_2005 _IYear_2006
                      _IYear_2007 _IYear_2008 _IYear_2009 _IYear_2010 _IYear_2011
                      _IYear_2012 _IYear_2013 _IYear_2014 _IYear_2015 _IYear_2016
                      _IYear_2017 _IYear_2018 L2.gini_std_WIID
      --------------------------------------------------------------------------------
      
      . 
      end of do-file
      Here is an excerpt from my data (I drop year dummies as the excerpt exceeded the linesize limit)
      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str125 Country double Year float gini_std_WIID double(total_GE educ_GE health_GE defence_GE social_prot_GE) float(logGDPpc hc) double(Unempl TaxP TaxIn Trade CPI) float logGDPpc2biis byte(_IYear_1996 _IYear_1997 _IYear_1998 _IYear_1999 _IYear_2000)
      "Austria"  1995 .3146 55.8 5.5 6.7  .9 21.9 10.427935  3.040141 4.34999990463257 11.2 11.4   68.25660110272   2.24336631500904 108.74182 0 0 0 0 0
      "Austria"  1996     . 55.6 5.5 6.7  .9 21.8 10.449808 3.0553656 5.28000020980834 11.6 12.4 70.0836711206827   1.86097115760431 109.19849 1 0 0 0 0
      "Austria"  1997     . 52.3 5.4   7  .9 21.2 10.469395  3.070666 5.15000009536743 11.9   13 74.8676902155828   1.30597857227694 109.60822 0 1 0 0 0
      "Austria"  1998 .3027 52.2 5.3 7.1  .9 20.9 10.503485 3.0860434 5.51999998092651 11.8 13.1 76.9271493915785    .92246719668082  110.3232 0 0 1 0 0
      "Austria"  1999     . 52.1 5.4 7.3  .9 21.1 10.536485  3.101498 4.69999980926514 11.9 12.7 78.2601403439716   .568993765885587  111.0175 0 0 0 1 0
      "Austria"  2000     .   51 5.2 7.1  .9 20.8  10.56728  3.117029 4.69000005722046 11.5 12.5 85.3604956179232   2.34486285357277 111.66742 0 0 0 0 1
      "Austria"  2001 .2896 51.4 5.2   7  .8 20.6 10.576044  3.133231 4.01000022888184 11.5 14.1 87.5366647639352   2.65000077279529  111.8527 0 0 0 0 0
      "Austria"  2002     . 51.1 5.2 7.3  .8 20.9 10.587505  3.149517 4.84999990463257 11.6   13 86.9481679996606   1.81035787764132 112.09527 0 0 0 0 0
      "Austria"  2003     . 51.3 5.3 7.4  .8   21 10.592005  3.165887 4.78000020980834 11.4 12.8 86.3873824162825   1.35555370896445 112.19057 0 0 0 0 0
      "Austria"  2004  .296 53.7 4.9 7.5  .8 20.6 10.612784  3.182343 5.82999992370605 11.4 12.6 90.7923456929297   2.06120618032866  112.6312 0 0 0 0 0
      "Austria"  2005 .2991 51.2 4.8 7.4  .8 20.2 10.628164  3.198884 5.63000011444092 11.2 12.1 94.0338056833054   2.29913785639285 112.95788 0 0 0 0 0
      "Austria"  2006 .2876 50.4 4.8 7.3  .7 19.9 10.657173  3.215511 5.23999977111816 10.8   12 98.0883112053436   1.44154851119019 113.57534 0 0 0 0 0
      "Austria"  2007 .2968 49.2 4.7 7.4  .8 19.4 10.690528  3.232225  4.8600001335144 10.8 12.5 100.733254061926   2.16855528800755 114.28738 0 0 0 0 0
      "Austria"  2008  .306 49.9 4.8 7.5  .9 19.6 10.701897  3.249025 4.13000011444092 10.8 13.1 102.073682731706   3.21595033239883  114.5306 0 0 0 0 0
      "Austria"  2009 .3041 54.1 5.1 7.8  .7 21.2 10.660904  3.265913 5.30000019073486   11 11.8 87.0622309742796   .506308827696486 113.65487 0 0 0 0 0
      "Austria"  2010 .3145 52.8 5.1 7.9  .6 21.4 10.676704  3.282888 4.82000017166138   11 11.9 99.0197962369563   1.81353438995065 113.99202 0 0 0 0 0
      "Austria"  2011 .3038 50.9   5 7.7  .6 20.7 10.702143  3.293652 4.55999994277954 10.9   12 105.102788629725   3.28657914875376 114.53586 0 0 0 0 0
      "Austria"  2012 .3097 51.2   5 7.7  .6 20.9 10.704365  3.304452 4.86999988555908 11.1 12.3 105.152177427838   2.48567562177017 114.58343 0 0 0 0 0
      "Austria"  2013 .3063 51.6   5 7.8  .6 21.3 10.698726  3.315287 5.32999992370605   11 12.7 104.066414086373   2.00015616900603 114.46273 0 0 0 0 0
      "Austria"  2014  .311 52.4 4.9 7.9  .6 21.5   10.6975  3.326157 5.61999988555908 10.9 12.9 103.503535251069   1.60581182954471 114.43653 0 0 0 0 0
      "Austria"  2015 .3069 51.1 4.9 8.2  .6 21.2 10.696385  3.337063 5.71999979019165 10.9 13.4  102.42731538918   .896563335260302 114.41266 0 0 0 0 0
      "Austria"  2016 .3078 50.1 4.9 8.2  .6   21  10.70527  3.348005 6.01000022888184 10.9   12 100.982078278741   .891591752655335 114.60282 0 0 0 0 0
      "Austria"  2017 .3102 49.3 4.8 8.2  .6 20.6 10.720658  3.358983              5.5 10.9 12.2 104.938844932748   2.08126911385587 114.93252 0 0 0 0 0
      "Austria"  2018 .3001 48.8 4.8 8.2  .6 20.2 10.740497  3.369997 4.84999990463257 10.7 12.7  107.88167678734   1.99837981429546 115.35827 0 0 0 0 0
      "Austria"  2019 .3101 48.6 4.8 8.3  .6 20.2 10.750852  3.381046 4.48999977111816 10.7 12.9  107.47822730482   1.53089564152645  115.5808 0 0 0 0 0
      "Austria"  2020  .304 56.7 5.1 9.1  .6 22.8  10.67698         .  5.3600001335144 10.4 12.1 99.9989428466519   1.38191063351859  113.9979 0 0 0 0 0
      "Belgium"  1995     . 52.6 5.8   6 1.5 17.7 10.352328 2.8896086 9.34000015258789 10.4 15.6 116.378567821327   1.46796699090272  107.1707 0 0 0 0 0
      "Belgium"  1996 .2841 53.1 5.9 6.4 1.4 17.9 10.363502   2.90622 9.47999954223633 10.9 15.5 119.212775757383   2.07702107350668 107.40216 1 0 0 0 0
      "Belgium"  1997 .2689 51.6 5.8   6 1.4 17.7 10.398316  2.922927 8.96000003814697 10.9   16  125.68894005618   1.62816049512961 108.12498 0 1 0 0 0
      "Belgium"  1998     .   51 5.9 6.1 1.3 17.3  10.41561  2.939731 9.31999969482422   11 16.5 124.709122626318   .949250288350641 108.48492 0 0 1 0 0
      "Belgium"  1999     . 50.5 5.8 6.3 1.3 16.9 10.448132   2.95663 8.64999961853027 11.3   16 125.169990540949   1.12084823417844 109.16345 0 0 0 1 0
      "Belgium"  2000     . 49.4 5.5 6.3 1.2 16.4   10.4822  2.973627 6.59000015258789 11.2 16.2 142.230135067034   2.54451776190906  109.8765 0 0 0 0 1
      "Belgium"  2001 .3315 49.4 5.7 6.3 1.2 16.7 10.489697  2.992419 6.17999982833862 10.8 16.4 139.576839834619   2.46925823086078 110.03373 0 0 0 0 0
      "Belgium"  2002     . 49.9 5.8 6.3 1.2 17.1 10.502138 3.0113294 6.90999984741211 10.9 16.2 136.085149488081   1.64521436175359  110.2949 0 0 0 0 0
      "Belgium"  2003     .   51 5.9 6.9 1.1 17.4 10.508278 3.0303595 7.67999982833862 10.9 15.7 132.715552833888   1.58896399970379  110.4239 0 0 0 0 0
      "Belgium"  2004 .2834 49.3 5.6 6.9 1.1 17.3  10.53904   3.04951  7.3600001335144 11.1 15.7 136.918405348432   2.09728311239314 111.07136 0 0 0 0 0
      "Belgium"  2005  .309 51.9 5.7 6.8 1.1 17.1  10.55649  3.068781  8.4399995803833 11.2 15.8 144.529050669983   2.78143263670025  111.4395 0 0 0 0 0
      "Belgium"  2006 .2938 48.8 5.6 6.7   1 17.1   10.5751  3.073569             8.25 11.2 15.6 149.567509299511   1.79120770070454 111.83272 0 0 0 0 0
      "Belgium"  2007  .291 48.6 5.5 6.8   1 16.8 10.603865  3.078365 7.46000003814697 11.2 15.4 152.468446875303    1.8230563002681 112.44195 0 0 0 0 0
      "Belgium"  2008 .2953 50.8 5.7 7.3 1.1 17.5 10.600424  3.083168 6.98000001907349 11.1 15.7 161.088447790447   4.48944420508401 112.36899 0 0 0 0 0
      "Belgium"  2009 .2844 54.7 6.1 7.8   1 19.2 10.571963 3.0879786 7.90999984741211   11 14.6 135.406040531897 -.0531456741253762  111.7664 0 0 0 0 0
      "Belgium"  2010 .2843 53.9   6 7.8   1 18.9 10.591067  3.092797 8.28999996185303 11.2 14.8 149.997673074386   2.18929920422458  112.1707 0 0 0 0 0
      "Belgium"  2011 .2849 55.3 6.2 7.7  .9 19.1  10.59486 3.0989954  7.1399998664856 11.3 15.4 161.493723664633   3.53208210722744 112.25106 0 0 0 0 0
      "Belgium"  2012 .2833 56.5 6.3 7.9  .9 19.6 10.596024 3.1052065 7.53999996185303 11.3 15.7 160.746030229324   2.83966343445897 112.27572 0 0 0 0 0
      "Belgium"  2013 .2793 56.1 6.4   8  .9 20.1 10.595892   3.11143 8.43000030517578 11.4 16.2 157.850845041743   1.11309594027537 112.27293 0 0 0 0 0
      "Belgium"  2014 .2787 55.6 6.3   8  .9 19.8 10.607115  3.117666 8.52000045776367 11.2 16.2 158.783215919076   .340002833356965 112.51089 0 0 0 0 0
      "Belgium"  2015 .2793 53.7 6.3 7.8  .8 19.4  10.62153 3.1239145 8.47999954223633 11.1 15.9 154.192546509323   .561429152790106 112.81689 0 0 0 0 0
      "Belgium"  2016 .2783 53.1 6.2 7.6  .8 19.4 10.629054 3.1301756 7.82999992370605 11.3 15.5  157.66502598438   1.97385264653172  112.9768 0 0 0 0 0
      "Belgium"  2017 .2772   52 6.2 7.6  .8 19.3 10.641268  3.136449 7.09000015258789 11.4 16.2  165.32583634966   2.12597086002609 113.23658 0 0 0 0 0
      "Belgium"  2018 .2731 52.2 6.2 7.6  .8 19.3 10.654987  3.142735 5.94999980926514 11.4 16.3  166.29065466732   2.05316499865181 113.52876 0 0 0 0 0
      "Belgium"  2019 .2714 51.8 6.1 7.5  .8 19.3 10.670478  3.149034  5.3600001335144 11.3 15.2 163.693083101354   1.43681956996435  113.8591 0 0 0 0 0
      "Belgium"  2020 .2715 59.2 6.6 8.8  .9 22.7 10.607195         . 5.55000019073486   11 15.3 158.677450537132   .740791812220385 112.51258 0 0 0 0 0
      "Bulgaria" 1995  .394 31.7 3.6 1.9 1.3  8.5  8.299465  2.822604 11.1000003814697  8.3    5 55.2626916823838   62.0548336837993  68.88112 0 0 0 0 0
      "Bulgaria" 1996  .367 36.8 3.3 1.8 1.1  8.9  8.355368  2.838277             12.5  8.9  5.7 85.8206737376906    121.60754244925  69.81217 1 0 0 0 0
      "Bulgaria" 1997  .376 31.8 3.3 2.1 1.9  8.6   8.20929  2.854038 13.6999998092651  9.5 12.1 86.4637364673225   1058.37355921973  67.39243 0 1 0 0 0
      "Bulgaria" 1998  .355 33.9 3.3 2.5 2.9  9.6  8.253154  2.869886 12.1999998092651 12.3  9.9 77.0452088576146   18.6722044420641  68.11455 0 0 1 0 0
      "Bulgaria" 1999  .336 41.4 4.1   5 2.9   12  8.171064 2.8858216 14.1000003814697 12.4 10.2 90.0749760451372   2.57304281890204   66.7663 0 0 0 1 0
      "Bulgaria" 2000  .342   43 4.2 3.8 3.2 12.7  8.220855  2.901846 16.2199993133545 13.1  9.7 77.7457069237525   10.3162621289989  67.58245 0 0 0 0 1
      "Bulgaria" 2001  .343 40.6 3.6   4 2.6 12.6  8.278285 2.9194586 19.9200000762939 12.6  9.7 79.0813687477668   7.36093927231849  68.53001 0 0 0 0 0
      "Bulgaria" 2002   .38 39.1 3.7 4.8 2.6 12.7  8.357052  2.937178 18.1100006103516 11.7  8.7 75.2696110143524   5.81014365721823  69.84032 0 0 0 0 0
      "Bulgaria" 2003  .361 38.6 4.2 5.5 2.5 12.2  8.416019  2.955005 13.7299995422363 13.5  6.2 79.0138810581269   2.34864169582755 70.829384 0 0 0 0 0
      "Bulgaria" 2004  .368 37.8   4 5.8 1.7   11   8.48664   2.97294  12.039999961853   15  5.5 93.0638911878994    6.1471307424627 72.023056 0 0 0 0 0
      "Bulgaria" 2005  .348 36.7 4.1 4.9   2 10.6  8.562355  2.990984 10.0799999237061 15.5    5 99.7142133335392   5.03883807111907  73.31393 0 0 0 0 0
      "Bulgaria" 2006   .32 33.7 3.6 3.8 1.6 10.8  8.635761 3.0091374 8.94999980926514 16.1  5.4  111.04746275381   7.26159462769947  74.57637 0 0 0 0 0
      "Bulgaria" 2007  .361 37.7 3.6   4 1.4 10.1  8.706947  3.027401 6.88000011444092 15.5  6.1 123.609646159658   8.40253419005894  75.81093 0 0 0 0 0
      "Bulgaria" 2008 .3615 37.1   4 4.4 1.2 10.7  8.773329 3.0457754  5.6100001335144 16.2  5.6 124.785885742919   12.3487195994021   76.9713 0 0 0 0 0
      "Bulgaria" 2009 .3361 39.3 4.1   4 1.2 12.9  8.746506  3.064261 6.82000017166138 13.6  4.9 92.6926468702512   2.75320223914816  76.50137 0 0 0 0 0
      "Bulgaria" 2010 .3384 36.1 3.6 4.4 1.7 12.9  8.768389 3.0828595 10.2799997329712 13.2  4.5 103.411584202859   2.43899060504117  76.88464 0 0 0 0 0
      "Bulgaria" 2011 .3565 33.7 3.4 4.1 1.2 12.2  8.795596 3.0941544 11.2600002288818 13.3  4.5 117.456289316293   4.21990346601875  77.36251 0 0 0 0 0
      "Bulgaria" 2012 .3432 34.3 3.3 4.4   1 12.3  8.808909  3.105491 12.2700004577637 13.6  4.5 123.993561447479   2.95456829831017  77.59689 0 0 0 0 0
      "Bulgaria" 2013 .3601 37.8 3.7 4.5 1.2 13.5  8.808885  3.116868 12.9399995803833 14.4  4.9 129.732659126464   .890093540913032  77.59645 0 0 0 0 0
      "Bulgaria" 2014 .3657 43.2 4.1 5.5 1.3 13.3  8.824191  3.128288 11.4200000762939 13.9  5.1  130.28729035681  -1.41818380264842  77.86635 0 0 0 0 0
      "Bulgaria" 2015 .3742 40.4 3.9 5.3 1.3   13  8.864278  3.139749 9.14000034332275 14.3  5.3 126.700942430032  -.104633261008417  78.57542 0 0 0 0 0
      "Bulgaria" 2016 .3857 34.8 3.4   5 1.1 12.3  8.901237  3.151252 7.57000017166138 14.3  5.4 122.833824180651  -.798649886453611  79.23201 0 0 0 0 0
      "Bulgaria" 2017 .4059 34.8 3.5 4.8 1.1 12.3  8.935788 3.1627975 6.15999984741211 14.3  5.7 129.676597014807   2.06159619443137  79.84831 0 0 0 0 0
      "Bulgaria" 2018 .4038 36.9 3.5   5 1.2   12  8.969501  3.174385 5.21000003814697 13.7  5.6 128.851881427473   2.81454473824833  80.45194 0 0 0 0 0
      "Bulgaria" 2019 .4128 35.5 3.8 4.6 1.2 11.4  9.016122  3.186015 4.23000001907349 13.9  5.6 124.640430112714   3.10372944796774  81.29045 0 0 0 0 0
      "Bulgaria" 2020 .4027 41.8   4 5.9 1.5 13.1  8.977262         . 5.11999988555908 13.7  5.7 109.177527503356   1.67244096855762  80.59122 0 0 0 0 0
      "Croatia"  1995     .   52 6.3 7.8 2.6 13.1  8.890627  2.798074 10.1719999313354 18.7    6 62.5852274429772   3.95010395010403  79.04324 0 0 0 0 0
      "Croatia"  1996     . 50.1 5.9 7.2 2.3 13.2  8.962381   2.82012 9.68000030517578   18  6.7 66.8678996018582   4.29999999999994  80.32428 1 0 0 0 0
      "Croatia"  1997     . 48.8 5.7 6.9 2.3 12.7  9.026773 2.8423395 9.71000003814697 17.6  6.2 74.7026819643543   4.17066155321187  81.48264 0 1 0 0 0
      "Croatia"  1998 .2875 50.8 6.2 7.2 2.2 14.4  9.049207  2.864734 11.3900003433228 19.1    7 64.8438011665547   6.39668660837554  81.88815 0 0 1 0 0
      "Croatia"  1999 .2771 52.7 6.4 7.4 2.3 14.9 9.0447235  2.887305 13.5600004196166 18.5  6.5 66.1460509798243   4.01913875598084  81.80702 0 0 0 1 0
      "Croatia"  2000 .3133 49.3 5.7 6.7   2 13.4  9.083132  2.910054 16.0599994659424   19  5.5 74.4420793864565     4.611315547378  82.50328 0 0 0 0 1
      "Croatia"  2001  .311 49.4 5.5 6.2 1.8 14.8  9.151483  2.937702 15.8199996948242 18.5  5.1  79.359168123064    3.7767024666589  83.74963 0 0 0 0 0
      "Croatia"  2002     . 50.3   6 6.2 1.6 17.3  9.206537  2.965613 15.0500001907349 18.5  5.6 81.1502928556016   1.67178437393382  84.76033 0 0 0 0 0
      "Croatia"  2003   .29 49.6 5.7 6.1 1.4 14.8  9.260039  2.993789 13.9200000762939   18  5.5 81.5398527356933   1.76733780760626  85.74833 0 0 0 0 0
      "Croatia"  2004 .2968 48.6 5.4 6.4 1.6 14.8  9.300416  3.022233 13.6599998474121 17.4  5.5 81.6872646189575   2.05539679050332  86.49773 0 0 0 0 0
      "Croatia"  2005     . 46.5 5.1 6.2 1.4 13.7  9.341349  3.050947 12.6000003814697 17.2  5.7 81.5354185269313   3.31717824448043   87.2608 0 0 0 0 0
      "Croatia"  2006     . 46.2 4.8 5.9 1.3 14.1  9.389317   3.08583 11.1300001144409 17.2  6.3 83.6689839770411    3.1898259147295  88.15926 0 0 0 0 0
      "Croatia"  2007     . 45.8 4.6 5.9 1.4 13.5  9.437494 3.1211126  9.9099998474121 16.8  6.8 83.5519966629432   2.89928275583392   89.0663 0 0 0 0 0
      "Croatia"  2008 .3371 45.9 4.3 5.6 1.6 13.5   9.45639 3.1567984 8.52999973297119 16.8  6.6 82.4615750510762   6.07696838798351  89.42332 0 0 0 0 0
      "Croatia"  2009     . 48.9 4.5 6.2 1.5   15  9.381836  3.192892 9.19999980926514 15.8  6.6  70.397013461437   2.37852845904674  88.01884 0 0 0 0 0
      "Croatia"  2010 .3256 48.5 4.6 6.2 1.5   15  9.371519 3.2293985 11.6199998855591 16.3  5.9 73.2802726706786   1.03055505333573  87.82537 0 0 0 0 0
      "Croatia"  2011  .324 48.9 4.6 6.2 1.5 15.3  9.374119  3.268047 13.6800003051758 15.9  5.7  78.435249159432   2.27272727272727   87.8741 0 0 0 0 0
      "Croatia"  2012 .3231 48.4 4.7 6.4 1.5   15  9.354156  3.307762 15.9300003051758 16.8  5.6 79.7098027960427   3.41207349081366  87.50023 0 0 0 0 0
      "Croatia"  2013  .325 48.3 4.8 6.3 1.3 14.9  9.353302  3.348579            17.25 17.2  5.9 81.7127947242977    2.2165820642978  87.48426 0 0 0 0 0
      "Croatia"  2014 .3202 48.7 4.9 6.4 1.2 15.3   9.35391 3.3905365 17.2900009155273 17.1  5.6 85.9378921963142  -.215196159576215  87.49564 0 0 0 0 0
      "Croatia"  2015 .3212 48.2 4.9 6.6 1.3 15.4 9.3870945  3.433675 16.1800003051758 17.5  5.4 91.3613632661389  -.464499004645002  88.11755 0 0 0 0 0
      "Croatia"  2016 .3115 46.9 4.7 6.4 1.1 14.3  9.428793 3.4780364 13.1000003814697 17.7  5.8 92.8680532083771  -1.12500000000001  88.90214 0 0 0 0 0
      end

      Comment


      • #4
        With missing data, all but one of the omitted years are not observed for your sample. The 2019 coefficient is the reference category - you can only include \(T-1\) indicators, otherwise they would be collinear with the intercept. But all that said, there is nothing wrong with the omissions, you can be confident that you have partialled out the the year effects.

        Code:
        capture encode Country, gen(country)
        xtset country Year
        xi: xtivreg gini_std_WIID l.gini_std_WIID total_GE educ_GE health_GE ///
        defence_GE social_prot_GE logGDPpc logGDPpc2biis hc Unempl TaxP ///
        TaxIn Trade CPI i.Year (l.gini_std_WIID=l2.gini_std_WIID), fd
        tab Year if e(sample)
        Res.:

        Code:
        . tab Year if e(sample)
        
               Year |      Freq.     Percent        Cum.
        ------------+-----------------------------------
               1998 |          1        1.89        1.89
               1999 |          1        1.89        3.77
               2000 |          1        1.89        5.66
               2001 |          2        3.77        9.43
               2002 |          1        1.89       11.32
               2003 |          1        1.89       13.21
               2004 |          1        1.89       15.09
               2005 |          1        1.89       16.98
               2006 |          1        1.89       18.87
               2007 |          3        5.66       24.53
               2008 |          3        5.66       30.19
               2009 |          3        5.66       35.85
               2010 |          3        5.66       41.51
               2011 |          3        5.66       47.17
               2012 |          3        5.66       52.83
               2013 |          4        7.55       60.38
               2014 |          4        7.55       67.92
               2015 |          4        7.55       75.47
               2016 |          4        7.55       83.02
               2017 |          3        5.66       88.68
               2018 |          3        5.66       94.34
               2019 |          3        5.66      100.00
        ------------+-----------------------------------
              Total |         53      100.00

        Comment


        • #5
          thank you, Andrew.

          Comment

          Working...
          X