View source: R/CI_from_proportions.R
CI_from_proportions | R Documentation |
Calculates a confidence interval for proportions. For a discussion on the differences between methods to calculate confidence intervals, see the Stack Overflow discussion under References. This method uses the R package "confintr" to calculate the confidence intervals.
CI_from_proportions(events, n, method = "Clopper-Pearson")
events |
number of events |
n |
sample size |
method |
the method ("Clopper-Pearson", "Agresti-Coull", "Wilson") that should be used to calculate the confidence intervals. |
List of confidence interval of proportions if input length > 1. If input length = 1 Lower CI and Upper CI.
Confintr Function Description Stackoverflow Method Discussion
# CI for 9 events in a sample of 10
CI_from_proportions(9, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.