Re: [R] help on ROC analysis

From: zhijie zhang <epistat_at_gmail.com>
Date: Tue, 1 Jan 2008 17:02:49 +0800

Thanks.
library(ROCR) was used finally. It also automatically generate a plot beside the value of AUC.

On Dec 31, 2007 11:38 PM, Frank E Harrell Jr <f.harrell_at_vanderbilt.edu> wrote:

> zhijie zhang wrote:
> > Dear all,
> > Some functions like 'ROC(Epi)' can be used to perform ROC analyssi,
> but it
> > needs us to specify the fitting model in the argument. Now i have got
> the
> > predicted p-values (0,1) for the 0/1 response variable using some other
> > approach, see the following example dataset:
> >
> > id mark predict.pvalue
> >
> > 1 1 0.927
> >
> > 2 0 0.928
> >
> > 3 1 0.928
> >
> > ..................
> >
> > *mark* is the true classes, *predict.pvalue* is the predicted p-values,
> > which was used to determine the predicted classes. So i need to specify
> some
> > cut points for *predict.pvalue*, and then compare it with *mark*class,
> > generate the 2*2 tables, and then calculate some sensitivity,
> > specifity....statistcs, and ROC curve.
> > I have searched some functions, such as roc(analogue),'ROC(Epi),etc.
> They
> > may need to specify the fitting model in the codes or group varibles,
> > and may be not appropriate for my condition. I think that it should
> > have been performed in some package for ROC analysis.
> > Anybody can tell me which function is for this case?
> > Thanks very much.
>
> Forming the ROC curve can lead to bad statistical practice, e.g., use of
> non-pre-specified cutpoints and use of cutpoints in general. The area
> under the ROC curve is a valid measure of predictive discrimination
> though (even though it cannot be used to compare 2 models as it is not
> sensitive enough). To get the ROC area you can use the simple somers2
> function in the Hmisc package.
>
> Frank
>
> --
> Frank E Harrell Jr Professor and Chair School of Medicine
> Department of Biostatistics Vanderbilt University
>

-- 
With Kind Regards,

oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
Zhi Jie,Zhang ,PHD
Tel:+86-21-54237149
Dept. of Epidemiology,School of Public Health,Fudan University
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
Email:epistat_at_gmail.com
Website: www.statABC.com
[***********************************************************************]
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 01 Jan 2008 - 09:07:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Jan 2008 - 11:30:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive