benchmarkR-methods: Wrapper function to create a multi-panel performance...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Produces a set of performance assessment plots. A 3-panel plot is created with: an ROC curve (rocX), a false discovery (FD) plot (fdX) and a true-positive-rate versus achieved false-discovery plot (powerFDR). All plots show the augmented calibration information.

Usage

1
2
3
4
5
6
benchmarkR(object, pval, ...)	

## S4 method for signature 'SimResults,missing'
benchmarkR(object, thresholdX=0.05, threshold=c(0.01,0.05,0.1), transformation="1-x", name.panel=c("a", "b", "c"), ..., cex.panel=1.5, legend=list("bottomright", "topleft", "bottomright"))
## S4 method for signature 'missing,ANY'
benchmarkR(pval, padj=NULL, labels, thresholdX=0.05, threshold=c(0.01,0.05,0.1), transformation="1-x", name.panel=c("a", "b", "c"), ..., cex.panel=1.5, legend=list("bottomright", "topleft", "bottomright"))

Arguments

object

An object of SimResults.

pval

A vector or matrix containing p-values.

padj

A vector or matrix containing adjusted p-values (optional). If padj is missing, adjusted p-values are calculated using p.adjust(..,method=padjMethod). By default, padjMethod="BH"). For more details, see SimResults or help("p.adjust").

labels

A numeric vector indicating class labels (positives with 1, negatives with 0). For more details, see ?ROCR::prediction.

thresholdX

Numeric value of the adjusted p-value threshold (cutoff) for rocX and fdX (e.g., FDR = 0.05).

threshold

Numeric value of the adjusted p-value threshold (cutoff), or vector of multiple thresholds for powerFDR.

transformation

The transformation of pval and padj. The default setting "1-x" means 1-pval(padj). Note that another useful transformation is "-log10(x)".

name.panel

A list containing the three sub-panel (label) names. Default is c("a", "b", "c").

...

Optional arguments for plotting (see below for more details).

  • col, cex and other general graphical parameters from par can be directly used into the figure.

  • cexX, pchX, colX, pchX are special parameters to control the plotting of the X point (rocX and fdX).

  • lty.threshold, lwd.threshold, col.threshold and point.type are for powerFDR.

cex.panel

A numerical value giving the amount by plotting sub-panel text.

legend

A list or NULL, is used to add legends to plots.

Details

benchmarkR produces a visualized benchmark result combining with three plots: rocX (topleft) fdX (bottomleft) and powerFDR (right).

Most of the graphical parameters such as col, cex, pch and etc from par, can be directly passed into plot for all the subfigures. They can be set up as a vector (e.g., col=1) sharing the same value for all the subfigures, or a list (e.g, col=list(1,2,3)) for different value of different subfigure. cexX, pchX, colX, pchX are special parameters to control the plotting of the X point (rocX and fdX). Their usage is similar to col, cex, pch.

name.panel and cex.panel are referring to the panel label but not title of each subfigure (e.g., name.panel=c("A", "B", "C"), cex.panel=2). The title of each subfigure can be done by main, such as main=list("roc curve", "false discovery plot", "power curve"). The main title can be done by title (e.g, title(main="benchmark result", outer=TRUE)). For more details, see the examples below.

Value

A plot is created on the current graphics device.

Author(s)

Xiaobei Zhou and Mark D. Robinson

See Also

SimResults, rocX, fdX, powerFDR, p.adjust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data(Pickrell)
re <- SimResults(pval=Pickrell$pval, labels=Pickrell$labels)
benchmarkR(re)
benchmarkR(pval=Pickrell$pval, labels=Pickrell$labels)

# using different range of xlim
benchmarkR(re, xlim=list(c(0,0.6), c(0,500), c(0,0.2)))

# remove one of legends
benchmarkR(re, legend=list("bottomleft",NULL,"bottomright"))

# using different lwd and cex
benchmarkR(re, cex=list(1,2,3), lwd=list(3,3,3))

# using defined panel labels and panelcex
benchmarkR(re, name.panel=c("A", "B", "C"), cex.panel=2)

# using defined title of subfigures 
benchmarkR(re, main=list("roc curve", "false discovery plot", "power curve"))

# using defined main title 
benchmarkR(re)
title(main="benchmark result", outer=TRUE)

markrobinsonuzh/benchmarkR documentation built on May 21, 2019, 12:24 p.m.