I have a dataset for 37 countries and 19 time periods. The hausman specification test suggested I should use the fixed effects model. I further run a test for the significance of time fixed effect following Chris Baum (2006, p.225). That test also suggested the time effects are jointly significant and so should be included in the model. The procedure used for that test is below:
quietly tabulate annee, generate(an)
local j 0
forvalues i=96/13 {
local ++j
rename an'j' an'i'
quietly replace an'i'=an'i'-an19
}
drop an19
quietly xtreg lmortinf gdp_grwrate lndepsantehbt acces_eaupot vih vacc_roug dpt fert govmoy an*, fe.
test an1 an2 an3 an4 an5 an6 an7 an8 an9 an10 an11 an12 an13 an14 an15 an16 an17 an18
***Note that annee is my time variable.
I also run tests for serial autocorrelation and heteroskedasticity. And the results also proved the existence of serial autocorrelation and heteroskedasticity.
So in other to take into account the above mentioned problems and the econometric developments since Baum (2006), I would like to know whether there is another way to test for the significance of time time fixed effects and to include them in a model. And due to the structure of my data are there better stata commands than xtreg x1 x2 x3.....xn, fe. Some suggest xtgls, areg, xtpcse, reghdfe. Which command would be best for an N=37, T=19 dataset with serial autocorrelation and heteroskedasticity.
I would also like to include a dummy say dum and set dum=0 if gdp_grwrate<0 and dum=1 if gdp_grwrate>0. How do I interpret the coefficient of dum?
Below is a sample of my data.
Thanks in advance, looking forward to your helpful suggestions.
Bernie Konle
quietly tabulate annee, generate(an)
local j 0
forvalues i=96/13 {
local ++j
rename an'j' an'i'
quietly replace an'i'=an'i'-an19
}
drop an19
quietly xtreg lmortinf gdp_grwrate lndepsantehbt acces_eaupot vih vacc_roug dpt fert govmoy an*, fe.
test an1 an2 an3 an4 an5 an6 an7 an8 an9 an10 an11 an12 an13 an14 an15 an16 an17 an18
***Note that annee is my time variable.
I also run tests for serial autocorrelation and heteroskedasticity. And the results also proved the existence of serial autocorrelation and heteroskedasticity.
So in other to take into account the above mentioned problems and the econometric developments since Baum (2006), I would like to know whether there is another way to test for the significance of time time fixed effects and to include them in a model. And due to the structure of my data are there better stata commands than xtreg x1 x2 x3.....xn, fe. Some suggest xtgls, areg, xtpcse, reghdfe. Which command would be best for an N=37, T=19 dataset with serial autocorrelation and heteroskedasticity.
I would also like to include a dummy say dum and set dum=0 if gdp_grwrate<0 and dum=1 if gdp_grwrate>0. How do I interpret the coefficient of dum?
Below is a sample of my data.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int annee str24 pays float(mort_inf mort_adlt gdp_grwrate pib_hbt depsante_hbt acces_eaupot urbanpop vih) byte(vacc_roug dpt) float(fert govmoy) 1996 "Angola" 224 428.1965 8.034612 3506.245 60.22758 45.9 29.57 1.1 62 28 7.051 -1.4708937 1997 "Angola" 222.6 425.836 4.952266 3679.8835 79.0387 45.8 30.268 1.2 78 41 7.017 -1.5583974 1998 "Angola" 220.8 419.904 3.900152 3823.4045 79.53523 45.7 30.975 1.3 61 46 6.981 -1.645901 1999 "Angola" 218.9 413.9725 .3107823 3835.287 82.08157 45.7 31.692 1.4 42 19 6.943 -1.6558653 2000 "Angola" 216.7 408.041 -.11177737 3831 69.20174 45.7 32.419 1.5 36 28 6.905 -1.6658294 2001 "Angola" 214.1 402.1095 .8447512 3863.3625 137.88118 45.7 33.152 1.6 65 38 6.866 -1.52737 2002 "Angola" 211.7 396.1775 -10.099722 3473.1736 103.88967 45.7 33.895 1.7 66 41 6.829 -1.3889103 2003 "Angola" 209.2 392.003 1.579595 3528.036 130.48369 45.8 34.645 1.8 52 40 6.792 -1.2494333 2004 "Angola" 206.7 387.8275 7.006726 3775.235 153.30067 45.9 35.405 1.8 52 40 6.755 -1.2643487 2005 "Angola" 203.9 383.6525 14.18509 4310.756 157.52116 46 36.169 1.9 32 38 6.716 -1.225804 2006 "Angola" 200.5 379.4775 16.642405 5028.169 209.61484 46.2 36.942 2 33 34 6.671 -1.1200725 2007 "Angola" 196.4 375.3025 18.487598 5957.757 189.90187 46.4 37.722 2 71 73 6.619 -1.1341099 2008 "Angola" 192 370.799 10.040818 6555.965 242.15427 46.6 38.509 2.1 61 69 6.559 -1.0476762 2009 "Angola" 187.3 366.295 -.9701917 6492.359 274.7345 46.9 39.299 2.1 57 60 6.492 -1.0257341 2010 "Angola" 182.5 361.7915 -.0028121 6492.177 215.70576 47.1 40.097 2.1 72 77 6.416 -1.0095861 2011 "Angola" 177.3 357.288 .4975891 6524.481 220.5003 47.5 40.9 2.2 64 71 6.335 -1.0491998 2012 "Angola" 172.2 352.7845 1.7098312 6636.039 223.2445 47.8 41.699 2.2 72 75 6.251 -.9950328 2013 "Angola" 167.1 348.914 3.339851 6857.672 301.98914 48.2 42.49 2.2 66 77 6.165 -1.0591317 2014 "Angola" 162.2 345.043 1.4332478 6955.96 239.01024 48.6 43.274 2.2 60 64 6.08 -1.0283822 1996 "Benin" 156.2 282.9655 1.103843 1511.2933 48.13155 62.6 37.071 1.1 60 66 6.284 -.10855488 1997 "Benin" 153.6 287.6425 2.659984 1551.4934 47.24747 63.4 37.385 1.2 66 66 6.205 -.06888309 1998 "Benin" 150.9 287.0615 1.0200866 1567.32 49.07447 64.3 37.699 1.3 67 70 6.128 -.029211296 1999 "Benin" 147.9 286.4805 2.3096182 1603.519 53.3141 65.1 38.015 1.4 69 74 6.051 -.02736326 2000 "Benin" 144.7 285.899 2.67819 1646.4645 52.45966 66 38.333 1.5 70 78 5.975 -.02551522 2001 "Benin" 141.1 285.318 2.0193248 1679.712 59.6444 66.9 38.65 1.5 68 76 5.898 -.11470078 2002 "Benin" 137.1 284.7375 1.2597008 1700.8712 55.80888 67.7 38.969 1.5 66 75 5.818 -.20388633 2003 "Benin" 133.1 280.0665 .05779146 1701.8542 61.96275 68.6 39.297 1.5 65 73 5.733 -.17008637 2004 "Benin" 129.2 275.3955 1.0406204 1719.564 62.57838 69.4 39.635 1.4 63 72 5.645 -.26072276 2005 "Benin" 125.5 270.725 -1.5149806 1693.513 66.76049 70.3 39.982 1.4 61 70 5.553 -.38180465 2006 "Benin" 122.1 266.0545 .7295833 1705.8685 69.42651 71.1 40.338 1.3 66 74 5.459 -.2226624 2007 "Benin" 119 261.384 2.7741675 1753.1923 69.19661 72 40.703 1.3 70 82 5.365 -.21898597 2008 "Benin" 116.3 259.34 1.785374 1784.4933 66.35791 72.8 41.078 1.2 66 75 5.272 -.23293996 2009 "Benin" 113.9 257.297 -.6421459 1773.034 70.92419 73.7 41.461 1.2 71 79 5.182 -.25481337 2010 "Benin" 111.6 255.2535 -.7697142 1759.387 79.34248 74.5 41.854 1.2 68 76 5.094 -.3046026 2011 "Benin" 109.3 253.2105 .12432854 1761.5743 88.2289 75.3 42.256 1.2 70 75 5.009 -.29603568 2012 "Benin" 107 251.167 1.9902444 1796.634 83.32962 76.2 42.667 1.1 75 81 4.927 -.3377893 2013 "Benin" 104.8 248.8745 4.363894 1875.037 82.24059 77 43.086 1.1 68 74 4.846 -.3250874 2014 "Benin" 102.1 246.582 3.5853064 1942.263 85.60836 77.8 43.514 1.1 68 75 4.766 -.3429743 1996 "Botswana" 73.5 493.8565 3.496567 9172.998 284.54446 93.9 49.83 22.2 89 96 3.866 .683143 1997 "Botswana" 76.5 540.7635 5.793682 9704.452 333.0036 94.1 50.677 24 89 96 3.746 .6822631 1998 "Botswana" 79 556.4125 -1.214586 9586.583 326.74155 94.3 51.525 25.1 89 98 3.631 .6813832 1999 "Botswana" 82 572.061 7.724918 10327.14 329.3767 94.5 52.372 25.8 90 97 3.519 .6696991 2000 "Botswana" 82.9 587.7095 .3308896 10361.31 381.3802 94.7 53.219 26 91 97 3.413 .6580151 2001 "Botswana" 81.6 603.3585 -1.2255436 10234.328 475.3578 94.9 54.062 26 91 97 3.312 .6552119 2002 "Botswana" 79.8 619.007 4.6363497 10708.827 570.63477 95 54.374 25.7 92 97 3.219 .6524087 2003 "Botswana" 78.1 566.552 3.252449 11057.126 431.4554 95.1 54.607 25.3 92 96 3.134 .8671644 2004 "Botswana" 75.8 514.097 1.289676 11199.728 537.03876 95.2 54.841 24.9 93 96 3.06 .7386777 2005 "Botswana" 69 461.642 2.971863 11532.568 577.4712 95.3 55.073 24.6 93 96 2.998 .7832966 2006 "Botswana" 63.4 409.187 6.553606 12288.367 555.9358 95.4 55.306 24.3 94 96 2.952 .6658836 2007 "Botswana" 62.6 356.732 6.327096 13065.863 580.1953 95.5 55.539 24.1 95 96 2.921 .6829954 2008 "Botswana" 61.7 345.9235 4.224315 13617.807 737.2376 95.7 55.772 23.9 95 96 2.903 .6985549 2009 "Botswana" 57.3 335.1155 -9.462539 12329.217 750.4744 95.8 56.004 23.6 96 96 2.895 .6494777 2010 "Botswana" 53.5 324.3075 6.410258 13119.55 779.7747 95.9 56.235 23.5 96 95 2.893 .6657927 2011 "Botswana" 51.8 313.4995 3.9232454 13634.264 697.8672 96 56.467 23.3 97 95 2.89 .6775687 2012 "Botswana" 49.5 302.691 2.3445365 13953.924 878.7249 96.1 56.699 23.1 97 95 2.881 .7124613 2013 "Botswana" 46.6 303.292 7.65484 15022.074 893.1657 96.2 56.938 22.8 97 95 2.864 .6761068 2014 "Botswana" 44.8 303.893 1.1860176 15200.238 870.837 96.2 57.187 22.5 97 95 2.836 .6325759 1996 "Burkina Faso" 197 336.544 7.98666 964.5812 35.773926 52.5 15.407 3.4 40 37 6.801 -.5374672 1997 "Burkina Faso" 194 337.854 3.396481 997.3431 37.5725 54.3 15.875 3.2 41 39 6.754 -.51940936 1998 "Burkina Faso" 191.3 334.8245 4.340499 1040.6327 40.64801 56.2 16.51 2.9 24 15 6.704 -.50135154 1999 "Burkina Faso" 188.5 331.7945 4.345997 1085.8586 42.68723 58 17.166 2.7 36 15 6.65 -.4114849 2000 "Burkina Faso" 185.7 328.765 -.9635816 1075.3955 41.95066 59.9 17.844 2.4 48 45 6.592 -.3216183 2001 "Burkina Faso" 182.4 325.735 3.615984 1114.2816 42.9474 61.8 18.54 2.2 63 62 6.531 -.3619675 2002 "Burkina Faso" 178.3 322.7055 1.4048307 1129.9353 47.61087 63.6 19.258 1.9 64 69 6.468 -.4023167 2003 "Burkina Faso" 173.1 317.0825 4.729717 1183.378 54.18895 65.4 19.996 1.7 76 79 6.403 -.30998605 2004 "Burkina Faso" 166.3 311.459 1.4595864 1200.6505 64.98684 67.3 20.757 1.6 78 79 6.335 -.3568161 2005 "Burkina Faso" 158.3 305.8365 5.472989 1266.362 75.389694 69.1 21.537 1.4 84 82 6.265 -.35784775 2006 "Burkina Faso" 149.4 300.2135 3.086761 1305.4515 76.27145 71 22.339 1.3 88 86 6.192 -.3384232 2007 "Burkina Faso" 139.9 294.5905 .9742676 1318.17 81.26638 72.8 23.163 1.2 94 89 6.116 -.29700413 2008 "Burkina Faso" 130.4 290.0395 2.599113 1352.431 88.02504 74.6 23.993 1.1 94 93 6.036 -.25391927 2009 "Burkina Faso" 121.4 285.488 -.13966903 1350.542 96.9035 76.4 24.828 1.1 94 92 5.953 -.25779772 2010 "Burkina Faso" 113.5 280.936 5.212027 1420.9326 99.91912 78.2 25.665 1 92 91 5.867 -.28285697 2011 "Burkina Faso" 106.9 276.385 3.483812 1470.435 76.01353 80 26.505 1 89 91 5.78 -.3912467 2012 "Burkina Faso" 101.4 271.833 3.347399 1519.6565 82.40362 81.7 27.346 .9 87 90 5.693 -.4308761 2013 "Burkina Faso" 96.6 268.0425 2.653787 1559.985 96.72003 81.9 28.186 .9 82 88 5.607 -.5003924 2014 "Burkina Faso" 92.4 264.252 1.0456479 1576.297 82.30537 82.1 29.024 .9 88 91 5.521 -.5225256 1996 "Burundi" 167.7 357.9225 -9.371049 753.3027 30.871094 70.6 7.412 2.7 79 73 7.267 -1.7493588 1997 "Burundi" 164.4 353.237 -2.923235 731.2819 27.88372 70.9 7.618 2.9 77 74 7.217 -1.70157 1998 "Burundi" 160.5 353.831 3.2777715 755.2516 31.84791 71.2 7.83 3.1 68 65 7.165 -1.6537815 1999 "Burundi" 156.4 354.4245 -2.680635 735.006 30.70991 71.5 8.036 3.2 70 79 7.112 -1.5783404 2000 "Burundi" 152.2 355.0185 -2.957293 713.2698 28.14572 71.8 8.246 3.2 72 80 7.057 -1.5028993 2001 "Burundi" 147.8 355.612 -.5834269 709.1083 28.51732 72.1 8.461 3.1 73 81 7 -1.476642 2002 "Burundi" 143.2 356.206 1.3364574 718.5853 30.483673 72.4 8.682 2.9 75 81 6.939 -1.450385 2003 "Burundi" 138.3 353.0265 -4.4440665 686.6509 30.25594 72.7 8.908 2.7 76 82 6.873 -1.4694716 2004 "Burundi" 133 349.8475 1.2706385 695.3757 42.60213 73 9.139 2.5 78 83 6.803 -1.4845086 2005 "Burundi" 127.1 346.668 -2.566675 677.5277 59.34786 73.3 9.375 2.3 87 87 6.729 -1.1397492 2006 "Burundi" 120.9 343.489 1.744609 689.3479 72.70313 73.5 9.617 2.2 92 92 6.649 -1.0736809 2007 "Burundi" 114.5 340.3095 1.1368152 697.1845 65.868484 73.8 9.864 2 88 99 6.566 -1.1216149 2008 "Burundi" 108.6 333.527 1.389842 706.8743 53.37726 74.1 10.118 1.8 84 92 6.48 -1.123118 2009 "Burundi" 103.5 326.744 -.10958474 706.0997 48.57511 74.4 10.376 1.6 91 94 6.391 -1.0641489 2010 "Burundi" 98.8 319.9615 .23904864 707.7876 61.32776 74.7 10.641 1.5 92 96 6.302 -1.1726482 2011 "Burundi" 94.9 313.1785 .6898832 712.6705 61.53007 75 10.912 1.4 93 96 6.212 -1.1668588 2012 "Burundi" 91.2 306.396 .58354026 716.8292 60.80011 75.3 11.189 1.3 93 96 6.123 -1.2251824 2013 "Burundi" 87.8 301.627 1.1823219 725.3044 60.26276 75.5 11.472 1.2 98 96 6.035 -1.1031541 2014 "Burundi" 84.6 296.8585 1.265698 734.4846 58.01862 75.8 11.761 1.1 94 95 5.948 -.9663085 1996 "Cabo Verde" 53 173.7865 8.461328 2628.1355 94.66525 79.9 49.704 1.4 84 88 4.389 .51188874 1997 "Cabo Verde" 49 168.616 8.3264 2846.964 102.44161 80.5 50.637 1.5 83 87 4.216 .3729435 1998 "Cabo Verde" 44.3 164.5125 9.816393 3126.4336 125.90977 81.1 51.572 1.5 84 88 4.036 .3994993 1999 "Cabo Verde" 39.6 160.408 8.713267 3398.848 123.41257 81.8 52.505 1.6 85 89 3.852 .4424858 2000 "Cabo Verde" 35.5 156.304 11.898556 3803.262 144.97372 82.4 53.435 1.6 86 90 3.666 .48547235 end
Thanks in advance, looking forward to your helpful suggestions.
Bernie Konle
Comment