confint.boodd {boodd}R Documentation

Calculate Confidence Intervals for boodd Objects.

Description

Calculates confidence intervals for an object of class boodd returned by bootstrap functions such as boots, bootsemi, blockboot, regenboot, etc.

Usage

## S3 method for class 'boodd'
confint(
  object,
  parm = NULL,
  level = 0.95,
  method = c("perc", "bperc", "aboot", "tboot", "tsymboot", "all"),
  recenter,
  ...
)

Arguments

object

An object of class boodd.

parm

Not used. Included for consistency with the generic confint() function.

level

Confidence level. Default is 0.95.

method

Method used to build the confidence interval. Choices include: * perc - percentile, * bperc - basic percentile, * aboot - asymptotic bootstrap, * tboot - bootstrap-t, * tsymboot - symmetric bootstrap-t, * all - all the previous methods. Default is perc.

recenter

Logical. If TRUE it centers the intervals around the mean value of the bootstrap samples. Relevant only for tboot or tsymboot methods. By default it equals FALSE unless the attribute kind of object boodd is block.

...

Optional additional arguments.#' @details This function provides confidence intervals using several methods, see Efron and Tibshirani (1993), Bertail and Dudek (2025) for description. The tboot and tsymboot methods require the function to which the bootstrap method is applied to return an even number of values corresponding to parameter estimates (first k columns for the parameter of size k) and their variances (columns (k+1) to 2k).

Value

If the method argument is not all, the function confint.boodd returns a two-column matrix representing the lower and upper bounds of the interval. Each row of the matrix corresponds to the variable to which the interval applies. The default value of the method argument is perc. If the method argument is all, the function confint.boodd returns a list with the confidence intervals for all supported methods.

References

Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.

Efron, B., Tibshirani, R. (1993). An Introduction to the Bootstrap, Chapman and Hall.

See Also

plot.boodd,summary.boodd.

Examples

B <- 299
x <- round(rnorm(15),3)
boo1 <- boots(x,mean,B)
confint(boo1)
confint(boo1,method="bperc")

# bootstrap of several statistics 
mv <- function(data) {c(mean(data),var(data)/length(data))} # compute both mean and variance
boo2 <- boots(x,mv,B)
# Compute both percentile and t-percentile confidence intervals when variance is bootstrapped
confint(boo2,method="all")

[Package boodd version 0.1 Index]