Displaying 2 results from an estimated 2 matches for "denboot".
Did you mean:
xenboot
2005 May 04
1
stratified bootstrap with boot
Hello,
I am new to R, and am having trouble getting the output I want from a
stratified bootstrap. I didn't recieve a reply the first time I posted
this question so I have tried to make it more clear. My data frame
(denboot) is set up as follows:
SITE cswa parea treat
1 BeanA 3 1.20 m
2 BeanBC 3 1.05 m
3 BeanD 1 0.93 m
4 BlackB 1 1.01 m
5 Brooks 3 4.00 b
6 BullL 3 1.32 b
7 BullM 1 0.20 m
8 BullU 4 2.06 b
......
2005 Apr 29
0
problem with strata in boot
.... 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...