Professional Documents
Culture Documents
Capítulo 2 - Autocorrelación, Heteroscedasticidad, Multicolinealidad, No Linealidad y Normalidad
Capítulo 2 - Autocorrelación, Heteroscedasticidad, Multicolinealidad, No Linealidad y Normalidad
. use https://www.stata-press.com/data/r17/auto.dta
(1978 automobile data)
. rvfplot, yline(0)
. avplots
. rvpplot mpg
Leverage
Percentiles Smallest
1% .0192852 .0192852
5% .0198324 .0195139
10% .0217658 .0198281 Obs 74
25% .0266526 .0198324 Sum of wgt. 74
DFITS
Percentiles Smallest
1% -.9384231 -.9384231
5% -.2974069 -.4402165
10% -.2110095 -.2984942 Obs 74
25% -.1222725 -.2974069 Sum of wgt. 74
. estat ovtest
. estat hettest
chi2(1) = 6.50
Prob > chi2 = 0.0108
. estat imtest
Source chi2 df p
. estat vif
.
Econometría a través de STATA
doFile
use https://www.stata-press.com/data/r17/auto.dta
gen forXmpg= foreign* mpg
reg price weight mpg forXmpg foreign
rvfplot, yline(0)
avplots
rvpplot mpg
predict xdist, leverage
sum xdist, detail
predict zdist, dfits
sum zdist, detail
predict residuos, residuals
predict esta, rstandar
predict estu, rstudent
list residuos esta estu
estat ovtest
estat hettest
estat imtest
estat vif
Econometría a través de STATA
. clear all
. use https://www.stata-press.com/data/r17/klein.dta
. tsset yr
. estat dwatson
. estat durbinalt
1 35.035 1 0.0000
. estat bgodfrey
1 14.264 1 0.0002
1 5.543 1 0.0186
2 9.431 2 0.0090
3 9.039 3 0.0288
doFile
use https://www.stata-press.com/data/r17/auto.dta
gen forXmpg= foreign* mpg
reg price weight mpg forXmpg foreign
rvfplot, yline(0)
avplots
rvpplot mpg
predict xdist, leverage
sum xdist, detail
predict zdist, dfits
sum zdist, detail
predict residuos, residuals
predict esta, rstandar
predict estu, rstudent
list residuos esta estu
estat ovtest
estat hettest
estat imtest
estat vif
clear all
use https://www.stata-press.com/data/r17/klein.dta
tsset yr
reg consump wagegovt
estat dwatson
estat durbinalt
estat bgodfrey
estat archlm, lags (1 2 3)
Ejercicio 2.2.
Econometría a través de STATA
a)-
. clear all
. histogram res
(bin=22, start=-1.933759, width=.14895717)
. rvfplot, yline(0)
. estat hettest
chi2(1) = 2.42
Prob > chi2 = 0.1200
Econometría a través de STATA
. estat imtest
Source chi2 df p
White's test
H0: Homoskedasticity
Ha: Unrestricted heteroskedasticity
chi2(31) = 42.36
Prob > chi2 = 0.0839
Source chi2 df p
b)-
. estat ovtest
. Linktest
command Linktest not defined by Linktest.ado
r(199);
. linktest
. Linktest
command Linktest not defined by Linktest.ado
r(199);
. linktest
c)-
. avplot educyearsofeducation
d)-
. kdensity res, normal
Econometría a través de STATA
. swilk res
. sktest res
e)-
Econometría a través de STATA
doFile
clear all
use "C:\Econometría Básica\salarios.dta"
regress lwagelogwage educyearsofeducation experyearspotentialexperience expersqexper2
northcen1ifliveinnorthcentralus married1ifmarried female1iffemale smsa1ifliveinsmsa
regress lwagelogwage educyearsofeducation experyearspotentialexperience expersqexper2
northcen1ifliveinnorthcentralus married1ifmarried female1iffemale smsa1ifliveinsmsa
predict res, residuals
histogram res
rvfplot, yline (0)
estat hettest
estat imtest
clear all
use "C:\Econometría Básica\salarios.dta"
reg lwagelogwage expersqexper2 tenursqtenure2 educyearsofeducation smsa1ifliveinsmsa female1iffemale
nonwhite1ifnonwhite married1ifmarried
predict res, residuals
histogram res
rvfplot, yline (0)
estat hettest
estat imtest
estat imtest, white
estat ovtest
estat ovtest, rhs
linktest
avplot educyearsofeducation
kdensity res, normal
swilk res
sktest res