Plot ROC curves

Share:

Description

This function allows to plot the two roc curves in comparasion.

Usage

1
roc.curves.plot(sim1.curve, sim2.curve, mod1, mod2)

Arguments

sim1.curve

Curve 1 created using the function performance.

sim2.curve

Curve 2 created using the function performance.

mod1

Name of Modality 1

mod2

Name of Modality 2

See Also

read.file read.manually.introduced

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(zhang)
moda1 = "modality1" 
moda2 = "modality2"
data = read.manually.introduced(zhang, moda1, TRUE, moda2, TRUE, "status", TRUE)

sim1.ind = unlist(data[1])
sim2.ind = unlist(data[2])  
sim1.sta = unlist(data[3])
sim2.sta = unlist(data[4])

sim1.pred = prediction(sim1.ind, sim1.sta)
sim2.pred = prediction(sim2.ind, sim2.sta)

sim1.curve = performance(sim1.pred, "tpr", "fpr")
sim2.curve = performance(sim2.pred, "tpr", "fpr")

roc.curves.plot(sim1.curve, sim2.curve, mod1=moda1, mod2=moda2)