Calculates the confidence interval for a seroprevalence estimate with a specified confidence level.
Usage
IC_SP(SP, n, conf.level = 0.95, method = "asymptotic")
Arguments
- SP
Seroprevalence estimate.
- n
Sample size.
- conf.level
Confidence level (default is 0.95).
- method
Method for calculating the confidence interval (default is "asymptotic"). Available methods: c("asymptotic","exact","ac","wilson","logit","cloglog")
Value
A vector with the lower and upper limits of the confidence interval.
Examples
IC_SP(0.25, 100, conf.level = 0.95, method = "asymptotic")
#> [1] 0.1651311 0.3348689