ssize.auc.ci | R Documentation |
Compute sample size, power, delta, or significance level of a diagnostic test for an expected AUC.
ssize.auc.ci(AUC = NULL, delta = NULL, n = NULL, sig.level = 0.05,
power = NULL, prev = NULL, NMAX = 1e4)
AUC |
Expected AUC. |
n |
Total sample size (number of cases + number of controls). |
delta |
|
sig.level |
Significance level (Type I error probability) |
power |
Assurance probability of confidence interval (1 minus Type II error probability) |
prev |
Expected prevalence, if |
NMAX |
Maximum sample size considered. |
Exactly one of the parameters n
, delta
, sig.level
,
and power
must be passed as NULL
, and that parameter is determined
from the others. Notice that sig.level
has a non-NULL
default
so NULL
must be explicitly passed if you want to compute it.
The computations use the variance of the AUC derived by Hanley and McNeil (1982) and incorporate an additional assurance probability (power) as in the approach of Flahault et al. (2005).
As noted in Chu and Cole (2007) power is not a monotonically increasing
function in n but rather saw toothed (see also Chernick and Liu (2002)).
Hence, in our calculations we use the more conservative approach II);
i.e., the minimum sample size n
such that the actual power is
larger or equal power
andsuch that for any sample size larger
than n
it also holds that the actual power is larger or equal
power
.
Object of class "power.htest"
, a list of the arguments
(including the computed one) augmented with method
and
note
elements.
uniroot
is used to solve the equations for unknowns, so
you may see errors from it, notably about inability to bracket the
root when invalid arguments are given.
Matthias Kohl Matthias.Kohl@stamats.de
A. Flahault, M. Cadilhac, and G. Thomas (2005). Sample size calculation should be performed for design accuracy in diagnostic test studies. Journal of Clinical Epidemiology, 58(8):859-862.
J.A. Hanley, B.J. McNeil (1982). The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143(1):29-36.
uniroot
## compute n
ssize.auc.ci(AUC = 0.9, delta = 0.05, power = 0.8)
## compute delta
ssize.auc.ci(AUC = 0.9, n = 254, power = 0.8)
## compute power
ssize.auc.ci(AUC = 0.9, n = 254, delta = 0.05)
## compute sig.level
ssize.auc.ci(AUC = 0.9, n = 254, delta = 0.05, power = 0.8, sig.level = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.