| prec_auc | R Documentation | 
Calculate the sample size from AUC, prevalence and confidence interval width or the expected confidence interval width from AUC, prevalence and sample size, following Hanley and McNeil (1982).
prec_auc(auc, prev, n = NULL, conf.width = NULL, conf.level = 0.95, ...)
| auc | AUC value. | 
| prev | prevalence. | 
| n | number of observations. | 
| conf.width | precision (the full width of the confidence interval). | 
| conf.level | confidence level. | 
| ... | other arguments to  | 
Sample size is derived by optimizing the difference between the difference
between the lower and upper limits of the confidence interval and
conf.width.
Object of class "presize", a list of arguments (including the computed one) augmented with method and note elements.
Hanley, JA and McNeil, BJ (1982) The Meaning and Use of the Area under a Receiver Operating Characteristic (ROC) Curve. Radiology 148, 29-36
# confidence interval width
N <- 500
prev <- .1
auc <- .65
(prec <- prec_auc(auc, prev, n = N))
cwidth <- prec$conf.width
# sample size
prec_auc(auc, prev, conf.width = cwidth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.