[R] Receiver Operator Characteristic curve

Frank E Harrell Jr feh3k at spamcop.net
Thu Mar 11 23:48:51 CET 2004


On Thu, 11 Mar 2004 13:16:15 -0500
XIAO LIU <xiaoliu at jhmi.edu> wrote:

> Dear R-helpers:
> 
> I want to calculate area under a Receiver Operator Characteristic curve.
>  Where can I find related functions?
> 
> Thank you in advance
> 
> Xiao
> 

install.packages('Hmisc')
library(Hmisc)
w <- somers2(predicted probability, 0/1 diagnosis)

Convert Somers' Dxy rank correlation to ROC area (C) using Dxy=2*(C-.5).

To get standard error of Dxy (and hence C) type ?rcorr.cens (another Hmisc
function).

This is the nonparametric Wilcoxon-Mann-Whitney approach.
---
Frank E Harrell Jr   Professor and Chair           School of Medicine
                     Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list