我用的是n=13,t=36的面板数据。分别用stata的xtpcse和reghdfe两种方法做了双向固定效应模型,两种方法的结果大相径庭。求问应该选择哪种方法呢?我是个stata和计量小白,如果下边的做法和理论应用上有不足之处还请前辈们多多指教谢谢大家!
最开始找代码做了reghdfe,结果还可以
. reghdfe l_r tmax_r tmin_r prcp_r tmax_r_square tmin_r_square prcp_r_square prcp
> _r*tmax_r prcp_r*tmin_r tmax_r*tmin_r,absorb(i.c i.y) vce(cluster i.c) //tavg_
> r_rquare
(MWFE estimator converged in 2 iterations)
HDFE Linear regression Number of obs = 468
Absorbing 2 HDFE groups F( 9, 12) = 115.22
Statistics robust to heteroskedasticity Prob > F = 0.0000
R-squared = 0.7493
Adj R-squared = 0.7144
Within R-sq. = 0.0475
Number of clusters (c) = 13 Root MSE = 0.2271
(Std. err. adjusted for 13 clusters in c)
-------------------------------------------------------------------------------
| Robust
l_r | Coefficient std. err. t P>|t| [95% conf. interval]
--------------+----------------------------------------------------------------
tmax_r | 3.658484 .7934298 4.61 0.001 1.92975 5.387219
tmin_r | -1.634608 .3739787 -4.37 0.001 -2.449438 -.8197785
prcp_r | .0474761 .0266285 1.78 0.100 -.0105425 .1054947
tmax_r_square | -.1005117 .0203735 -4.93 0.000 -.1449018 -.0561216
tmin_r_square | -.0196665 .0065848 -2.99 0.011 -.0340136 -.0053195
prcp_r_square | .0000145 .0000317 0.46 0.655 -.0000545 .0000835
prcp_rtmax_r | -.002593 .0012594 -2.06 0.062 -.0053369 .000151
prcp_rtmin_r | .0005757 .0007549 0.76 0.460 -.0010691 .0022205
tmax_rtmin_r | .0881084 .0160395 5.49 0.000 .0531613 .1230555
_cons | -24.0849 7.882248 -3.06 0.010 -41.25885 -6.910961
-------------------------------------------------------------------------------
然后昨天看了一篇论文,作者是做了一系列检验之后,发现误差项存在异方差、自相关和截面相关,后来选择用PCSE修正结果。我也复刻了一下
//--------------------------------自相关
. xtserial l_r tmax_r tmin_r prcp_r tmax_r_square tmin_r_square prcp_r_square prc
> p_r*tmax_r prcp_r*tmin_r tmax_r*tmin_r
Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
F( 1, 12) = 49.909
Prob > F = 0.0000
//--------------------------------异方差
. quietly xtreg l_r tmax_r tmin_r prcp_r tmax_r_square tmin_r_square prcp_r_squar
> e prcp_r*tmax_r prcp_r*tmin_r tmax_r*tmin_r,fe
. xttest2
Breusch-Pagan LM test of independence: chi2(78) = 1478.384, Pr = 0.0000
Based on 36 complete observations over panel units
//--------------------------------横截面自相关
. quietly xtreg l_r tmax_r tmin_r prcp_r tmax_r_square tmin_r_square prcp_r_squar
> e prcp_r*tmax_r prcp_r*tmin_r tmax_r*tmin_r,fe
. xtcsd,pesaran
Pesaran's test of cross sectional independence = 37.735, Pr = 0.0000
以我的理解是这三个检验结果都是拒绝原假设,误差项存在自相关、异方差和横截面自相关。
然后我按照在文献上的方法用PCSE方法做了固定效应模型,结果的系数非常不好
. xtpcse l_r tmax_r tmin_r prcp_r tmax_r_square tmin_r_square prcp_r_square prcp_
> r*tmax_r prcp_r*tmin_r tmax_r*tmin_r,corr(psar1)
Prais–Winsten regression, correlated panels corrected standard errors (PCSEs)
Group variable: c Number of obs = 468
Time variable: y Number of groups = 13
Panels: correlated (balanced) Obs per group:
Autocorrelation: panel-specific AR(1) min = 36
avg = 36
max = 36
Estimated covariances = 91 R-squared = 0.9498
Estimated autocorrelations = 13 Wald chi2(9) = 20.80
Estimated coefficients = 10 Prob > chi2 = 0.0136
-------------------------------------------------------------------------------
| Panel-corrected
l_r | Coefficient std. err. z P>|z| [95% conf. interval]
--------------+----------------------------------------------------------------
tmax_r | -.1140283 1.972278 -0.06 0.954 -3.979622 3.751566
tmin_r | .9949556 .9287658 1.07 0.284 -.825392 2.815303
prcp_r | -.0260159 .0630197 -0.41 0.680 -.1495322 .0975004
tmax_r_square | .0111037 .0527673 0.21 0.833 -.0923183 .1145256
tmin_r_square | .0055959 .0182056 0.31 0.759 -.0300865 .0412782
prcp_r_square | .0000282 .0000626 0.45 0.652 -.0000945 .000151
prcp_rtmax_r | .0016126 .0035213 0.46 0.647 -.0052891 .0085143
prcp_rtmin_r | -.0013843 .0019009 -0.73 0.466 -.00511 .0023415
tmax_rtmin_r | -.0446226 .0479093 -0.93 0.352 -.1385231 .0492778
_cons | 5.190663 18.32978 0.28 0.777 -30.73504 41.11637
-------------------------------------------------------------------------------
rhos = .3946532 .0071098 .5005875 .5908927 .4767165 ... .7193214
-------------------------------------------------------------------------------