# How to calculate sample size for comparing the area under the curve of two models?

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.

• +1 for a good question, as I'm also interested in this. Perhaps simulation? Irrespective of the solution, I'd like to see exactly how this was done. Or, perhaps a formula. – pmgjones Oct 3 '11 at 17:32

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.

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...

psj

• Thank you so much! I will study these article carefully. – Duc Tan Ha Oct 15 '11 at 1:12
• In the meantime I found a way to download the FORTRAN software: you have to register on the page metz-roc.uchicago.edu and there you find an 32-bit exe-file as well as FORTRAN source code. – psj Oct 19 '11 at 13:33

There is a just released R Package called pROC which does what you want using the function power.roc.test.

Documentation of the package: https://cran.r-project.org/web/packages/pROC/pROC.pdf

I Hope it helps