Garth Rauscher <[email protected]> asked about using -bootstrap, bca- with the
following program.
prog dp
cap drop pr0 pr1 dp
logit Y X r2 r3 a2 a3
ren X wasX
g X=0
predict pr0
replace X=1
predict pr1
drop X
ren wasX X
g dp=pr1-pr0
mean dp
end
To use the -bca- option, the program must also work properly with -jackknife-.
In order for -jackknife- to leave one observation out in each replication, the
program needs to allow the -if- qualifier. Garth can add the -syntax- command
to his program so that it will accept -if- as follows.
prog dp
syntax [if]
cap drop pr0 pr1 dp
logit Y X r2 r3 a2 a3 `if'
ren X wasX
g X=0
predict pr0 `if'
replace X=1
predict pr1 `if'
drop X
ren wasX X
g dp=pr1-pr0
mean dp `if'
end
bs, bca : dp
estat bootstrap, all
--Kristin
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/