[R] Package "boot": How to construct CI from censboot object?

From: abdul kudus <abdul.kudus_at_gmail.com>
Date: Mon 19 Dec 2005 - 22:48:57 EST


Dear all,

I run the example of "censboot" contained in "boot" package. But, I can't find the confidence interval of the resulted "censboot" object. Any idea ?

> aml.fun <- function(data) {

+           surv <- survfit(Surv(time, cens)~group, data=data)
+           out <- NULL
+           st <- 1
+           for (s in 1:length(surv$strata)) {
+                inds <- st:(st+surv$strata[s]-1)
+                md <- min(surv$time[inds[1-surv$surv[inds]>=0.5]])
+                st <- st+surv$strata[s]
+                out <- c(out,md)
+           }
+           out
+      }

> aml.case <- censboot(aml,aml.fun,R=499,strata=aml$group)

> aml.case

STRATIFIED CASE RESAMPLING BOOTSTRAP FOR CENSORED DATA Call:
censboot(data = aml, statistic = aml.fun, R = 499, strata = aml$group)

Bootstrap Statistics :

    original bias std. error

t1*       31       Inf         NaN
t2*       23 -2.501002     8.67887


> aml.ci <- boot.ci(aml.case,conf=c(0.90,0.95),type="all")
Error in if (stype == "w") type <- "inf" else if (!is.null(boot.out) && :

        argument is of length zero

regards,

abdul kudus
INSPEM - UPM
Malaysia

        [[alternative HTML version deleted]]



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 Mon Dec 19 22:54:38 2005

This archive was generated by hypermail 2.1.8 : Tue 20 Dec 2005 - 02:30:29 EST