conf_interval_width | R Documentation |
Calculate the width of a confidence interval given a standard error and sample size. Based on the t distribution.
conf_interval_width(se, n = Inf, confidence_level = 0.95, single_arm = T)
se |
(numeric scalar) The standard error. |
n |
(numeric scalar) The sample size. Defaults to Inf. |
confidence_level |
(numeric scalar) The confidence level. Defaults to .95. |
single_arm |
(logical scalar) Whether to calculate the width for a single arm. Defaults to TRUE. |
The width of the confidence interval.
conf_interval_width(1) #about 1.96
conf_interval_width(1, confidence_level = .99) #about 2.58
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.