I run OLS for my panel data ( with N=816, T=8) and check heteroskedasticity as below :
Code:
. reg To vl0 ll0 Source | SS df MS Number of obs = 816 -------------+---------------------------------- F(2, 813) = 291.16 Model | 1408.90316 2 704.45158 Prob > F = 0.0000 Residual | 1967.01621 813 2.41945413 R-squared = 0.4173 -------------+---------------------------------- Adj R-squared = 0.4159 Total | 3375.91937 815 4.14223236 Root MSE = 1.5555 ------------------------------------------------------------------------------ To | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- vl0 | 3.862433 1.41577 2.73 0.007 1.083438 6.641429 ll0 | 6.818981 .2842538 23.99 0.000 6.261023 7.376939 _cons | -6.080591 1.634762 -3.72 0.000 -9.289442 -2.871739 ------------------------------------------------------------------------------
Code:
. estat hettest Breusch-Pagan / Cook-Weisberg test for heteroskedasticity Ho: Constant variance Variables: fitted values of To chi2(1) = 21.03 Prob > chi2 = 0.0000
Code:
. predict e, residual . gen e2=e^2 . qui reg e2 vl0 ll0 . predict v (option xb assumed; fitted values) . regress To vl0 ll0 [aweight=1/v] (sum of wgt is 3.6132e+02) Source | SS df MS Number of obs = 816 -------------+---------------------------------- F(2, 813) = 290.21 Model | 1312.56218 2 656.28109 Prob > F = 0.0000 Residual | 1838.49921 813 2.26137664 R-squared = 0.4165 -------------+---------------------------------- Adj R-squared = 0.4151 Total | 3151.06139 815 3.866333 Root MSE = 1.5038 ------------------------------------------------------------------------------ To | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- vl0 | 3.147649 1.357049 2.32 0.021 .4839154 5.811383 ll0 | 6.319949 .264015 23.94 0.000 5.801718 6.838181 _cons | -4.720035 1.558333 -3.03 0.003 -7.778866 -1.661205 ------------------------------------------------------------------------------
Thank in advance
0 Response to Run GLS for panel data with (N=816 and T= 8)
Post a Comment