Learn R Programming

epade (version 0.2.2)

roc.plot.ade: ROC-curves plot

Description

Function to plot ROC curves with AUC calculation

Usage

roc.plot.ade(pred, event, group=NULL, data=NULL, vnames=NULL,
             main="", xlab="1-Specificity", ylab="Sensitivity",
             digits=3, pdigs=4, lty=1, lwd=2,
             col=NULL, tcol=NULL, bgcol=NULL,
             wall=0, test=FALSE, CC=TRUE, auc=TRUE, diag=TRUE)

Arguments

pred
  • a list of numeric predictor variables
a vector of character strings with the names of the predictors in data.frame

item

  • event
  • a character strings with the names of event variable in data.frame
  • group
  • a character strings with the names of factor variable in data.frame
  • data
  • vnames
  • main
  • xlab
  • ylab
  • digits
  • pdigs
  • lty
  • lwd
  • col
  • tcol
  • bgcol
  • wall
  • test
  • CC
  • auc
  • diag

itemize

  • a factor to group the curves

Details

if test is TRUE the function perform a DeLong-DeLong test for correlated ROC-curves

Examples

Run this code
# simple curve
event<-rbinom(1000, size=1, prob=0.3)
pred <- event+rnorm(1000)
roc.plot.ade(pred, event)
# grouped
group=rbinom(1000, 1 ,0.5)
roc.plot.ade(pred, event, group, wall=2)
# comparison of two predictors
pred2 <- event+rnorm(1000, 0, 2)
roc.plot.ade(list(pred, pred2), event, test=TRUE, wall=3)

Run the code above in your browser using DataLab