Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotROC

Plot ROC curves


Description

plotROC plots ROC curves based on results from summarizeForROC. This function plots only, it does not return any data. It allows printing simultaneously multiple ROC curves from different studies, it is also compatible with data from 3 species mix as in proteomics benchmark. Input can be prepared using moderTest2grp followed by summarizeForROC.

Usage

plotROC(
  dat,
  ...,
  useColumn = 2:3,
  methNames = NULL,
  col = NULL,
  pch = 1,
  bg = NULL,
  tit = NULL,
  xlim = NULL,
  ylim = NULL,
  point05 = 0.05,
  pointSi = 0.85,
  nByMeth = NULL,
  speciesOrder = NULL,
  txtLoc = NULL,
  legCex = 0.72,
  las = 1,
  addSuplT = TRUE,
  silent = FALSE,
  callFrom = NULL
)

Arguments

dat

(matrix) from testing (eg summarizeForROC )

...

optional additional data-sets to include as seprate ROC-curves to same plot (must be of same type of format as 'dat')

useColumn

(integer or character, length=2) columns from dat to be used for pecificity and sensitivity

methNames

(character) names of methods (data-sets) to be displayed

col

(character) custom colors for lines and text (choose one color for each different data-set)

pch

(integer) type of symbol to be used (see also par)

bg

(character) background color in plot (see also par)

tit

(character) custom title

xlim

(numeric, length=2) custom x-axis limits

ylim

(numeric, length=2) custom y-axis limits

point05

(numeric) specific point to highlight in plot (typically at alpha=0.05)

pointSi

(numeric) size of points (as expansion factor cex)

nByMeth

(integer) value of n to display

speciesOrder

(integer) custom order of species in legend

txtLoc

(numeric, length=3) location for text (x, y and proportional factor for line-offset, default is c(0.4,0.3,0.04))

legCex

(numeric) cex expansion factor for legend (see also par)

las

(numeric) factor for text-orientation (see also par)

addSuplT

(logical) add text with information about precision,accuracy and FDR

silent

(logical) suppress messages

callFrom

(character) allows easier tracking of messages produced

Value

plot with ROC curves only

See Also

Examples

roc0 <- cbind(alph=c(2e-6,4e-5,4e-4,2.7e-3,1.6e-2,4.2e-2,8.3e-2,1.7e-1,2.7e-1,4.1e-1,5.3e-1,
	 6.8e-1,8.3e-1,9.7e-1), spec=c(1,1,1,1,0.957,0.915,0.915,0.809,0.702,0.489,0.362,0.234,
  0.128,0.0426), sens=c(0,0,0.145,0.942,2.54,2.68,3.33,3.99,4.71,5.87,6.67,8.04,8.77,
  9.93)/10, n.pos.a=c(0,0,0,0,2,4,4,9,14,24,36,41) )
plotROC(roc0)

wrProteo

Proteomics Data Analysis Functions

v1.4.1
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.