[R] Re : ROC Analysis

Pascal Oettli kridox at ymail.com
Fri Mar 16 03:19:19 CET 2012


Hi Camille,

Probably by adding these lines:

fpf <- unlist(performance(pred,"fpr")@y.values)
fnf <- unlist(performance(pred,"fnr")@y.values)

pLhood <- tpf/fpf   # Positive Likelihood Ratio
nLhood <- fnf/tnf   # Negative Likelihood Ratio

par(mfrow=c(1,2))
plot(x, pLhood, t='l', xlab='Value', ylab='Positive Likelihood Ratio')
plot(x, nLhood, t='l', xlab='Value', ylab='Negative Likelihood Ratio')


Regards,
Pascal


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




More information about the R-help mailing list