S******y 发帖数: 1123 | 1 I got my classfication prediction vs. observed table.
How to do ROC curve in R?
Many thanks!!! | A*****n 发帖数: 243 | 2 install the ROCR package fom CRAN
【在 S******y 的大作中提到】 : I got my classfication prediction vs. observed table. : How to do ROC curve in R? : Many thanks!!!
| N**D 发帖数: 10322 | 3 write one
【在 S******y 的大作中提到】 : I got my classfication prediction vs. observed table. : How to do ROC curve in R? : Many thanks!!!
| b*****a 发帖数: 905 | | b*****a 发帖数: 905 | 5 lz自己挑著看吧。
## Make a ROC plot to see the ration of the rate of false positives to the
rate of false negatives
library(ROCR)
ip.glm<-glm(votesum ~ clint96 + partyid + aflcio97 + ccoal98, data=ip,
family=binomial(link=logit))
summary(ip.glm)
names(ip.glm)
pred.object<-prediction(ip.glm$fitted.values, ip.glm$y)
perf.object<-performance(pred.object, "tpr", "fpr")
# use add=TRUE as an argument to the plot() function if you want to overlay
additional ROC plots.
# Compare the model with submodel (Democr | l*******l 发帖数: 204 | 6 Oh
【在 b*****a 的大作中提到】 : lz自己挑著看吧。 : ## Make a ROC plot to see the ration of the rate of false positives to the : rate of false negatives : library(ROCR) : ip.glm<-glm(votesum ~ clint96 + partyid + aflcio97 + ccoal98, data=ip, : family=binomial(link=logit)) : summary(ip.glm) : names(ip.glm) : pred.object<-prediction(ip.glm$fitted.values, ip.glm$y) : perf.object<-performance(pred.object, "tpr", "fpr")
|
|