Computes sample size, power, significance level or minimum AUC for ROC curves.
power.roc.test(. ) # One or Two ROC curves test with roc objects: ## S3 method for class 'roc' power.roc.test(roc1, roc2, sig.level = 0.05, power = NULL, kappa = NULL, alternative = c("two.sided", "one.sided"), reuse.auc=TRUE, method = c("delong", "bootstrap", "obuchowski"), . ) # One ROC curve with a given AUC: ## S3 method for class 'numeric' power.roc.test(auc = NULL, ncontrols = NULL, ncases = NULL, sig.level = 0.05, power = NULL, kappa = 1, alternative = c("two.sided", "one.sided"), . ) # Two ROC curves with the given parameters: ## S3 method for class 'list' power.roc.test(parslist, ncontrols = NULL, ncases = NULL, sig.level = 0.05, power = NULL, kappa = 1, alternative = c("two.sided", "one.sided"), . )
one or two “roc” object from the roc function.
a list of parameters for the two ROC curves test with Obuchowski variance when no empirical ROC curve is known:
binormal A parameter for ROC curve 1
binormal B parameter for ROC curve 1
binormal A parameter for ROC curve 2
binormal B parameter for ROC curve 2
correlation between the variables in control patients
correlation between the variables in case patients
the difference of AUC between the two ROC curves
For a partial AUC, the following additional parameters must be set:
Upper bound of FPR (1 - specificity) of ROC curve 1
Lower bound of FPR (1 - specificity) of ROC curve 1
Upper bound of FPR (1 - specificity) of ROC curve 2
Lower bound of FPR (1 - specificity) of ROC curve 2
number of controls and case observations available.
expected significance level (probability of type I error).
expected power of the test (1 - probability of type II error).
expected balance between control and case observations. Must be positive. Only for sample size determination, that is to determine ncontrols and ncases .
whether a one or two-sided test is performed.
if TRUE (default) and the “roc” objects contain an “auc” field, re-use these specifications for the test. See the AUC specification section for more details.
the method to compute variance and covariance, either “delong”, “bootstrap” or “obuchowski”. The first letter is sufficient. Only for Two ROC curves power calculation. See var and cov documentations for more details.
further arguments passed to or from other methods, especially auc (with reuse.auc=FALSE or no AUC in the ROC curve), cov and var (especially arguments method , boot.n and boot.stratified ). Ignored (with a warning) with a parslist .
An object of class power.htest (such as that given by power.t.test ) with the supplied and computed values.
If one or no ROC curves are passed to power.roc.test , a one ROC curve power calculation is performed. The function expects either power , sig.level or auc , or both ncontrols and ncases to be missing, so that the parameter is determined from the others with the formula by Obuchowski et al., 2004 (formulas 2 and 3, p. 1123).
For the sample size, ncases is computed directly from formulas 2 and 3 and ncontrols is deduced with kappa (defaults to the ratio of controls to cases). AUC is optimized by uniroot while sig.level and power are solved as quadratic equations.
power.roc.test can also be passed a roc object from the roc function, but the empirical ROC will not be used, only the number of patients and the AUC.
If two ROC curves are passed to power.roc.test , the function will compute either the required sample size (if power is supplied), the significance level (if sig.level=NULL and power is supplied) or the power of a test of a difference between to AUCs according to the formula by Obuchowski and McClish, 1997 (formulas 2 and 3, p. 1530–1531). The null hypothesis is that the AUC of roc1 is the same than the AUC of roc2 , with roc1 taken as the reference ROC curve.
For the sample size, ncases is computed directly from formula 2 and ncontrols is deduced with kappa (defaults to the ratio of controls to cases in roc1 ). sig.level and power are solved as quadratic equations.
The variance and covariance of the ROC curve are computed with the var and cov functions. By default, DeLong method using the algorithm by Sun and Xu (2014) is used for full AUCs and the bootstrap for partial AUCs. It is possible to force the use of Obuchowski's variance by specifying method="obuchowski" .
Alternatively when no empirical ROC curve is known, or if only one is available, a list can be passed to power.roc.test , with the contents defined in the “Arguments” section. The variance and covariance are computed from Table 1 and Equation 4 and 5 of Obuchowski and McClish (1997), p. 1530–1531.
Power calculation for unpaired ROC curves is not implemented.
The comparison of the AUC of the ROC curves needs a specification of the AUC. The specification is defined by:
If reuse.auc=FALSE the auc function will always be called with . to determine the specification, even if the “roc” objects do contain an auc field.
As well if the “roc” objects do not contain an auc field, the auc function will always be called with . to determine the specification.
Warning: if the roc object passed to roc.test contains an auc field and reuse.auc=TRUE , auc is not called and arguments such as partial.auc are silently ignored.
The authors would like to thank Christophe Combescure and Anne-Sophie Jannot for their help with the implementation of this section of the package.
Elisabeth R. DeLong, David M. DeLong and Daniel L. Clarke-Pearson (1988) “Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach”. Biometrics 44, 837–845.
Nancy A. Obuchowski, Donna K. McClish (1997). “Sample size determination for diagnostic accurary studies involving binormal ROC curve indices”. Statistics in Medicine, 16, 1529–1542. DOI: doi: 10.1002/(SICI)1097-0258(19970715)16:133.0.CO;2-H.
Nancy A. Obuchowski, Micharl L. Lieber, Frank H. Wians Jr. (2004). “ROC Curves in Clinical Chemistry: Uses, Misuses, and Possible Solutions”. Clinical Chemistry, 50, 1118–1125. DOI: doi: 10.1373/clinchem.2004.031823.
Xu Sun and Weichao Xu (2014) “Fast Implementation of DeLongs Algorithm for Comparing the Areas Under Correlated Receiver Operating Characteristic Curves”. IEEE Signal Processing Letters, 21, 1389–1393. DOI: doi: 10.1109/LSP.2014.2337313.
data(aSAH) #### One ROC curve #### # Build a roc object: rocobj