[R-sig-eco] Bootstrapping with pseudo-replicates

Dixon, Philip M [STAT] pdixon at iastate.edu
Wed Nov 16 15:25:11 CET 2011


Johannes,

A very good question to ask, but you can't use a bootstrap, or boot(), to investigate it.  

You can define strata and then bootstrap observations within strata, but all bootstrap data sets will have the same structure as the original data.  That's the point of the bootstrap.  In your example, you have observations from 4 sites, 1 obs from site 1, 2 from site 2, 1 from site 3, and 2 from site 4.  Every stratified bootstrap sample will have 1 from site 1, 2 from site 2, 1 from site 3 and 2 from site 4.

I believe you have to construct your own code, probably along the lines of defining a vector for one obs per site, then for each site: extracting the set of pseudoreplicates for one site, using sample() to grab one value from that set, then storing in the  vector.

Best wishes,
Philip Dixon



More information about the R-sig-ecology mailing list