Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
AW: st: problem with bsample |

Date |
Thu, 15 Apr 2010 19:10:53 +0200 |

<> " I'm quite certain that there are no missing values in the treatment group indicator variable (only 1s and 0s)." You can always -inspect-/-codebook- beforehand to be totally certain... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Woolton Lee Gesendet: Donnerstag, 15. April 2010 19:00 An: statalist@hsphsun2.harvard.edu Betreff: Re: st: problem with bsample Thanks for your reply Maarten, One thing I forgot to mention is that we are running these models on 16 different datasets of the 16 there are only two for which this problem occurred. I have examined these 2 datasets but have not been able to note substantive differences between these and the other 14 datasets. I'm quite certain that there are no missing values in the treatment group indicator variable (only 1s and 0s). Woolton On Thu, Apr 15, 2010 at 11:43 AM, Maarten buis <maartenbuis@yahoo.co.uk> wrote: > --- On Thu, 15/4/10, Woolton Lee wrote: >> We are using the following command (essentially) >> >> bsample , strata(tx) cluster(patzip) >> >> this stratifies the sampling by treatment and control group >> and clusters the draws by patient zip code. However, for >> one of our CA markets we are finding that the bsample obtains >> a draw that contains no observations from the treatment group >> - (which given the command above doesn't make any sense). >> This particular market has roughly 95% of its observations in >> the comparison group and 5% of observations in the treatment >> group. But given that bsample is supposed to be drawing >> its samples stratified by treatment/comparison group this >> still should not happen. > > I can't recreate that problem with the existing example datasets. > In the example below the proportion of foreign cars is constant > over samples as one would expect. > > *------------ begin example -------------- > sysuse auto, clear > sum foreign > > tempname memhold > tempfile results > postfile `memhold' prop using `results' > > forvalues i = 1/1000 { > bsample, strata(foreign) > sum foreign, meanonly > post `memhold' (`r(mean)') > } > postclose `memhold' > use `results' , clear > sum > *------------- end example --------------- > > One thing I can imagine is that some observations get ignored > by an estimation command after -bsample- due to misssing values > on other variables. Say you bootstrapping a regression of some > dependent variable on your treatment and one or more control > variables. It might just happen that you draw a booststrap > sample where all treated individuals have at least one missing > value on one of the other variables. In that case it would look > like there were no treated individuals in that bootstrap sample. > > If that is not the case then you'll probably want to contact > Stata's tech support directly: > <http://www.stata.com/support/tech-support/tech2.html> > > Hope this helps, > Maarten > > -------------------------- > Maarten L. Buis > Institut fuer Soziologie > Universitaet Tuebingen > Wilhelmstrasse 36 > 72074 Tuebingen > Germany > > http://www.maartenbuis.nl > -------------------------- > > > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: problem with bsample***From:*Woolton Lee <finished07@gmail.com>

**Re: st: problem with bsample***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: problem with bsample***From:*Woolton Lee <finished07@gmail.com>

- Prev by Date:
**Re: st: problem with bsample** - Next by Date:
**st: ML estimation using stata** - Previous by thread:
**Re: st: problem with bsample** - Next by thread:
**Re: st: problem with bsample** - Index(es):