one_mean_CI | R Documentation |
This function will create a bootstrap confidence interval for a single mean or median of a quantitative variable.
one_mean_CI(
data,
summary_measure = "mean",
confidence_level = 0.95,
number_repetitions = 100
)
data |
Vector of quantitative data values. |
summary_measure |
Name of summary measure to return from simulations.
Allowed values are |
confidence_level |
Confidence level for interval in decimal form.
Defaults to |
number_repetitions |
Number of bootstrapped resamples. |
Returns plot of distribution of bootstrapped statistics, with values as or more extreme than percentile confidence interval range highlighted, and reports confidence interval as subtitle on plot.
set.seed(117)
x <- rnorm(25)
m <- mean(x)
one_mean_CI(x,
summary_measure = "mean",
number_repetitions = 100,
confidence_level = 0.95
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.