Because I would like to calculate the sample size for comparing the area under the curve (AUC) of 2 models (cross-sectional study, predictor = continuous variable). Can you point me which function in R solves it.
I could not find an R-package that would solve the problem. But I can remember reading the book "Statistical Methods in Diagnostic Medicine" by Zhou, Obuchowski and McClish (Amazon Link). They give a method (too long to reproduce it here for now) for determining the sample size and refer to 2 publications:
Obuchowski NA. Nonparametric analysis of clustered ROC curve data. Biometrics. 1997 Jun;53(2):567-78. PubMed PMID: 9192452.
which IMHO should be instead:
Obuchowski NA, McClish DK. Sample size determination for diagnostic accuracy studies involving binormal ROC curve indices. Stat Med. 1997 Jul 15;16(13):1529-42. PubMed PMID: 9249923.
The second one is a technical report at the University of Chicago by Metz, Kronman and Wang (1989): FORTRAN Program ROCPWR. I could not find this one but googling led me to http://www-radiology.uchicago.edu/krl/KRL_ROC/ROC_analysis_by_topic4.htm I could not find a working link to download the software, though. Maybe someone other does or you contact the authors.
I hope this helps at least a little bit...
There is a just released R Package called
pROC which does what you want using the function
Documentation of the package: https://cran.r-project.org/web/packages/pROC/pROC.pdf
I Hope it helps