boot
package's boot
function, and runs that package's
boot.ci
function to compute BCa and percentile confidence limits.
bootBCa
can provide separate confidence limits for a vector of
statistics when estimate
has length greater than 1. In that
case, estimates
must have the same number of columns as
estimate
has values.
bootBCa(estimate, estimates, type=c('percentile','bca','basic'), n, seed, conf.int = 0.95)
.Random.seem
in effect before bootstrap estimates
were runestimate
is of length 1, otherwise a matrix
with 2 rows and number of columns equal to the length of
estimate
boot.ci
## Not run:
# x1 <- runif(100); x2 <- runif(100); y <- sample(0:1, 100, TRUE)
# f <- lrm(y ~ x1 + x2, x=TRUE, y=TRUE)
# seed <- .Random.seed
# b <- bootcov(f)
# # Get estimated log odds at x1=.4, x2=.6
# X <- cbind(c(1,1), x1=c(.4,2), x2=c(.6,3))
# est <- X
# ests <- t(X
# bootBCa(est, ests, n=100, seed=seed)
# bootBCa(est, ests, type='bca', n=100, seed=seed)
# bootBCa(est, ests, type='basic', n=100, seed=seed)
# ## End(Not run)
Run the code above in your browser using DataLab