SimResults: Object SimResults constructor

Description Usage Arguments Value Note Author(s) Examples

Description

The SimResults is a S4 class object to store the p-value, labels and other necessary values for further analysis and evaluation.

Usage

1
SimResults(pval=NULL, padj=NULL, labels=new("numeric"), stratify=NULL, padjMethod="BH", ...)

Arguments

pval

A vector or matrix containing p-values from a classifier or a test.

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.

stratify

A stratify factor driving data (optional).

padjMethod

The method to use for adjusting p-value, if padj is NULL. padjMethod are available from c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"). For more details, see help("p.adjust")

...

...

Value

An S4 SimResults-class object.

Note

Selection observations can be done by:

x <- SimResults()

x[i,]

Author(s)

Xiaobei Zhou and Mark D. Robinson.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(benchmarkR)
set.seed(100)
# 'pval' can be a vector
re <- SimResults(pval=rnorm(2000), labels=sample(0:1, 2000, replace=TRUE))
# 'pval' can also be a matirx
pval <- matrix(runif(4000, 0, 0.8), 1000, 4)
padj <- matrix(runif(4000, 0, 0.8), 1000, 4)
re <- SimResults(pval=pval, padj=padj, labels=sample(0:1, 1000, replace=TRUE))
# matrix operators can be used for 'SimResults'
res <- re[1:100,] 

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