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 |
comp |
A positive Integer; The index of the column of the bootstrap matrix to be plotted or analysed. |
PLT |
Logical. If |
nn |
Logical. If |
recenter |
Logical. If |
return_values |
Logical. If |
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
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)