[R] Bootstraping problem

Jesús María Frías Celayeta iosu at ensia.inra.fr
Mon Feb 22 18:52:16 CET 1999


Dear R users,

	I am trying to use the boot library to estimate confidence intervals
and i have found some problem. I am using 0.63.2 version in a linux machine
and i downloaded the latest version of the libraries from the CRAN site.
Unfortunately i cannot run the documentation example for boot.ci and as it
looks is some problem with the masking of the objects, but i might be missing
something. Is this a bug  or am i missing something? 

thanks in advance,

IOsu

P.D.: I add here the session log attempting to run the example from the
boot.ci documentation
> ls()
character(0)
> library(boot)

Attaching Package "package:boot":


	The following object(s) are masked from package:base :

	 model.response sample 

> help(boot)
> help(boot.ci)
>         data(aircondit)
>         mean.fun <- function(d, i)
+         {    m <- mean(d$hours[i])
+              n <- length(i)
+              v <- (n-1)*var(d$hours[i])/n^2
+              c(m, v)
+         }
>         air.boot <- boot(aircondit, mean.fun, R=999)
Error: 3 arguments passed to "sample" which requires 4.
>         boot.ci(air.boot, type=c("norm", "basic", "perc", "stud"))
Error: Object "air.boot" not found
>         data(city)
>         ratio <- function(d, w)
+              sum(d$x * w)/sum(d$u * w)
>         city.boot <- boot(city, ratio, R=999, stype="w",sim="ordinary")
Error: 3 arguments passed to "sample" which requires 4.
>         boot.ci(city.boot, conf=c(0.90,0.95),
+              type=c("norm","basic","perc","bca"))
Error: Object "city.boot" not found
> 



Jesús María Frías Celayeta
ENSIA-INRA, Av. des Olimpiades, 1
91744, Massy. FRANCE
Fax:intl+33+1+69935185
Phone:intl+33+1+69935191
"Pinky, what arrrrre we gonna do tomorrrrow?"
"Go and conquerrrr ze worrrrld, Brrrrain"



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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