Efectos Fijos y Aleatorios
Efectos Fijos y Aleatorios
Efectos Fijos y Aleatorios
---------------------------------------
.
*Para hacer regresiones con xtreg*
estimates store fe
estimates store re
*Prueba de hausman*
hausman fe re
log close
.
. *Primero la identificacion, despues el tiempo*
. xtset Ctry_Code YEAR
panel variable: Ctry_Code (strongly balanced)
time variable: YEAR, 1960 to 1978
delta: 1 unit
.
. *Para efectos fijos*
. xtreg LGASPCAR LINCOMEP LRPMG LCARPCAP, fe
F(3,321) = 560.09
corr(u_i, Xb) = -0.2468 Prob > F = 0.0000
------------------------------------------------------------------------------
LGASPCAR | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
LINCOMEP | .6622497 .073386 9.02 0.000 .5178713 .806628
LRPMG | -.3217025 .0440993 -7.29 0.000 -.4084625 -.2349424
LCARPCAP | -.6404829 .0296789 -21.58 0.000 -.6988725 -.5820933
_cons | 2.40267 .2253094 10.66 0.000 1.9594 2.845939
-------------+----------------------------------------------------------------
sigma_u | .34841288
sigma_e | .09233035
rho | .93438171 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(17, 321) = 83.96 Prob > F = 0.0000
.
. estimates store fe
.
. *Para efectos aleatorios*
. xtreg LGASPCAR LINCOMEP LRPMG LCARPCAP, re
------------------------------------------------------------------------------
LGASPCAR | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
LINCOMEP | .5549857 .0591282 9.39 0.000 .4390966 .6708748
LRPMG | -.4203892 .0399781 -10.52 0.000 -.498745 -.3420335
LCARPCAP | -.6068401 .025515 -23.78 0.000 -.6568487 -.5568316
_cons | 1.996698 .184326 10.83 0.000 1.635426 2.357971
-------------+----------------------------------------------------------------
sigma_u | .19554465
sigma_e | .09233035
rho | .81769849 (fraction of variance due to u_i)
------------------------------------------------------------------------------
.
. estimates store re
.
. *Prueba de hausman*
. hausman fe re
chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 302.80
Prob>chi2 = 0.0000
(V_b-V_B is not positive definite)
.
. log close
-----------------------------------------------------------------------------------
---------------------------------------