Message-ID: <1302707683391-3447420.post@n4.nabble.com>
Date: 2011-04-13T15:14:43Z
From: agent dunham
Subject: area under roc curve
Dear all,
I want to measure the goodness of prediction of my linear model. That's why
I was thinking about the area under roc curve.
I'm trying the following, but I don't know how to avoid the error. Any help
would be appreciated.
library(ROCR)
model.lm <- lm(log(outcome)~log(v1)+log(v2)+factor1)
pred<-predict(model.lm)
pred<-prediction(as.numeric(pred), as.numeric(log(outcome)))
auc<-performance(pred,"auc")
Error en prediction(as.numeric(pred), as.numeric(log(outcome))) :
Number of classes is not equal to 2.
ROCR currently supports only evaluation of binary classification tasks.
user at host.com
--
View this message in context: http://r.789695.n4.nabble.com/area-under-roc-curve-tp3447420p3447420.html
Sent from the R help mailing list archive at Nabble.com.