[R] problem with boot

Renaud Lancelot renaud.lancelot at cirad.fr
Wed Jun 19 17:00:10 CEST 2002


See the "statistics" argument in help file for boot. I guess what you
want is

Data <- rnorm(100)
foo <- function(d, i) mean(d[i])
boot(data = Data, statistic = foo, R = 500, stype = "i")

The second problem comes from a diseased distribution for the stat of
interest. It might be cured with an appropriate syntax for the boot
call.

Best,

Renaud

Juan Ramon Gonzalez wrote:
> 
> Hello R-users,
> 
> I'm using the boot's library. I have two questions:
> 
> 1. I execute for example
> 
>                     data<-rnorm(100)
>                     boot(data,mean,500)
> 
> and I obtain 500 equal bootstrap samples of data. Why?
> 
> 2. I need to calculate the bootstrap confidence intervals for a statistic,
> but when I use the function boot.ci it shows the error message:
> 
>        Error in if (!all(rk > 1 & rk < R)) warning("Extreme Order Statistics
> used as Endpoi...
> 
> What is happening?
> 
> Thank you,
> 
> Juan
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
Dr Renaud Lancelot, vétérinaire
CIRAD, Département Elevage et Médecine Vétérinaire (CIRAD-Emvt)
Programme Productions Animales
http://www.cirad.fr/presentation/programmes/prod-ani.shtml

ISRA-LNERV                      tel    (221) 832 49 02
BP 2057 Dakar-Hann              fax    (221) 821 18 79 (CIRAD)
Senegal                         e-mail renaud.lancelot at cirad.fr
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list