Estimates the required sample size so that the confidence interval width for SCR does not exceed a specified limit.
Usage
sample_s(
SCR,
RL,
SRR,
ages,
A_max,
limits,
max_iter = 10000,
conf.level = 0.95,
method = "asymptotic"
)
Arguments
- SCR
Seroconversion rate.
- RL
Desired relative width.
- SRR
Seroreversion rate.
- ages
Vector with the proportions of different ages in the population (age structure).
- A_max
Maximum age considered in the population.
- limits
Lower and upper limits for the calculation of
SCR
.- max_iter
Maximum number of iterations.
- conf.level
Confidence level (default is 0.95).
- method
Method for calculating the confidence interval. Available methods: "waldcc" and the methods in IC_SP documentation.
Value
A list with the required sample size, the confidence interval for
seroprevalence, and the confidence interval for SCR
.