bcapar {bcaboot}R Documentation

Compute parametric bootstrap confidence intervals

Description

bcapar computes parametric bootstrap confidence intervals for a real-valued parameter theta in a p-parameter exponential family. It is described in Section 4 of the reference below.

Usage

bcapar(
  t0,
  tt,
  bb,
  alpha = c(0.025, 0.05, 0.1, 0.16),
  J = 10,
  K = 6,
  trun = 0.001,
  pct = 0.333,
  cd = 0,
  func
)

Arguments

t0

Observed estimate of theta, usually by maximum likelihood.

tt

A vector of parametric bootstrap replications of theta of length B, usually large, say B = 2000

bb

A B by p matrix of natural sufficient vectors, where p is the dimension of the exponential family.

alpha

percentiles desired for the bca confidence limits. One only needs to provide alpha values below 0.5; the upper limits are automatically computed

J, K

Parameters controlling the jackknife estimates of Monte Carlo error: J jackknife folds, with the jackknife standard errors averaged over K random divisions of bb

trun

Truncation parameter used in the calculation of the acceleration a.

pct

Proportion of "nearby" b vectors used in the calculation of t., the gradient vector of theta.

cd

If cd is 1 the bca confidence density is also returned; see Section 11.6 in reference Efron and Hastie (2016) below

func

Function \hat{\theta} = func(b). If this is not missing then output includes abc estimates; see reference DiCiccio and Efron (1992) below

Value

a named list of several items:

References

DiCiccio T and Efron B (1996). Bootstrap confidence intervals. Statistical Science 11, 189-228

T. DiCiccio and B. Efron. More accurate confidence intervals in exponential families. Biometrika (1992) p231-245.

Efron B (1987). Better bootstrap confidence intervals. JASA 82, 171-200

B. Efron and T. Hastie. Computer Age Statistical Inference. Cambridge University Press, 2016.

B. Efron and B. Narasimhan. Automatic Construction of Bootstrap Confidence Intervals, 2018.

Examples

data(diabetes, package = "bcaboot")
X <- diabetes$x
y <- scale(diabetes$y, center = TRUE, scale = FALSE)
lm.model <- lm(y ~ X - 1)
mu.hat <- lm.model$fitted.values
sigma.hat <- stats::sd(lm.model$residuals)
t0 <- summary(lm.model)$adj.r.squared
y.star <- sapply(mu.hat, rnorm, n = 1000, sd = sigma.hat)
tt <- apply(y.star, 1, function(y) summary(lm(y ~ X - 1))$adj.r.squared)
b.star <- y.star %*% X
set.seed(1234)
bcapar(t0 = t0, tt = tt, bb = b.star)

[Package bcaboot version 0.2-3 Index]