[R] boot question
Angelo Canty
canty at math.mcmaster.ca
Fri Apr 2 00:35:17 CEST 2004
What you are missing is reading the helpfile!
The function mean is not a valid statistic to be passed to boot
function(x, i) mean(x[i])
is.
Please do read the documentation. That's why it is provided.
------------------------------------------------------------------
| Angelo J. Canty Email: cantya at mcmaster.ca |
| Mathematics and Statistics Phone: (905) 525-9140 x 27079 |
| McMaster University Fax : (905) 522-0935 |
| 1280 Main St. W. |
| Hamilton ON L8S 4K1 |
------------------------------------------------------------------
On Thu, 1 Apr 2004, Morris, Jeffrey [OCDUS] wrote:
> What in the world am I missing??
>
> > x<-rnorm(20)
>
> > mean(x)
> [1] -0.2272851
>
> > results<-boot(x,mean,R=5)
>
> > results[2]
> $t
> [,1]
> [1,] -0.2294562
> [2,] -0.2294562
> [3,] -0.2294562
> [4,] -0.2294562
> [5,] -0.2294562
>
> Jeff Morris
> Ortho-Clinical Diagnostics
> A Johnson & Johnson Co.
> Rochester, NY
> Tel: (585) 453-5794
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list