Learn R Programming

RCMsize (version 1.0.1)

IC_SP: Confidence Interval for Seroprevalence

Description

Calculates the confidence interval for a seroprevalence estimate with a specified confidence level.

Usage

IC_SP(SP, n, conf.level = 0.95, method = "asymptotic")

Value

A vector with the lower and upper limits of the confidence interval.

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")

References

The methods available in this function are some of the available in the binom package. For more information, see https://CRAN.R-project.org/package=binom

Examples

Run this code
IC_SP(0.25, 100, conf.level = 0.95, method = "asymptotic")

Run the code above in your browser using DataLab