[R] ROC curve from logistic regression

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Sep 8 14:21:45 CEST 2008


gallon li wrote:
> I know how to compute the ROC curve and the empirical AUC from the logistic
> regression after fitting the model.
> 
> But here is my question, how can I compute the standard error for the AUC
> estimator resulting form logistic regression? The variance should be more
> complicated than AUC based on known test results. Does anybody know a
> reference on this problem?
>

The rcorr.cens function in the Hmisc package will compute the std. error 
of Somers' Dxy rank correlation.  Dxy = 2*(C-.5) where C is the ROC 
area.  This standard error does not include a variance component for the 
uncertainty in the model (e.g., it does not penalize for the estimation 
of the regression coefficients if you are estimating the coefficients 
and assessing ROC area on the same sample).

The lrm function in the Design package fits binary and ordinal logistic 
regression models and reports C, Dxy, and other measures.

I haven't seen an example where drawing the ROC curve provides useful 
information that leads to correct actions.

Frank
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list