Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Bootstrap with strata option


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: Bootstrap with strata option
Date   Wed, 25 Jun 2003 15:36:00 -0500

Donal O'Neill <[email protected]> asks about the -bootstrap- command with the
-strata()- option:

> I have written a program which compares the wage distribution for black and 
> white workers in the U.S.. The program runs fine and I can calculate the 
> statistics I require. I now want to bootstrap some standard errors. If I 
> use the basic bootstrap command in Stata 8 :
> 
> ...
> 
> . bootstrap "racekern lhwage93 afqtpst race race2" p1=r(prop1), reps(10) 
> strata(race)
> 
> command:      racekern lhwage93 afqtpst race race2
> statistic:    p1         = r(prop1)
> 
> Bootstrap statistics                              Number of obs    =      1370
>                                                    Number of strata =         2
>                                                    Replications     =        10
> 
> ------------------------------------------------------------------------------
> Variable     |  Reps  Observed      Bias  Std. Err. [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>            p1 |     0  .6487096         .         .          .          .   (N)
>               |                                              .          .   (P)
>               |                                              .          .  (BC)
> ------------------------------------------------------------------------------
> Note:  N   = normal
>         P   = percentile
>         BC  = bias-corrected
> 
> insufficient observations to compute bootstrap standard errors
> no results will be saved
> r(2000);
> 
> 
> I assume this means there are not enough (more than 1) values of the 
> statistic generated by the bootstrap command to calculate a standard error. 
> However I am confused as to why this is so. The program runs o.k with the 
> original sample sizes so it should also work with each of the 10 
> bootstrapped samples, resulting in 10 observations. If I don't use the 
> strata option I get my 10 observations. Any suggestions would be welcomed.

My guess is that -racekern- is somehow erring out with the stratified
bootstrap samples.  For each replication that this happens -bootstrap- will
post missing values for the statistics.

Donal will be able to see the error message produced by -racekern- for each
replication by supplying -bootstrap- with the -noisily- option.

If this doesn't identify the problem, I invite Donal to email me privately
with the necessary files to reproduce the problem.

--Jeff
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index