Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Robert A LaBudde
See the help for boot(). The function in the 2nd argument has to be of a special form. You need to define such a form, as in: fmean<- function (x, i) mean(x[i]) #use data x[] and indices i and then boot.out<- boot(d, fmean, R=1000, sim='permutation') At 12:59 PM 4/22/2008, stephen sefick wrot

Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Gavin Simpson
On Tue, 2008-04-22 at 12:59 -0400, stephen sefick wrote: > d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, > NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) > > boot.out <-boot(d, mean, R=1000, sim="permutation") > > Error in mean.default(data, original, ...) : >

[R] bootstrap for confidence intervals of the mean

2008-04-22 Thread stephen sefick
d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) boot.out <-boot(d, mean, R=1000, sim="permutation") Error in mean.default(data, original, ...) : 'trim' must be numeric of length one I know that I am missing somethi