## EXAMPLE 1 (from Hajian-Tilaki 2014, p 195):
## A new diagnostic test has been developed and we'd like to conduct a study
## to determine its diagnostic sensitivity which we believe should be in the
## order of 0.80. How many subjects should be enrolled if the prevalence of
## the disease outcome of interest is 0.10 and we'd like to be 95% confident
## that our estimate of sensitivity is within 0.07 of the true population
## value? For this example we want to estimate diagnostic sensitivity (only)
## so the estimated performance measure for specificity is set to NA.
epi.ssdxsesp(se = 0.80, sp = NA, Py = 0.10, epsilon = 0.07,
error = "absolute", nfractional = FALSE, conf.level = 0.95)
## A total of 1255 subjects need to be enrolled to meet the requirements of the
## study.
## EXAMPLE 2 (from van Hal et al. 2025):
## van Hal et al (2025) determined targets for ceftriaxone resistance detection
## in Neisseria gonorrhoeae based on genotype-phenotype. To estimate
## diagnostic testing performance with high precision [sic], a sample size
## of 8295 distinct MIC-geonotype pairings was required, to achieve a
## sensitivity and specificity of 95%, based on a ceftriaxone resistance
## prevalence of 0.22% --- a value reflecting current rates in high-income
## settings with robust surveillance systems.
## Code to reproduce the sample size calculations reported in the van Hal
## et al. (2025) paper as follows:
epi.ssdxsesp(se = 0.95, sp = 0.95, Py = 0.0022, epsilon = 0.10,
error = "absolute", nfractional = FALSE, conf.level = 0.95)
Run the code above in your browser using DataLab