Article

A new web application for determining sample size in freedom-from-disease testing with imperfect tests

Details

Citation

Green D (2025) A new web application for determining sample size in freedom-from-disease testing with imperfect tests. Preventive Veterinary Medicine, 235, Art. No.: 106397. https://doi.org/10.1016/j.prevetmed.2024.106397

Abstract
Veterinary surveillance frequently requires study design for freedom-from-disease testing, specifying a sample size to balance higher statistical power with larger sample sizes against increased research and ethics costs, with the recognition that tests can generate false positive and negative results: i.e., tests exhibit imperfect sensitivity and specificity. In this paper, we revisit the mathematics behind exact calculations of sample size in terms of the binomial and hypergeometric distributions, and present a new algorithm – implemented and available to use in R as a Shiny application with a graphical user interface – to determine sample size for practical situations. Often, sample size calculations are based upon simulations or approximations, but we show here that exact calculations are feasible. In addition, we relax the liberal assumption – which provides conservative sample-size estimates – that sensitivity and specificity are known exactly, and instead assume both are Beta distributed with known hyperparameters. The application presented here was originally designed as a learning tool for students and is now made available for wider use.

Keywords
Diagnostic test; Epizootiology; Epidemiology; Sampling; Sample size

Journal
Preventive Veterinary Medicine: Volume 235

StatusPublished
Publication date28/02/2025
Publication date online31/12/2024
Date accepted by journal29/11/2024
URLhttp://hdl.handle.net/1893/36741
PublisherElsevier BV
ISSN0167-5877