ssize.auc.ci: Sample Size Calculations for AUC

View source: R/ssizeAUCCI.R

ssize.auc.ciR Documentation

Sample Size Calculations for AUC

Description

Compute sample size, power, delta, or significance level of a diagnostic test for an expected AUC.

Usage

ssize.auc.ci(AUC = NULL, delta = NULL, n = NULL, sig.level = 0.05,
             power = NULL, prev = NULL, NMAX = 1e4)

Arguments

AUC

Expected AUC.

n

Total sample size (number of cases + number of controls).

delta

AUC-delta is used as lower confidence limit

sig.level

Significance level (Type I error probability)

power

Assurance probability of confidence interval (1 minus Type II error probability)

prev

Expected prevalence, if NULL prevalence is ignored which means prev = 0.5 is assumed.

NMAX

Maximum sample size considered.

Details

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); see also Kohl and Muench (2024).

Value

Object of class "power.htest", a list of the arguments (including the computed one) augmented with method and note elements.

Note

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.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

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.

M. Kohl, F. Muench (2024). Statistik Teil 12: Fallzahlplanung. Die Perfusiologie, 2024(4):124-127.

See Also

uniroot

Examples

## 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)

MKpower documentation built on Sept. 9, 2025, 5:37 p.m.