Abstract

1 Introduction
A major issue that researchers face when planning prospective studies to evaluate the accuracy of diagnostic tests is that they do not know beforehand how many participants will have the disease or not. A complicating factor is that the required sample size needed to produce a given power is highly dependent on the prevalence of the disease in the population under study. When the prevalence is low, an immense sample size (possibly in the tens of thousands) may be required to net sufficiently many diseased participants to ensure that adequate power is achieved (Li and Fine 2004; Obuchowski and Zhou 2002).
Stata’s official
To account for the known prevalence of disease in studies evaluating sensitivity, one uses
In the following sections, I describe how to use Stata’s official
2 One-sample proportion test
During development of a new diagnostic test, the usual goal is simply to determine whether the diagnostic test can discriminate between those with and without the disease. Commonly, this is evaluated using a one-sample proportion test (see [R]
2.1 Sensitivity
Let’s assume there is a rare disease (3% prevalence in the population) that currently requires an expensive lab test for diagnosis and achieves a sensitivity of 70%. We developed a new diagnostic test that can be administered by the patient themselves at a fraction of the cost of the lab test and is expected to have a better sensitivity and specificity profile. For our prospective study of the new diagnostic test, we will determine sample size for a sensitivity of 90% at an alpha of 0.05 with 80% power using a one-sided test. Using
The estimated sample size of 25.3 refers to the number of diseased participants needed for the study. We derive the total sample size by dividing the sample size for the diseased group by the prevalence of disease in the population, nT = n 1 /p:
The total estimated sample size is 867. Subtracting the expected sample size for the diseased group from the total sample size gives us the expected sample size of the nondiseased group, n 0 = nT − n 1 = 841.
We can also easily evaluate the actual power of this test by specifying the option
As the output indicates, the true power of the test is 81.24%.
2.2 Specificity
Following from the above example, let’s assume that the currently available test has a specificity of 85%. Using
Here the estimated sample size of 135.77 refers to the number of nondiseased participants (n 0) needed for the study. We derive the total expected sample size as nT = n 0 /(1 − p) and the sample size of the diseased group as n 1 = nT − n 0:
As displayed, the total estimated sample size needed for the study is 140, where we expect that 4 participants will have the disease and 136 will not have the disease. The power of the test can be computed by specifying
3 Two-sample proportion test for independent samples
In many studies, investigators are interested in comparing the accuracies of two diagnostic tests. While a paired-sample design is preferred because it requires fewer patients than the independent two-sample design, in some circumstances a paired design is not possible; for example, the tests are mutually exclusive because of their invasiveness, or it is unethical to expose patients to both tests’ risk of complications or discomfort, or there are time constraints on treatment that do not allow more than one test to be performed (Zhou, Obuchowski, and McClish 2011). Commonly, these tests are evaluated using a two-sample proportion test (see [R]
3.1 Sensitivity
Let’s assume there is an existing diagnostic test to detect a disease with 30% prevalence in the clinical population with 81% sensitivity. We have a new test that we believe can diagnose the disease with 90% sensitivity. For our prospective study, we will compare the sensitivity of the new test with the existing test using an independent two-sample approach, where half the participants will be assigned to diagnostic test 1 and half will be assigned to diagnostic test 2. We compute sample size using
The estimated sample size of 478.16 refers to the number of participants expected to have the disease—with half of them assigned to diagnostic test 1 and half of them assigned to diagnostic test 2. As before, nT = n 1 /p and n 0 = nT − n 1:
The output shows that the required total sample size is 1,597 (half assigned to diagnostic test 1 and half assigned to diagnostic test 2) with the expectation that 1,118 of the participants will be nondiseased.
3.2 Specificity
Following with the example above for sensitivity, let’s assume that the specificity of the existing diagnostic test is 82% and we believe that the new test will elicit a specificity of 92%. All the other specifications remain the same:
The results show an estimated total sample size of 504, with an expectation that 353 participants will be nondiseased and 151 will have the disease.
4 Paired two-sample test
In a paired design, the same patients undergo all the tests being evaluated in the study. As with the independent two-sample test, the null hypothesis states that the sensitivities (specificities) of the two tests are equal, while the alternative hypothesis is that the two sensitivities (specificities) differ. Commonly, these tests are evaluated using McNemar’s χ
2 test (see [R]
4.1 Sensitivity
Let’s assume there is an existing diagnostic test that has a sensitivity of 85% to detect a disease with 20% prevalence in the population under study. We developed a new diagnostic test that is less expensive than the existing test, and we believe it may achieve a sensitivity of 95%. We want to design a paired, prospective study in which each participant will be given both the old and the new diagnostic tests. To assess the sample size needed for this study, we require 90% power and a two-tailed alpha level of 0.01. To compute the minimum sample size using
The output shows that the expected number of diseased participants is 154.45. We now compute nT = n 1 /p and n 0 = nT − n 1:
In summary, to achieve the desired 90% power at an alpha of 0.01, we need to enroll at least 775 participants, of which we expect that 155 will have the disease and 620 will be disease free.
4.2 Specificity
In our study described above, we assume that the existing diagnostic test has a specificity of 88% and the new diagnostic test will achieve a specificity of 92%:
The output indicates we should expect 856.56 nondiseased participants in our sample. We compute nT = 1071 and n 1 = 214. (I leave it to the reader to perform the computations!)
5 Conclusion
In prospective diagnostic accuracy studies, the total estimated sample size must be adjusted by the prevalence of disease to account for the uncertainty in the number and mix of diseased and nondiseased participants likely to be recruited. In this Stata tip, I described in detail how to use Stata’s official
