roc.plot.ade: ROC-curves plot

View source: R/roc.plot.ade.R

roc.plot.adeR Documentation

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, spec=FALSE)

Arguments

pred
  • a list of numeric predictor variables

  • a vector of character strings with the names of the predictors in data.frame

event
  • a numeric event variable

  • a character strings with the names of event variable in data.frame

group
  • a factor to group the curves

  • a character strings with the names of factor variable in data.frame

data

data.frame if used character string for (pred,event,group)

vnames

a vector of character strings with the names of groups in the legend

main

an overall title for the plot

xlab

a title for the x axis

ylab

a title for the y axis

digits

how many significant digits are to be shown for AUC

pdigs

a number indicate how to round p-values.: see ?format.pval.ade

lty

a single line type or a vector og line types

lwd

the line width

col

a vector of colors for each curve

tcol

color of the text in whole plot

bgcol

the background color for plot dekoration

wall

a number between 0 and 6 for selection the dekoration style of the plot.

test

logical asking whether to test for the difference between curves

CC

logical asking whether to use complete cases for all curves

auc

logical asking whether to draw AUC in legend

diag

logical asking whether to plot a diagonal line

spec

logical asking whether to draw a axis for Specificity at top.

Details

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

Examples

# 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)

epade documentation built on Oct. 29, 2022, 1:14 a.m.