[R] trouble with boot ()

From: Rogério Rosa da Silva <rogeriorosas_at_gmail.com>
Date: Thu 01 Jun 2006 - 05:27:17 EST

    Dear members,

    I am trying to use boot () to compute the distributions of a statistic     of a data set. The statistic is defined in the following code:

        eds<-function(x) {

    I need to calculate the nonparametric bootstrap confidence intervals for     "eds_abs", but I am confuse about how I should call the second argument     for statistic function (). What I don't understand is where the index     should be set.

    I think I need to reproduce in boot () the following     loop:

        eds_null <- numeric(1000)
        for (i in 1:1000) eds_null[i] <- eds (sample(x,replace=T)),

    where "x" is a data matrix (n-by-m) with n rows corresponding to     individual samples, and m-columns corresponding to the different     attributes. For example:                                        

x<-data.frame(var1=c(23,657,67,89,23,657,67,89),var2=c(23,45,67,12,23,657,67,89), var3=c(25,2009,89,223,23,45,67,12),
var4=c(1299,456,789,2, 23,45,67,12))

> eds(x)
> [1] 6.738244

    Thanks for your time,


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 01 05:28:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 01 Jun 2006 - 08:10:37 EST.

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