[R] Help Me to Adjust the R Code

alyaa wakf alyaawakf2002 at yahoo.com
Fri Jan 25 20:42:02 CET 2008


Hi,
   
  The following code, from Angelo Canty article on line "Resampling Methods in R: the boot Package, 2002",  works fine for Angelo Canty using  R 2.6.0 on Windows XP.   
  It also works for me using  R 1.2.1 and S-PLUS 2000 on  Windows XP after installing the S-PLUS  bootstrap library, with slight differences in my outputs.
      
  > library(boot)
> library(survival)
> set.seed(12345)
  > mel <- melanoma[melanoma$ulcer==1,]
  > mel$cens <- 1*(mel$status==1)
  > mel.cox <- coxph(Surv(time, status==1)~thickness,
  + data=mel)
  > mel.surv <- survfit(mel.cox)
  > mel.cens <- survfit(Surv(time-0.001*(status==1),status!=1)~1,
  + data=mel)
  > mel.fun <- function(d) {
  + cox <- coxph(Surv(time, status==1)~thickness,
  + data=d)
  + cox$coefficients}
  > mel.boot.con <- censboot(mel, mel.fun, R=999, sim="cond", 
  + F.surv=mel.surv, G.surv=mel.cens,
  + cox=mel.cox, index=c(1,8))
  > mel.boot.con
   
  CONDITIONAL BOOTSTRAP FOR CENSORED DATA


Call:
censboot(data = mel, statistic = mel.fun, R = 999, F.surv = mel.surv, 
    G.surv = mel.cens, sim = "cond", cox = mel.cox, index = c(1, 
        8))

Bootstrap Statistics :
      original     bias    std. error
t1* 0.09967665 0.03579701  0.04973614

  I want to apply the Fast bootstrap method from Salibian-Barrera and Zamar (2003) and  Salibian-Barrera, M., Van Aels, S. and Willems, G. (2007) to the previous example, i.e., to produce a confidence interval for the exponent of the coefficient of tumour thickness in the Melanoma dataset .  Moreover,  I want to compare the performance of the Fast bootstrap with that of the classical bootstrap, which requires of course computing power and time. How  I can adjust the previous code to do what I want. I asked Angelo Canty for helping me to do this, but he told me that he is afraid that he does not know anything about the Fast Bootstrap to which I refer. He suspects that one could force his boot package to do something like this but he is not sure if that would be possible through censboot or not.  Although my problem does seem interesting for him, he is afraid that he is not currently in a position to take on any new collaborations.  He remains available to answer any
 questions about the boot package itself as it is currently written, he just does not have the time to consider including new elements into the library at this time.   Salibian-Barrera and Zamar ( 2003) have studied in their paper the problem of estimating the distribution of statistics defined by estimating equations. In particular, they have considered two cases: robust regression estimates and quasi-likelihood estimates.Their approach applies in principle to the wider class of estimates defined by estimating equations. The Fast bootstrap povides an inference procedure that is notably faster than the classical bootstrap (where the estimating equations have to be fully solved for each bootstrap sample).  Salibian-Barrera and Zamar  simulation studies have shown that this Fast bootstrap method is more efficient and more robust to model departures. I think that the paper of Salibian-barrera and Zamar (2003) is not published till now.  Now I do not have an electronic copy of
 this paper draft but I have a hard copy. And so I attach with this message some written sections from this paper  "Fast and Stable Bootstrap Methods for Statistics Defined by Estimating Equations, Salibian-Barrera and Zamar  (2003)".  My  attachment also includes what I want to do, and what I suggest.
  I need the adjusted code bad. I hope you help me. If you can not help me, please guide me to anyone who can help me. Thank you in advance.
   
      Alyaa Mohammad El-wakf
  Assistant Lecturer
  Department of Applied Statistics and Insurance
  Faculty of Commerce 
  Mansoura University
  Egypt





       
---------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Microsoft Word - from Salibian-Barrera and	Zamar _2003_.pdf
Type: application/pdf
Size: 126173 bytes
Desc: 3921849207-Microsoft Word - from Salibian-Barrera and
	Zamar _2003_.pdf
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080125/c68c1e3d/attachment.pdf 


More information about the R-help mailing list