Hello everyone, I am doing research on the returns to education in Ecuador between 2010 and 2021 using parent education as an instrument. The problem is that I have a data panel with gaps, since there are individuals who do not answer some valuable questions for my study, such as income received or years of education. I did the entire research using xtreg, fe supported by the hausman test (to select fe over re) and the breusch pagan lagrange test (to disallow the use of pooled ols). The thing is that heteroskedasticity exists, tested by xttest3, so my 2 issues are:
1) it is possible that there is autocorrelation, since income and experience depend on the values of t-1 years. So how do I test that in stata for my panel data?
2) in that case, would it be useful to use xtregar instead of xtreg, fe cluster(id) robust? I understand that the AR component just adds autoregressive dynamics for the error term, so could that help? or I'm wrong?
Thank you all in advance, this forum has been very useful to me. I attach some lines of code:
1) it is possible that there is autocorrelation, since income and experience depend on the values of t-1 years. So how do I test that in stata for my panel data?
2) in that case, would it be useful to use xtregar instead of xtreg, fe cluster(id) robust? I understand that the AR component just adds autoregressive dynamics for the error term, so could that help? or I'm wrong?
Thank you all in advance, this forum has been very useful to me. I attach some lines of code:
Code:
. use "C:\Users\Sebastián\Desktop\2010_2021 bf.dta", clear . collapse ln_w1 educp educp2 exper exper2 mujer minoria m1t rural p03, by (año ciudad) . xtset ciudad año, yearly panel variable: ciudad (unbalanced) time variable: año, 2010 to 2021, but with gaps delta: 1 year . xtregar ln_w1 educp educp2 exper exper2 mujer minoria m1t rural p03, fe FE (within) regression with AR(1) disturbances Number of obs = 5,515 Group variable: ciudad Number of groups = 894 R-sq: Obs per group: within = 0.2532 min = 1 between = 0.5020 avg = 6.2 overall = 0.2854 max = 11 F(9,4612) = 173.77 corr(u_i, Xb) = 0.1476 Prob > F = 0.0000 ------------------------------------------------------------------------------ ln_w1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educp | .3250868 .0179952 18.07 0.000 .2898076 .360366 educp2 | -.0104201 .0009198 -11.33 0.000 -.0122233 -.0086169 exper | .0502268 .0049368 10.17 0.000 .0405482 .0599054 exper2 | -.0011096 .0000907 -12.24 0.000 -.0012874 -.0009319 mujer | .7314758 .1191906 6.14 0.000 .4978051 .9651465 minoria | -.0402982 .0458744 -0.88 0.380 -.130234 .0496376 m1t | .1645453 .0847799 1.94 0.052 -.001664 .3307545 rural | .1033847 .0367966 2.81 0.005 .0312459 .1755236 p03 | .0097972 .001513 6.48 0.000 .0068309 .0127634 _cons | 2.650756 .0735363 36.05 0.000 2.50659 2.794922 -------------+---------------------------------------------------------------- rho_ar | .209674 sigma_u | .33362442 sigma_e | .44185069 rho_fov | .36310511 (fraction of variance because of u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(893,4612) = 0.57 Prob > F = 1.0000 . xtreg ln_w1 educp educp2 exper exper2 mujer minoria m1t rural p03, fe Fixed-effects (within) regression Number of obs = 6,447 Group variable: ciudad Number of groups = 932 R-sq: Obs per group: within = 0.1698 min = 1 between = 0.5708 avg = 6.9 overall = 0.3851 max = 12 F(9,5506) = 125.15 corr(u_i, Xb) = 0.2557 Prob > F = 0.0000 ------------------------------------------------------------------------------ ln_w1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educp | .063477 .0171917 3.69 0.000 .0297745 .0971796 educp2 | .0015855 .0008532 1.86 0.063 -.0000872 .0032582 exper | .0317171 .0041832 7.58 0.000 .0235163 .0399179 exper2 | -.0008562 .0000769 -11.13 0.000 -.001007 -.0007053 mujer | -.2454476 .1045871 -2.35 0.019 -.4504795 -.0404157 minoria | -.1415517 .0392788 -3.60 0.000 -.2185536 -.0645499 m1t | .1815925 .0730974 2.48 0.013 .0382928 .3248923 rural | -.018495 .0306378 -0.60 0.546 -.0785572 .0415673 p03 | -.0005702 .0013264 -0.43 0.667 -.0031705 .0020302 _cons | 4.726372 .1066534 44.32 0.000 4.51729 4.935455 -------------+---------------------------------------------------------------- sigma_u | .30402167 sigma_e | .40692158 rho | .35823269 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(931, 5506) = 2.33 Prob > F = 0.0000 . end of do-file

Comment