exact_bootstrap {exactamente}R Documentation

Performs an Exact Bootstrap with Summary Statistics

Description

Performs an exact bootstrap method on small datasets and returns a set of summary statistics. This function implements a popular variant of exact bootstrapping where the total number of combinations is expressed as N^N (i.e., the vector c(1 ,2, 7) has 3^3 = 27 combinations rather than the 10 combinations obtained from exact case bootstrapping), giving more weight to a resample with larger variation, thus potentially increasing the bootstrap estimate's accuracy. This technique is described in Kisielinska (2013).

Usage

exact_bootstrap(
  data,
  check_size = TRUE,
  anon = function(x) (mean(x)),
  lb = 0.025,
  ub = 0.975,
  density_args
)

Arguments

data

A numeric vector of data points.

check_size

A logical value indicating whether to check if the size of the dataset is less than 10. Default is TRUE.

anon

A function to compute the sample statistic for each bootstrap sample. Default is the mean function.

lb

Lower bound for the confidence interval. Default is 0.025.

ub

Upper bound for the confidence interval. Default is 0.975.

density_args

Pass additional arguments to stats::density

Value

A list with two elements:

References

Kisielinska, J. (2013). The exact bootstrap method shown on the example of the mean and variance estimation. Computational Statistics, 28, 1061–1077. doi:10.1007/s00180-012-0350-0

See Also

plot.extboot, summary.extboot

Examples

set.seed(123)
data <- rnorm(5)
result <- exact_bootstrap(data)
summary(result)
plot(result)

[Package exactamente version 0.1.1 Index]