hist.DiscreteFWER {DiscreteFWER} | R Documentation |
Histogram of Raw P-Values
Description
Computes a histogram of the raw p-values of a DiscreteFWER
object.
Usage
## S3 method for class 'DiscreteFWER'
hist(x, breaks = "FD", mode = c("raw", "selected"), ...)
Arguments
x |
an object of class |
breaks |
as in |
mode |
single character string specifying for which $p$-values the
histogram is to be generated; must either be |
... |
further arguments to |
Details
If x
does not contain results of a selection approach, a warning is issued
and a histogram of the raw p-values is drawn.
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
# Computation of p-values and their supports with Fisher's exact test
library(DiscreteTests) # for Fisher's exact test
test_results <- fisher_test_pv(df)
raw_pvalues <- test_results$get_pvalues()
pCDFlist <- test_results$get_pvalue_supports()
# d-Holm with critical values; using test results object
DHolm_crit <- DHolm(test_results, critical_values = TRUE)
hist(DHolm_crit)
[Package DiscreteFWER version 1.0.0 Index]