# bootBCa

From rms v5.1-4
0th

Percentile

##### BCa Bootstrap on Existing Bootstrap Replicates

This functions constructs an object resembling one produced by the 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.

Keywords
bootstrap
##### Usage
bootBCa(estimate, estimates, type=c('percentile','bca','basic'),
n, seed, conf.int = 0.95)
##### Arguments
estimate

original whole-sample estimate

estimates

vector of bootstrap estimates

type

type of confidence interval, defaulting to nonparametric percentile

n

original number of observations

seed

.Random.seem in effect before bootstrap estimates were run

conf.int

confidence level

##### Value

a 2-vector if estimate is of length 1, otherwise a matrix with 2 rows and number of columns equal to the length of estimate

##### Note

You can use if(!exists('.Random.seed')) runif(1) before running your bootstrap to make sure that .Random.seed will be available to bootBCa.

boot.ci

• bootBCa
##### Examples
# 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 <!-- %*% coef(b) -->
ests <- t(X <!-- %*% t(b\$boot.Coef)) -->
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)
# }

Documentation reproduced from package rms, version 5.1-4, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.