hist.DiscreteFDR {DiscreteFDR}R Documentation

Histogram of Raw p-Values

Description

Computes a histogram of the raw p-values of a DiscreteFDR object.

Usage

## S3 method for class 'DiscreteFDR'
hist(x, breaks = "FD", plot = TRUE, ...)

Arguments

x

an object of class "DiscreteFDR".

breaks

as in hist; here, the Friedman-Diaconis algorithm("FD") is used as default.

plot

a boolean If TRUE (the default), a histogram is plotted, otherwise a list of breaks and counts is returned.

...

further arguments to hist or plot.histogram, respectively.

Details

This method simply calls hist and passes the raw p-values of the object.

Value

An object of class histogram.

Examples

X1 <- c(4, 2, 2, 14, 6, 9, 4, 0, 1)
X2 <- c(0, 0, 1, 3, 2, 1, 2, 2, 2)
N1 <- rep(148, 9)
N2 <- rep(132, 9)
Y1 <- N1 - X1
Y2 <- N2 - X2
df <- data.frame(X1, Y1, X2, Y2)
df

#Construction of the p-values and their support
df.formatted <- fisher.pvalues.support(counts = df, input = "noassoc")
raw.pvalues <- df.formatted$raw
pCDFlist <- df.formatted$support

DBH <- DBH(raw.pvalues, pCDFlist)
hist(DBH)


[Package DiscreteFDR version 1.3.7 Index]