calculate_ci | R Documentation |
The CI calculations use the smean.cl.normal
and
smean.cl.boot
functions from the Hmisc package that
were developed by Frank Harrell. These functions are also used internally by
ggplot2.
calculate_ci(x, level = 0.95, method = "standard", n_samples = 1000)
x |
Numeric vector. |
level |
Confidence interval to calculate. This is a decimal, i.e., 0.95 is the 95 % CI. |
method |
Method to use for CI calculation. Can be one of two methods:
|
n_samples |
When method is |
A tibble with one row.
Stuart K. Grange and Frank Harrell.
calculate_quantiles
, calculate_range
# Calculate confidence intervals
x <- c(44617L, 7066L, 17594L, 2726L, 1178L, 18898L, 5033L, 37151L, 4514L, 4000L)
calculate_ci(x)
calculate_ci(x, level = 0.9)
calculate_ci(x, method = "bootstrap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.