Dear all, I'm writing my bachelor thesis this semester and I'm interested in studying income inequality and quality of governance. Found this webpage (https://www.gu.se/en/quality-government) where they aggregated dataset both with cross sectional and time series/panel data data. So I downloaded the dataset did some regression with the CS data and got the result that there's a negative relation between QoG and income inequality. So well, I decided to do the same in time serie/panel data data through using the xtreg command. I plugged in the same variables as in the case for the regression with the CS but with the time serie data and differently from the previous CS regression I got a positive relation, hence with an increase in QoG income inequality increases. This might be the actual case, but I don't really know so that why I'm turning to the state forum for some help, is might coding right?
Would be really nice if someone knows how this works, guess that I've done something wrong or perhaps that's how the it is?
Thanks in advance and happy easter!
Best regards,
//K
import excel qog_tsjan21.xlsx, sheet("qog_ts") firstrow
rename wdi_gini Gini
rename wdi_debt Govdebt
rename icrg_qog QOG
rename bci_bci Corp
eststo clear
//--------------------------------------------------------------------
eststo: xtreg Gini QOG, fe vce(cluster ccode)
eststo: xtreg Gini QOG gle_gdp, fe vce(cluster ccode)
eststo: xtreg Gini QOG gle_gdp dr_ig, fe vce(cluster ccode)
esttab
eststo clear
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. eststo: xtreg Gini QOG, fe vce(cluster ccode)
Fixed-effects (within) regression Number of obs = 1,429
Group variable: ccode Number of groups = 126
R-sq: Obs per group:
within = 0.0276 min = 1
between = 0.1587 avg = 11.3
overall = 0.2289 max = 31
F(1,125) = 7.76
corr(u_i, Xb) = -0.6160 Prob > F = 0.0062
(Std. Err. adjusted for 126 clusters in ccode)
------------------------------------------------------------------------------
| Robust
Gini | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
QOG | 7.534137 2.705155 2.79 0.006 2.180299 12.88797
_cons | 34.35972 1.581482 21.73 0.000 31.22977 37.48967
-------------+----------------------------------------------------------------
sigma_u | 9.1880006
sigma_e | 2.9348208
rho | .90741762 (fraction of variance due to u_i)
------------------------------------------------------------------------------
(est1 stored)
. eststo: xtreg Gini QOG gle_gdp, fe vce(cluster ccode)
Fixed-effects (within) regression Number of obs = 1,001
Group variable: ccode Number of groups = 121
R-sq: Obs per group:
within = 0.0246 min = 1
between = 0.0913 avg = 8.3
overall = 0.1266 max = 24
F(2,120) = 6.93
corr(u_i, Xb) = -0.4941 Prob > F = 0.0014
(Std. Err. adjusted for 121 clusters in ccode)
------------------------------------------------------------------------------
| Robust
Gini | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
QOG | 4.847057 2.36333 2.05 0.042 .1678281 9.526286
gle_gdp | 7.80e-07 2.29e-07 3.41 0.001 3.27e-07 1.23e-06
_cons | 36.42992 1.413438 25.77 0.000 33.63141 39.22843
-------------+----------------------------------------------------------------
sigma_u | 9.5744642
sigma_e | 2.7760339
rho | .92245303 (fraction of variance due to u_i)
------------------------------------------------------------------------------
(est2 stored)
. eststo: xtreg Gini QOG gle_gdp dr_ig, fe vce(cluster ccode)
Fixed-effects (within) regression Number of obs = 1,001
Group variable: ccode Number of groups = 121
R-sq: Obs per group:
within = 0.0450 min = 1
between = 0.0045 avg = 8.3
overall = 0.0029 max = 24
F(3,120) = 7.30
corr(u_i, Xb) = -0.1075 Prob > F = 0.0002
(Std. Err. adjusted for 121 clusters in ccode)
------------------------------------------------------------------------------
| Robust
Gini | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
QOG | 4.027773 2.437194 1.65 0.101 -.7977005 8.853247
gle_gdp | 1.14e-06 2.53e-07 4.51 0.000 6.39e-07 1.64e-06
dr_ig | -.0714678 .036067 -1.98 0.050 -.142878 -.0000576
_cons | 41.28843 2.804543 14.72 0.000 35.73563 46.84123
-------------+----------------------------------------------------------------
sigma_u | 9.0268998
sigma_e | 2.7483785
rho | .91516497 (fraction of variance due to u_i)
------------------------------------------------------------------------------
(est3 stored)
.
.
.
.
.
. esttab
------------------------------------------------------------
(1) (2) (3)
Gini Gini Gini
------------------------------------------------------------
QOG 7.534** 4.847* 4.028
(2.79) (2.05) (1.65)
gle_gdp 0.000000780*** 0.00000114***
(3.41) (4.51)
dr_ig -0.0715*
(-1.98)
_cons 34.36*** 36.43*** 41.29***
(21.73) (25.77) (14.72)
------------------------------------------------------------
N 1429 1001 1001
------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
.
. eststo clear
.
.
end of do-file
.
0 Response to Dear all, need some advice on xtreg in stata
Post a Comment