View source: R/ci_1pop_general.R
ci_1pop_general | R Documentation |
Confidence interval for a population mean (general case)
ci_1pop_general(x, conf_level = 0.95, type = "two.sided", na.rm = F)
x |
a (non-empty) numeric vector. |
conf_level |
confidence level of the returned confidence interval. Must be a single number between 0 and 1. |
type |
a character string specifying the type of confidence interval. Must be one of "two.sided" (default), "right" or "left". |
na.rm |
a logical value indicating whether |
"lower_ci" and "upper_ci" are computed using the t.test
function.
A 1 x 3 tibble with 'lower_ci', 'upper_ci', and 'conf_level' columns. Values correspond to the lower and upper bounds of the confidence interval, and the confidence level, respectively.
x <- rpois(1000, lambda = 10)
ci_1pop_general(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.