Hello,

I was following an example on The ROCR Package pdf, learning to overlay ROC curves on the same plot using the add = TRUE statement.  I used this one:

data(ROCR.hiv) 
attach(ROCR.hiv) 
pred.svm <- prediction(hiv.svm$predictions, hiv.svm$labels) 
perf.svm <- performance(pred.svm, 'tpr', 'fpr') 
pred.nn <- prediction(hiv.nn$predictions, hiv.svm$labels) 
perf.nn <- performance(pred.nn, 'tpr', 'fpr') 
plot(perf.svm, lty=3, col="red",main="SVMs and NNs for prediction of HIV-1 coreceptor usage") 
plot(perf.nn, lty=3, col="blue",add=TRUE) plot(perf.svm, avg="vertical", lwd=3, col="red",
spread.estimate="stderror",plotCI.lwd=2,add=TRUE) 
plot(perf.nn, avg="vertical", lwd=3, col="blue", spread.estimate="stderror",plotCI.lwd=2,add=TRUE) 
legend(0.6,0.6,c('SVM','NN'),col=c('red','blue'),lwd=3)

The problem that I face is that the ROC plots get replaced even with the add = TRUE statement.  I've done this example several times, but the result is the same; the ROC curves are not overlaid on the same plot.  Is there any reason why these ROC curves are not overlaying on the same plot.  Is there a work around for this, or a setting that I'm unaware of?


Thank you for any assistance.

-Matt
	[[alternative HTML version deleted]]


