[R] boot question
Jason Turner
jasont at indigoindustrial.co.nz
Fri Apr 2 00:37:33 CEST 2004
> What in the world am I missing??
stype. As in (from help(boot)
stype: A character string indicating what the second argument of
statistic represents. Possible values of stype are '"i"'
(indices - the default), '"f"' (frequencies), or '"w"'
(weights).
This works. n.b. the second argument.
mean.b <- function(x,ind,...) {
mean(x[ind])
}
zz <- rnorm(20)
mean(zz)
res <- boot(zz,mean.b,R=5)
I'm sure there's a cleaner way to do that, but I don't know it (yet).
Cheers
Jason
More information about the R-help
mailing list