Skip to content
Prev 51705 / 398500 Next

trouble using boot package

Please read the help file!

mean is not a valid statistic to boot.

mean.boot <- function(x, i) mean(x[i])

is valid.

You can easily return as many values from boot as you like.
For example

mean.boot1 <- function(x, i)
    tapply(x$StomWt[i], list(x$Age, x$Quarter)

Of course if you want to do this, you need to use a stratified
bootstrap using the strata argument to boot
strata=tapply(d2$StomWt, list(d2$Age, d2$Quarter)) should work.

Angelo Canty
On Fri, 25 Jun 2004, Louize Hill wrote: