------------------------------------------------------------------------------------------------------------------------. *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 . . la identificacion, despues el tiempo* . *Primero 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 Group variable: Ctry_Code
Number of obs Number of groups
R-sq: within = 0.8396 between = 0.5755 overall = 0.6150
Obs per group:
corr(u_i, Xb)
F(3,321) Prob > F
= -0.2468
= =
342 18
min = avg = max =
19 19.0 19
= =
560.09 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 Group variable: Ctry_Code
Number of obs Number of groups
R-sq: within = 0.8363 between = 0.7099 overall = 0.7309
Obs per group:
corr(u_i, X)
Wald chi2(3) Prob > chi2
= 0 (assumed)
= =
342 18
min = avg = max =
19 19.0 19
= =
1642.20 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:
. . log close
difference in coefficients not systematic chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B) (b-B)'[(V_b-V_B)^(-1)](b- B) = 302.80 Prob>chi2 = 0.0000 (V_b-V_B is not positive definite)
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.