Hello, I am working in a panel data of 142 countries from 1996-2019. I want to check the standard error of my estimation .
in one approaches , I used :
and the results is :
but when I use the "xtscc" instead of "reghdfe" the results is different, I mean the point estimates is different.
and the results:
I have to mention to some points:
dum_recession is a dummy variable that takes zero or one in the time of recession.
for the second estimation first I generated the lag on "dum_recession" because: xtscc does not allow some factor variables so I should create specific variables instead of using directly the code I provided in the first approach.
I use Driscoll Kraay standard errors instead of clustering at the country level.
But I do not know why the results is different, which I was expected that the only thing that changes be the standard error.
Thank you so much for your valuable time and advice.
sorry for this long questions, I tried to report all things.
Regards.
in one approaches , I used :
Code:
reghdfe f0.ltotalfertility l(0/2)dum_recession l(1/2)ltotalfertility , absorb( i.ifscode i.year) vce(cluster ifscode)
Code:
HDFE Linear regression Number of obs = 3,124 Absorbing 2 HDFE groups F( 5, 141) = 7434.23 Statistics robust to heteroskedasticity Prob > F = 0.0000 R-squared = 0.9988 Adj R-squared = 0.9987 Within R-sq. = 0.9564 Number of clusters (ifscode) = 142 Root MSE = 0.0186 (Std. err. adjusted for 142 clusters in ifscode) --------------------------------------------------------------------------------- | Robust ltotalfertility | Coefficient std. err. t P>|t| [95% conf. interval] ----------------+---------------------------------------------------------------- dum_recession | --. | -.0012024 .0015606 -0.77 0.442 -.0042876 .0018828 L1. | -.0012549 .0011189 -1.12 0.264 -.003467 .0009572 L2. | .0008398 .001071 0.78 0.434 -.0012775 .0029571 | ltotalfertility | L1. | 1.285425 .0510561 25.18 0.000 1.184491 1.38636 L2. | -.3306986 .049356 -6.70 0.000 -.428272 -.2331253 | _cons | .0388123 .0051032 7.61 0.000 .0287236 .0489009 --------------------------------------------------------------------------------- Absorbed degrees of freedom: -----------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | -------------+---------------------------------------| ifscode | 142 142 0 *| year | 22 0 22 | -----------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
but when I use the "xtscc" instead of "reghdfe" the results is different, I mean the point estimates is different.
Code:
xi: xtscc f0.ltotalfertility l(0/2)ldum_recession l(1/2) ltotalfertility i.year, fe
Code:
Regression with Driscoll-Kraay standard errors Number of obs = 2982 Method: Fixed-effects regression Number of groups = 142 Group variable (i): ifscode F( 25, 20) = 3645.11 maximum lag: 2 Prob > F = 0.0000 within R-squared = 0.9648 --------------------------------------------------------------------------------- | Drisc/Kraay ltotalfertility | Coefficient std. err. t P>|t| [95% conf. interval] ----------------+---------------------------------------------------------------- ldum_recession | --. | -.0015698 .0013767 -1.14 0.268 -.0044415 .0013018 L1. | .0008508 .0013986 0.61 0.550 -.0020667 .0037682 L2. | -.0021429 .0018071 -1.19 0.250 -.0059124 .0016266 | ltotalfertility | L1. | 1.26128 .0551342 22.88 0.000 1.146272 1.376288 L2. | -.3098519 .0555952 -5.57 0.000 -.4258213 -.1938824 | _Iyear_1997 | 0 (omitted) _Iyear_1998 | 0 (omitted) _Iyear_1999 | -.0023856 .00127 -1.88 0.075 -.0050349 .0002636 _Iyear_2000 | .0007933 .0010436 0.76 0.456 -.0013836 .0029703 _Iyear_2001 | -.0112841 .0010299 -10.96 0.000 -.0134325 -.0091357 _Iyear_2002 | -.0009933 .0009966 -1.00 0.331 -.0030721 .0010855 _Iyear_2003 | -.0005318 .0008962 -0.59 0.560 -.0024012 .0013377 _Iyear_2004 | .0018574 .0007688 2.42 0.025 .0002537 .0034611 _Iyear_2005 | -.0028131 .0012799 -2.20 0.040 -.0054829 -.0001432 _Iyear_2006 | .0055198 .00117 4.72 0.000 .0030793 .0079604 _Iyear_2007 | .0031555 .0013279 2.38 0.028 .0003855 .0059255 _Iyear_2008 | .0048382 .0013462 3.59 0.002 .0020301 .0076464 _Iyear_2009 | -.0054194 .0013012 -4.16 0.000 -.0081337 -.0027051 _Iyear_2010 | 0 (omitted) _Iyear_2011 | -.0070045 .0018133 -3.86 0.001 -.010787 -.003222 _Iyear_2012 | .0035946 .0019823 1.81 0.085 -.0005403 .0077295 _Iyear_2013 | -.009979 .0010491 -9.51 0.000 -.0121674 -.0077907 _Iyear_2014 | .0021452 .0013309 1.61 0.123 -.000631 .0049215 _Iyear_2015 | -.0046829 .0015431 -3.03 0.007 -.0079017 -.0014641 _Iyear_2016 | -.0049688 .0014339 -3.47 0.002 -.0079599 -.0019777 _Iyear_2017 | -.0124867 .0013422 -9.30 0.000 -.0152865 -.0096869 _Iyear_2018 | -.0076201 .0015902 -4.79 0.000 -.0109371 -.004303 _Iyear_2019 | -.0100073 .0018101 -5.53 0.000 -.0137831 -.0062315 _cons | .0449997 .0119948 3.75 0.001 .0199789 .0700205 ---------------------------------------------------------------------------------
I have to mention to some points:
dum_recession is a dummy variable that takes zero or one in the time of recession.
for the second estimation first I generated the lag on "dum_recession" because: xtscc does not allow some factor variables so I should create specific variables instead of using directly the code I provided in the first approach.
I use Driscoll Kraay standard errors instead of clustering at the country level.
But I do not know why the results is different, which I was expected that the only thing that changes be the standard error.
Thank you so much for your valuable time and advice.
sorry for this long questions, I tried to report all things.
Regards.
Comment