rem
first use mglh to do a regular regression and save residuals to
rem identify any influential case
mglh
model paup=constant+outratio+propold+pop
save yuleres1/data
estimate
use yuleres1
plot cook/stick line dash=11
rem calculate percentiles of the f(p, n-p) distribution
let fperc=100*fcf(cook,4,28)
rem #4 is 12.9%, #15 61.0%, #30 38.9%; 15 and 30 are influential
use yule
model paup=constant+outratio+propold+pop
rem now do a bootstrap of the ordinary regression
output/noscreen
save yulebot1/coef
estimate/sample=boot(1000,32)
output
use yulebot1
den constant..pop
stats
stat constant..pop
rem compare "naive" bootstrap estimates of se with original ols regression
use yule
rem now try robust estimation
nonlin
model paup=b0+b1*outratio+b2*propold+b3*pop
robust bisquare=3.5
estimate
rem se for outratio is now 0.207, but this is based on asymptotic
rem theory, i.e. justified for large samples; use bootstrap as
rem alternative approach to inference
model paup=b0+b1*outratio+b2*propold+b3*pop
robust bisquare=3.5
output/noscreen
save yulebot2/params
estimate/sample=boot(1000,32)
output
rem bootstrap took 1m 33s on my 266MHz machine at home (OLS was 14 s)
use yulebot2
den b0..b3
stats
stat b0..b3
rem try still another estimate of se as 1/2 width of 68% central strip
basic
sort b1
if case=160 then print "68% CI LB:",b1
if case=840 then print "68% CI UB:",B1
run
calc (1.041-0.632)/2
rem this estimate of se of b1 is 0.204, close to 0.214 (naive) and 0.214
(A.S.E)
corr
pearson b0..b3
Last modified 26 Apr 2000