jkropko / coxed

Duration-Based Quantities of Interest and Simulation Methods for the Cox Proportional Hazards Model
23 stars 6 forks source link

Suspected error in bca() function #16

Open stepls opened 2 years ago

stepls commented 2 years ago

Hello there,

after reading DiCiccio and Efron's 1996 paper about the bias-corrected and accelerated bootstrap, I suspect line 51 to be erroneous. U <- (sims - 1) * (mean(theta, na.rm=TRUE) - theta)

In the original paper (equation 6.7), it's not the i-th element in theta that has to be substracted from the mean, but rather the mean of theta when excluding the i-th element. If I am not mistaken, in this specific application, this error leads to the acceleration constant a having the wrong sign.

With kind regards, stepls