I’m running a panel regression in both Stata and EViews, but I’m getting very different R² values and coefficient estimates despite using the same dataset and specifications (cross section fixed effects, cross section clustered SE). The panel is unbalanced with 409 cross sections and 14 periods, and Eviews auto-adjusted the periods to be 2012-2019 and 2023 because of lagged variables and missing data in 2020-2022.
R² is extremely low in Stata (<0.05) but high in EViews (>0.85). Some coefficient signs and significance levels are similar but not identical. eviews skipped 2020 and 2021; I didn't manually set that in Stata but the observation number matches
here is the results from Eviews. sorry I couldn't copy-paste the text or upload the file because I'm using the student lite version
Stata’s diagnostic tests show presence of heteroskedasticity, serial correlation, and cross-sectional dependence, as shown below, but I’m unsure if I can use these results if the regression is so different from Eviews.
What else should I check to ensure both software are handling fixed effects and clustering the same way? Can I use robustness test results from Stata and regression results from Eviews?
Thank you in advance!
R² is extremely low in Stata (<0.05) but high in EViews (>0.85). Some coefficient signs and significance levels are similar but not identical. eviews skipped 2020 and 2021; I didn't manually set that in Stata but the observation number matches
here is the results from Eviews. sorry I couldn't copy-paste the text or upload the file because I'm using the student lite version
Code:
. xtreg ln_homeless_vet_per10000_1 vet_black_rate vet_income median_rent_coc L1.own_vacancy_rate_coc L > 1.rent_vacancy_rate_coc vet_pov_rate L1.vet_ue_rate ssi_coc own_burden_rate_coc rent_burden_rate_coc > L2.own_hpc L2.rent_hpc, fe vce(cluster coc_num) Fixed-effects (within) regression Number of obs = 3,206 Group variable: coc_num Number of groups = 362 R-squared: Obs per group: Within = 0.0495 min = 1 Between = 0.0206 avg = 8.9 Overall = 0.0255 max = 9 F(12, 361) = 4.94 corr(u_i, Xb) = 0.0442 Prob > F = 0.0000 (Std. err. adjusted for 362 clusters in coc_num) --------------------------------------------------------------------------------------- | Robust ln_homeless_vet_per~1 | Coefficient std. err. t P>|t| [95% conf. interval] ----------------------+---------------------------------------------------------------- vet_black_rate | -.7471108 .3898904 -1.92 0.056 -1.513852 .0196308 vet_income | -4.72e-06 2.49e-06 -1.90 0.059 -9.61e-06 1.75e-07 median_rent_coc | 1.03e-06 1.02e-06 1.01 0.312 -9.68e-07 3.02e-06 | own_vacancy_rate_coc | L1. | 1.511589 3.545192 0.43 0.670 -5.460232 8.483411 | rent_vacancy_rate_coc | L1. | .2485341 .4868649 0.51 0.610 -.7089136 1.205982 | vet_pov_rate | .3256463 .4907035 0.66 0.507 -.63935 1.290643 | vet_ue_rate | L1. | 1.098307 1.011106 1.09 0.278 -.8900894 3.086704 | ssi_coc | -1.50e-07 5.36e-06 -0.03 0.978 -.0000107 .0000104 own_burden_rate_coc | -1.027336 .5897519 -1.74 0.082 -2.187117 .1324444 rent_burden_rate_coc | .7339676 .2552522 2.88 0.004 .2319997 1.235936 | own_hpc | L2. | -.2331625 .2056714 -1.13 0.258 -.637627 .1713021 | rent_hpc | L2. | -.1039091 .2698138 -0.39 0.700 -.6345134 .4266952 | _cons | 3.534651 .1609618 21.96 0.000 3.218111 3.851192 ----------------------+---------------------------------------------------------------- sigma_u | 1.140344 sigma_e | .45616874 rho | .86205273 (fraction of variance due to u_i) ---------------------------------------------------------------------------------------
Code:
. xttest3 Modified Wald test for groupwise heteroskedasticity in fixed effect regression model H0: sigma(i)^2 = sigma^2 for all i chi2 (362) = 4624.51 Prob > chi2 = 0.0000 . xtserial homeless_vet_per10000 Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 358) = 12.948 Prob > F = 0.0004 . xtcdf homeless_vet_per10000 xtcd test on variables homeless_vet_per10000 Panelvar: coc_num Timevar: year ------------------------------------------------------------------------------+ Variable | CD-test p-value average joint T | mean ρ mean abs(ρ) | ----------------+--------------------------------------+----------------------| homeless_vet~0 + 65.874 0.000 10.73 + 0.06 0.27 | 18822 combinations o > f panel units ignored (insufficient joint observations). ------------------------------------------------------------------------------+ Notes: Under the null hypothesis of cross-section independence, CD ~ N(0,1) P-values close to zero indicate data are correlated across panel groups.
Thank you in advance!
Comment