[R] How to do bootstrap for the complex sample design?

Robert A LaBudde ral at lcfltd.com
Thu Nov 4 16:45:17 CET 2010


At 01:38 AM 11/4/2010, Fei xu wrote:

>Hello;
>
>Our survey is structured as : To be investigated area is divided 
>into 6 regions,
>within each region, one urban community and one rural community are 
>randomly selected,
>then samples are randomly drawn from each selected uran and rural community.
>
>The problems is that in urban/rural stratum, we only have one sample.
>In this case, how to do bootstrap?
>
>Any comments or hints are greatly appreciated!
>
>Faye

Just make a table of your data, with each row corresponding to a 
measurement. You columns will be Region, UrbanCommunity, 
RuralCommunity and your response variables.

Bootstrap resampling is just generating random row indices into this 
table, with replacement. I.e.,

index<- sample(1:N, N, replace=TRUE)

Then your resample is myTable[index,].

Because you chose UrbanCommunity and RuralCommunity randomly, this 
shouldn't be a problem. The fact that you choose a subsample size of 
1 means you won't be able to estimate within-region variances unless 
you make some serious assumptions (e.g., UrbanCommunity effect 
independent of Region effect).

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"



More information about the R-help mailing list