Bug? bcajack & backjack2 produce different results using different inputs
t-pollington opened this issue · 1 comments
t-pollington commented
Dear @bnaras,
Is it correct that bcajack
should produce slightly different results compared to bcajack2
? Using the code below gives a difference in the 95% BCa CIs, ie [0.435, 0.562] & [0.421, 0.554], respectively.
Kind regards and thanks for producing this package, Tim.
data(diabetes, package = "bcaboot")
Xy <- cbind(diabetes$x, diabetes$y)
rfun <- function(Xy) {
y <- Xy[, 11]
X <- Xy[, 1:10]
summary(lm(y~X) )$adj.r.squared
}
set.seed(1234)
bcajack(x = Xy, B = 1000, func = rfun, m = 34, verbose = FALSE)
set.seed(1234)
bcajack2(x = Xy, B = 1000, func = rfun, m = 34, verbose = FALSE)
t-pollington commented
Please ignore. Since in your paper it says:
"Our programs bcajack2
and bcapar
use a different estimate of a based directly on bootstrap replications (see the Appendix)"
and
"Bcajack2
instead uses a regression estimate for \dotabove{τ} and \hat{a}, analogous to that in bcapar
"