Professional Documents
Culture Documents
EJEMPLO
EJEMPLO
EJEMPLO
Notes:
1. Unicode is supported; see help unicode_advice.
3 . xtline idh
Total 96 100.00
12 . xtset id año
panel variable: id (strongly balanced)
time variable: año, 2010 to 2020, but with gaps
delta: 1 unit
13 .
14 . sort id año
15 .
16 . global variables idh rcog lpib
17 .
18 . foreach var of varlist $variables {
2.
19 . gen `var'dif=`var'-L1.`var'
3.
20 . }
(96 missing values generated)
(96 missing values generated)
(96 missing values generated)
Tuesday March 5 19:24:00 2024 Page 3
27 . drop idhdif
28 . drop rcogdif
29 . drop lpibdif
30 . xtset id año
panel variable: id (strongly balanced)
time variable: año, 2010 to 2020, but with gaps
delta: 1 unit
31 .
32 . sort id año
33 .
34 . global variables idh cog lpib
35 .
36 . foreach var of varlist $variables {
2.
37 . gen `var'dif=`var'-L1.`var'
3.
38 . }
(96 missing values generated)
(96 missing values generated)
(96 missing values generated)
39 . drop idhdif
40 . drop cogdif
41 . drop lpibdif
F(2,62) = 35.58
corr(u_i, Xb) = -0.6686 Prob > F = 0.0000
Tuesday March 5 19:24:00 2024 Page 4
sigma_u .0534005
sigma_e .00900484
rho .97235069 (fraction of variance due to u_i)
F test that all u_i=0: F(31, 62) = 58.27 Prob > F = 0.0000
43 . estimate store m1
sigma_u .03955091
sigma_e .00900484
rho .95071774 (fraction of variance due to u_i)
45 . estimate store re
46 . hausman m1 re
Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
m1 re Difference S.E.
chi2(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 8.60
Prob>chi2 = 0.0136
(V_b-V_B is not positive definite)
Tuesday March 5 19:24:00 2024 Page 5
47 . xttest
command xttest is unrecognized
r(199);
48 . xttest0
Estimated results:
Var sd = sqrt(Var)
Test: Var(u) = 0
chibar2(01) = 80.22
Prob > chibar2 = 0.0000
F(2,31) = 36.09
corr(u_i, Xb) = -0.6686 Prob > F = 0.0000
Robust
idh Coef. Std. Err. t P>|t| [95% Conf. Interval]
sigma_u 0.053400
sigma_e 0.053400
rho 0.972351 (fraction of variance due to u_i)
F(1,31) = 34.67
corr(u_i, Xb) = -0.1914 Prob > F = 0.0000
Tuesday March 5 19:24:00 2024 Page 6
Robust
idh Coef. Std. Err. t P>|t| [95% Conf. Interval]
sigma_u 0.040402
sigma_e 0.040402
rho 0.941408 (fraction of variance due to u_i)
F(1,31) = 18.76
corr(u_i, Xb) = -0.8241 Prob > F = 0.0001
Robust
idh Coef. Std. Err. t P>|t| [95% Conf. Interval]
sigma_u 0.069737
sigma_e 0.069737
rho 0.978404 (fraction of variance due to u_i)
52 . vif
not appropriate after regress, nocons;
use option uncentered to get uncentered VIFs
r(301);
F(2,62) = 35.58
corr(u_i, Xb) = -0.6686 Prob > F = 0.0000
sigma_u 0.053400
sigma_e 0.053400
rho 0.972351 (fraction of variance due to u_i)
F test that all u_i=0: F(31, 62) = 58.27 Prob > F = 0.0000
Tuesday March 5 19:24:00 2024 Page 7
54 . vif
not appropriate after regress, nocons;
use option uncentered to get uncentered VIFs
r(301);
56 . vif
57 . do "C:\Users\sos_c\AppData\Local\Temp\STD5b2c_000000.tmp"
58 . twoway (scatter idh cog, mlabel(entidadfederativa) mlabsize(vsmall)) (lfit idh cog), by(año)
59 . twoway (scatter idh lpib, mlabel(entidadfederativa) mlabsize(vsmall)) (lfit idh lpib), by(añ
60 .
end of do-file
61 . do "C:\Users\sos_c\AppData\Local\Temp\STD5b2c_000000.tmp"
62 . xtline idh
63 .
end of do-file
64 . do "C:\Users\sos_c\AppData\Local\Temp\STD5b2c_000000.tmp"
66 .
end of do-file
sigma_u .03969873
sigma_e .00677819
rho .97167341 (fraction of variance due to u_i)
sigma_u .0395706
sigma_e .00874153
rho .95346958 (fraction of variance due to u_i)
Robust
idh Coef. Std. Err. z P>|z| [95% Conf. Interval]
sigma_u .0395706
sigma_e .00874153
rho .95346958 (fraction of variance due to u_i)
Tuesday March 5 19:24:00 2024 Page 9
F(3,31) = 33.21
corr(u_i, Xb) = -0.5221 Prob > F = 0.0000
Robust
idh Coef. Std. Err. t P>|t| [95% Conf. Interval]
sigma_u .04657589
sigma_e .00874153
rho .96597343 (fraction of variance due to u_i)
Robust
idh Coef. Std. Err. z P>|z| [95% Conf. Interval]
sigma_u .0395706
sigma_e .00874153
rho .95346958 (fraction of variance due to u_i)
72 . drop _est_m1
73 . drop _est_re
Tuesday March 5 19:24:00 2024 Page 10
F(3,61) = 26.77
corr(u_i, Xb) = -0.5221 Prob > F = 0.0000
sigma_u .04657589
sigma_e .00874153
rho .96597343 (fraction of variance due to u_i)
F test that all u_i=0: F(31, 61) = 61.37 Prob > F = 0.0000
75 . estimate store fe
sigma_u .0395706
sigma_e .00874153
rho .95346958 (fraction of variance due to u_i)
77 . estimate store re
78 . hausman fe re
Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
fe re Difference S.E.
chi2(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 2.67
Prob>chi2 = 0.4456
(V_b-V_B is not positive definite)
Robust
idh Coef. Std. Err. z P>|z| [95% Conf. Interval]
sigma_u .0395706
sigma_e .00874153
rho .95346958 (fraction of variance due to u_i)
81 .
82 .
83 . save "D:\DOCTORADO DEN\3er SEMESTRE\DATOS ´PANEL\EL BUENO\PROYECTO FINAL.dta", replace
file D:\DOCTORADO DEN\3er SEMESTRE\DATOS ´PANEL\EL BUENO\PROYECTO FINAL.dta saved
name: <unnamed>
log: D:\DOCTORADO DEN\3er SEMESTRE\DATOS ´PANEL\ejemplo.log
log type: text
opened on: 5 Mar 2024, 19:21:37
85 .