[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Donal O'Neill" <doneill@may.ie> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Bootstrap with strata option |

Date |
Wed, 25 Jun 2003 17:31:59 +0100 |

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 "program name" statistics, reps(#)

everything is ok and I get my standard errors. However it seems sensible to ensure that the number of blacks and whites in each bootstrap replication is consistent with the original data (900 whites and 500 blacks). To enforce this I tried using the strata option. My new command is therefore

"bootstrap "program name" statistics, reps(#) strata(race)

However when I try to run this command the program always fails and I am told that there are insufficient observations to calculate the standard errors. The exact message is below

. 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.

Donal

*

* 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/

- Prev by Date:
**st: LR test question** - Next by Date:
**Re: st: bsample** - Previous by thread:
**st: LR test question** - Next by thread:
**Re: st: Bootstrap with strata option** - Index(es):

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