reg_bootstrap {exactamente}R Documentation

Regular Bootstrap with Summary Statistics

Description

Performs a regular bootstrap to generate a distribution of sample statistics and computes a set of summary statistics: mode, median, mean, standard deviation, and lower and upper confidence intervals.

Usage

reg_bootstrap(
  data,
  n_bootstraps = 10000,
  anon = function(x) (mean(x)),
  lb = 0.025,
  ub = 0.975,
  density_args
)

Arguments

data

A numeric vector of data points.

n_bootstraps

An integer indicating the number of bootstrap samples to generate. Default is 10000.

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

Additional arguments to be passed to density function.

Value

A list with two elements:

See Also

plot.regboot, summary.regboot

Examples

set.seed(123)
data <- rnorm(5)
result <- reg_bootstrap(data)
result$stats

[Package exactamente version 0.1.1 Index]