powered by
Returns the area under the curve value as a fraction.
auc(q, y = attr(q, "y"))
the area under the curve value
the predicted values
a list of the actual classes of q
q
df <- with(diabetes, cbind(y, X)) lm.y <- glm(y ~ ., data = df, family = binomial()) print(with(lm.y, auc(fitted.values, y)))
Run the code above in your browser using DataLab