AUC | R Documentation |
Estimates AUC from predicted and observed values
AUC(pred, obs)
pred |
Numeric vector of predicted values |
obs |
Numeric vector of observed values or factor with two levels |
Returns the AUC
glm1 <- glm(case ~ spontaneous + age, data=infert, family="binomial")
pred1 <- fitted(glm1)
AUC(pred1, infert$case)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.