Efectos Fijos y Aleatorios

Descargar como txt, pdf o txt
Descargar como txt, pdf o txt
Está en la página 1de 3

-----------------------------------------------------------------------------------

---------------------------------------

.
*Para hacer regresiones con xtreg*

*Primero la identificacion, despues el tiempo*


xtset id YEAR

*Para efectos fijos*


xtreg (Variables), fe

estimates store fe

*Para efectos aleatorios*


xtreg (variables), re

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

Fixed-effects (within) regression Number of obs = 342


Group variable: Ctry_Code Number of groups = 18

R-sq: Obs per group:


within = 0.8396 min = 19
between = 0.5755 avg = 19.0
overall = 0.6150 max = 19

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

Random-effects GLS regression Number of obs = 342


Group variable: Ctry_Code Number of groups = 18

R-sq: Obs per group:


within = 0.8363 min = 19
between = 0.7099 avg = 19.0
overall = 0.7309 max = 19

Wald chi2(3) = 1642.20


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
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

---- Coefficients ----


| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| fe re Difference S.E.
-------------+----------------------------------------------------------------
LINCOMEP | .6622497 .5549857 .107264 .0434669
LRPMG | -.3217025 -.4203892 .0986868 .0186143
LCARPCAP | -.6404829 -.6068401 -.0336428 .0151597
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg

Test: Ho: difference in coefficients not systematic

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
-----------------------------------------------------------------------------------
---------------------------------------

También podría gustarte