boot_dist {boodd}R Documentation

Bootstrap Distribution

Description

This function computes the rescaled and recentered bootstrap distribution from a given bootstrap object. It optionally plots this distribution and superimposes a normal approximation for comparison.

Usage

boot_dist(
  boot_obj,
  comp = 1,
  PLT = TRUE,
  nn = TRUE,
  recenter = FALSE,
  return_values = FALSE
)

Arguments

boot_obj

A bootstrap object of type boodd, containing the bootstrap samples.

comp

A positive Integer; The index of the column of the bootstrap matrix to be plotted or analysed.

PLT

Logical. If TRUE (default), the function plots the distribution.

nn

Logical. If TRUE (default), a normal approximation is superimposed on the histogram.

recenter

Logical. If TRUE, the bootstrap distribution is recentered by the bootstrap mean, else if FALSE (default) it is recentered by the original value of the estimator.

return_values

Logical. If TRUE the function returns the calculated values for the rescaled and recentered distribution. FALSE by default.

Details

The function modifies the bootstrap distribution by recentering it, depending on value of recenter parameter and computes a standardized version of the selected component of the statistic. If PLT is TRUE, it generates a histogram of the standardized distribution with optional normal approximation overlay if nn is TRUE.

Value

A numeric vector representing the rescaled and optionally recentered bootstrap distribution of the selected component of the statistic.

References

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

See Also

plot.boodd.

Examples

n=30
X=rnorm(n)
fun = function(x){
c(mean(x), var(x))}
boo=boots(X, fun, B=999)
# Recentered, rescaled bootstrap distribution of the first component - mean
boot_dist(boo, comp=1, recenter = TRUE) 
# Rescaled bootstrap distribution of the first component - variance
boot_dist(boo, comp=2) 

[Package boodd version 0.1 Index]