| bootstrap_ci | R Documentation |
Resamples x with replacement R times, applies FUN to each resample,
and returns the percentile interval of the resampled statistics together
with the observed value.
bootstrap_ci(x, FUN = stats::median, R = 2000, conf.level = 0.95, seed = NULL)
x |
A numeric vector. |
FUN |
A function of one vector returning a single number. Defaults
to |
R |
Integer. Number of bootstrap resamples. Defaults to 2000. |
conf.level |
Confidence level. Defaults to 0.95. |
seed |
Integer or NULL. When supplied, sets the random seed so the interval is reproducible. |
A named numeric vector: estimate, lower, upper. The bounds
are NA when x has fewer than 3 finite values.
cohens_d_ci(), cramers_v_ci(), eta_sq_ci()
bootstrap_ci(mtcars$mpg, seed = 42)
bootstrap_ci(mtcars$mpg, FUN = mean, conf.level = 0.90, seed = 42)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.