[R] Bootstrap Confidence Intervals

From: _Fede_ <r_stat_solutions_at_hotmail.es>
Date: Sun, 30 Dec 2007 11:45:48 -0800 (PST)

Hi all.

This is my first post in this forum. Finally I find a forum in the web about R, although is not in my language.

Now I'm working with Bootstrap CI. I'd like to know how I can calculate a Bootstrap CI for any statistic, in particular, for Kurtosis Coeficient. I have done the following code lines:

> library(boot)
> x=rnorm(20)
> kurtosis=function(x) (mean((x-mean(x))^4))/(sd(x)^4)
> z <- numeric(10000)
> for(i in 1:10000)
> z[i]=kurtosis(sample(x, replace=TRUE))
> boot.ci(z, conf = 0.95,type = c("norm","basic","perc","bca"))

But the output shows the next error:

Error en if (ncol(boot.out$t) < max(index)) { :

        argumento tiene longitud cero

I don't know what is wrong.

I hope that somebody can help me. Sorry for my english.

All have a nice new year.


View this message in context: http://www.nabble.com/Bootstrap-Confidence-Intervals-tp14550471p14550471.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 30 Dec 2007 - 19:48:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 30 Dec 2007 - 21:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.