Figure 1. Power of the binomial test is not a monotonic function of sample size (p 0 = 0.5, pa = 0.4, alternative = ”left-sided”, Se = Sp = 1)
Unfortunately, the actual sample size of a study, despite the hardest efforts, may differ from the planned one, and non-monotonicity of power invalidates the simplest method of handling this “to play safe, add 10% to the calculated sample size”, which works well for continuous outcomes. Even though the saw-tooth pattern of the power function is well known, it is easy to find clinical trials still using this simple but risky method of handling potential drop-out patients (clinicaltrials.gov, NCT01693614 and NCT02844582). To avoid this trap, some authors recommend choosing the smallest n so that for each ≥ n the power is at least 80% (Chernick & Liu, 2002). However, if it can be ensured that the drop-out rate remains under a certain limit λ , say, under 5%, a smaller sample size than that is sufficient. Therefore, we propose a sample size procedure that searches for the minimal sample size n so that even in case of some drop-out, not exceeding the specified proportion λ , the power reaches the prescribed value. That is, for each sample sizem from (nλ ·n ) to n the power reaches the prescribed value, say 80%.
For the analyses, we prepared an R function that carries out the sample size calculation in case of known sensitivity and specificity of the diagnostic test used for the prevalence estimation. The function can compute sample size for five tests: Clopper-Pearson exact test, Wald-test, Wilson’s score test, Agresti-Coull-test, and Blaker’s exact test. It has an additional argument to specify the highest proportion of data loss λ (due to drop-out or other reasons), which still must not result in power less than the prescribed value. The function returns the minimal sample size n so that prescribed power is reached for each sample size from (nλ ·n ) to n . The function is available at GitHub:https://github.com/Ragnar0ss/.
We calculated sample sizes assuming a drop-out rate of λ =0.15, that is, power remains at least 80% up to 15% drop-out.
Table 1. Null and assumed true probabilities used in the study. Left- and right-sided tests were evaluated separately.