CI_from_proportions {metaHelper} | R Documentation |
Confidence Interval for Proportions
Description
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.
Usage
CI_from_proportions(events, n, method = "Clopper-Pearson")
Arguments
events |
number of events |
n |
sample size |
method |
the method ("Clopper-Pearson", "Agresti-Coull", "Wilson") that should be used to calculate the confidence intervals. |
Value
List of confidence interval of proportions if input length > 1. If input length = 1 Lower CI and Upper CI.
References
Confintr Function Description Stackoverflow Method Discussion
Examples
# CI for 9 events in a sample of 10
CI_from_proportions(9, 10)
[Package metaHelper version 1.0.0 Index]