Skip to content
Prev 68798 / 398506 Next

problem with strata in boot

Hello,

I am new to R, and am having trouble running a stratified bootstrap.
My data set consists of 38 study sites in which I recorded the number
of bird pairs. Each site has been classified as burned or mowed and
for each of these two strata I would like to determine the precision
of an overall density estimate. I can run an unstratified bootstrap
without problem, but when I specify the strata I get the same
unstratified result. 

cswafun <- function(denboot, i) sum(cswa[i])/(sum(parea[i])
attach(denboot)
cswa.boot <- boot(denboot, cswafun, R = 10000, strata = treat)

###
cswa is a vector of integers representing the number of pairs/site
parea is a numeric vector of the size of each study site
treat is a character vector of 'b's and 'm's. I have also coded this
as a numeric vector of '1's and '2s'. R returns the following:

Call:
boot(data = denboot, statistic = cswafun, R = 10000, strata = treat)


Bootstrap Statistics :
    original     bias    std. error
t1* 1.109612 0.02641786   0.2032927

Any help would be appreciated. Thanks

Richard