This study aimed to formulate a new R function to improve sample size calculation for more accurate estimations of sensitivity (Se) and specificity (Sp).
The developed function is based on the binDesign function of the binGroup R package. This allowed the use of an “exact” method based on the binomial distribution. In addition, the function takes into account a joint testing of Se and Sp and a nonmonotonous behavior of the power function.
Four tables were generated to display the number of cases (or controls) in joint or separate assessments for an expected combination of Se (or Sp) and a determined difference between the expected Se (or Sp) and the minimum acceptable Se (or Sp). Using the formula for a joint testing of Se and Sp, it resulted in a higher increase of the sample sizes than simply allowing for the sawtooth shape of the power curve.
Whenever equal Se and Sp values are important, a joint testing should be favored and used for sample size determination.