Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Bootstrap strata
From 
 
Laura Gibbons <[email protected]> 
To 
 
[email protected] 
Subject 
 
st: Bootstrap strata 
Date 
 
Fri, 31 May 2013 13:53:29 -0700 (PDT) 
I have data with 1 to 7 observations/person.  I want to randomly sample 
one observation/person in some sort of a bootstrapping process to get an 
appropriate error term for, say, x.
I can set this up myself using a loop around the -bsample- command 
[bsample 1, strata(id)], posting the estimated coefficient for x each 
sample and taking the std dev of the mean of x for my 1000 times through 
the loop.
Is there a way to do this directly in -bootstrap-?  Here is what the 
manual says about the strata option there:
    strata(varlist) specifies the variables that identify strata.  If this
        option is specified, bootstrap samples are taken independently within
        each stratum.
It is not clear to me what that means.  Does it mean it will sample once 
from each stratum?  I think not, based on my results, but I honestly can't 
tell.
Many thanks,
Laura
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laura E. Gibbons, PhD
General Internal Medicine, University of Washington
Box 359780, Harborview Medical Center, 325 Ninth Ave, Seattle, WA 98104
phone: 206-744-1842, fax: 206-744-9917,
Office address: 401 Broadway, Suite 5122.6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/