A very fast implementation of the basic nonparametric bootstrap for obtaining confidence limits for the population mean without assuming normality.
ci_mean_boot( y, conf_level = 0.95, repetitions = 2000, na.rm = TRUE, resampled_means = FALSE, return_df = TRUE )
y | (numeric) A numeric vector from which |
---|---|
conf_level | (number) Confidence level. Number from 0 to 1. Default 0.95. |
repetitions | (integer) Number of bootstrap resamples. |
na.rm | (logical) If |
resampled_means | (logical) If |
return_df | (logical) If |
An object (data frame or matrix) with a point estimate and confidence interval of mean.
The function is based on code of function Hmisc::smean.cl.boot()
from package Hmisc.
#> mean lower upper conf_level repetitions #> 1 30.5 26.01625 34.66667 0.95 2000#> mean lower upper conf_level repetitions #> 1 10.40422 8.87088 11.84408 0.95 2000