[R] ROC analysis

Frank E Harrell Jr f.harrell at vanderbilt.edu
Wed Mar 19 13:26:12 CET 2008


Eleni Christodoulou wrote:
> Richard, thanks,  I think it will work. I will calculate the cutoff value
> and then, from the prediction object, find the fpr that is related to it and
> put it as argument to performance. I will keep you informed.
> 
> Eleni

You will probably need to bootstrap the entire process to get a decent 
estimate of fpr as your cutoff was not specified in advance.

Also note that you are implicitly assuming a constant utility function 
across all subjects because you are not using probabilities but are 
ignoring information by creating only a binary prediction.

Frank Harrell

> 
> On Wed, Mar 19, 2008 at 11:51 AM, Richard Pearson <
> richard.pearson at postgrad.manchester.ac.uk> wrote:
> 
>> Eleni
>>
>> Does the fpr.stop argument do what you want? This is described in
>> ?performance under the details of the "auc" measure. Try, e.g.
>>
>> perform=performance(pred,measure="auc",fpr.stop=0.5)
>>
>>
>> Richard.
>>
>>
>> Eleni Christodoulou wrote:
>>> Hello list,
>>>
>>> I am trying to perform ROC analysis and count the AUC in order to
>> validate
>>> my results. I use package ROCR. I would like to count the AUC not under
>> the
>>> cutoff found by "performance" but to use another cutoff that I
>> calculate.
>>> How could I change the following  command in order to get what I want?
>>> perform=performance(pred,measure="auc",x.measure="cutoff"), where pred
>> is a
>>> prediction object.
>>>
>>> Thank you very much,
>>> Eleni
>>>
>>>       [[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.
>>>
>>>
>> ______________________________________________
>> 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.
>>
> 
> 	[[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.
> 


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



More information about the R-help mailing list