Learn R Programming

Deducer (version 0.9-1)

rocplot: ROC Plot for a logistic regression model

Description

Plots the ROC Curve

Usage

rocplot(logistic.model,diag=TRUE,pred.prob.labels=FALSE,prob.label.digits=3,AUC=TRUE)

Value

a ggplot object

Arguments

logistic.model

a glm object with binomial link function.

diag

a logical value indicating whether a diagonal reference line should be displayed.

pred.prob.labels

a logical value indicating whether the predictive probabilities should be displayed

prob.label.digits

The number of digits of the predictive probabilities to be displayed.

AUC

a logical value indicating whether the estimated area under the curve should be displayed

Author

Ian Fellows adapted from the lroc function by Virasakdi Chongsuvivatwong

Examples

Run this code
model.glm <- glm(formula=income>5930.5 ~ education + women + type,
	family=binomial(),data=Prestige,na.action=na.omit)
rocplot(model.glm)

Run the code above in your browser using DataLab