plotROC {puma} | R Documentation

## Receiver Operator Characteristic (ROC) plot

### Description

Plots a Receiver Operator Characteristic (ROC) curve.

### Usage

    plotROC(
    	scoresList
    ,	truthValues
    ,	includedProbesets=1:length(truthValues)
    ,	legendTitles=1:length(scoresList)
    ,	main = "PUMA ROC plot"
    ,	lty = 1:length(scoresList)
    ,	col = rep(1,length(scoresList))
    ,	lwd = rep(1,length(scoresList))
    ,	yaxisStat = "tpr"
    ,	xaxisStat = "fpr"
    ,	downsampling = 100
    ,	showLegend = TRUE
    ,	showAUC = TRUE
    ,	...
    )

### Arguments

`scoresList` | A list, each element of which is a numeric vector of scores.
`truthValues` | A boolean vector indicating which scores are True Positives.
`includedProbesets` | A vector of indices indicating which scores (and truthValues) are to be used in the calculation. The default is to use all, but a subset can be used if, for example, you only want a subset of the probesets which are not True Positives to be treated as False Positives.
`legendTitles` | Vector of names to appear in legend.
`main` | Main plot title
`lty` | Line types.
`col` | Colours.
`lwd` | Line widths.
`yaxisStat` | Character string identifying what is to be plotted on the y-axis. The default is "tpr" for True Positive Rate. See `performance` function from ROCR package.
`xaxisStat` | Character string identifying what is to be plotted on the x-axis. The default is "fpr" for False Positive Rate. See `performance` function from ROCR package.
`downsampling` | See details for `plot.performance` from the ROCR package.
`showLegend` | Boolean. Should legend be displayed?
`showAUC` | Boolean. Should AUC values be included in legend?
`...` | Other parameters to be passed to `plot`.

### Value

This function has no return value. The output is the plot created.

### Author(s)

Richard D. Pearson

### See Also

Related method `calcAUC`

### Examples

    	class1a <- rnorm(1000,0.2,0.1)
    	class2a <- rnorm(1000,0.6,0.2)
    	class1b <- rnorm(1000,0.3,0.1)
    	class2b <- rnorm(1000,0.5,0.2)
    	scores_a <- c(class1a, class2a)
    	scores_b <- c(class1b, class2b)
    	scores <- list(scores_a, scores_b)
    	classElts <- c(rep(FALSE,1000), rep(TRUE,1000))
    	plotROC(scores, classElts)

[Package puma version 3.26.0 Index]