Diagdesigndta: A Bilingual R Package for Sample Size Calculation and Expected Precision in Diagnostic Accuracy Studies
Background: Diagnostic accuracy studies require adequate sample sizes for the measures they intend to estimate. Existing calculators differ in their design inputs, interval methods, and reporting interfaces. Objective: To present diagDesignDTA, a bilingual R package for calculating sample size and expected precision for sensitivity, specificity, and the area under the receiver operating characteristic curve (AUC), including recruitment planning for multiple markers measured in the same participants. Methods: The package uses Wald approximations for sensitivity and specificity, the Hanley–McNeil variance for a single AUC, and the log-delta method for likelihood ratios. Sensitivity and specificity calculations support prevalence-based and diagnostic case–control designs. AUC calculations use a control-to-case ratio or fixed group counts. We verified the five exported functions against published examples and independent calculations in R. Results: Version 0.2.1 passed all 162 numerical checks. The package reproduced the published AUC standard error of 0.0437 and positive likelihood ratio of 3.75 (95% confidence interval 3.32–4.24). Different rounding rules gave totals of 1,255 in a published sensitivity example and 1,260 in diagDesignDTA. The package provides summaries in English and Spanish. Conclusions: diagDesignDTA provides a bilingual workflow for selecting recruitment targets and assessing the expected precision of diagnostic accuracy measures. Its outputs help researchers document their assumptions and justify their sample size in a study protocol.
Authors
- Víctor Juan Vera-Ponce (ORCID: https://orcid.org/0000-0003-4075-9049)
- Jhosmer Ballena-Caicedo (ORCID: https://orcid.org/0009-0002-7070-7434)
Institutions
- National University Toribio Rodríguez de Mendoza (PE)
Publication Details
- Journal
- International Journal of Statistics in Medical Research
- Published
- 2026-12-01
- DOI
- https://doi.org/10.6000/1929-6029.2026.15.57
- Primary Topic
- Statistical Methods in Epidemiology
- Type
- article
- Field-Weighted Citation Impact
- 0.00