DHochberg {DiscreteFWER} | R Documentation |
Discrete Hochberg Procedure
Description
DHochberg()
is a wrapper function of discrete_FWER()
for computing the
discrete Hochberg step-up procedure for independent or positively correlated
discrete tests. It simply passes its arguments to discrete_FWER()
with
fixed independence = TRUE
and single_step = FALSE
.
Usage
DHochberg(test_results, ...)
## Default S3 method:
DHochberg(
test_results,
pCDFlist,
alpha = 0.05,
critical_values = FALSE,
select_threshold = 1,
pCDFlist_indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
DHochberg(
test_results,
alpha = 0.05,
critical_values = FALSE,
select_threshold = 1,
...
)
Arguments
test_results |
either a numeric vector with |
... |
further arguments to be passed to or from other methods. They are ignored here. |
pCDFlist |
list of the supports of the CDFs of the |
alpha |
single real number strictly between 0 and 1 indicating the target FWER level. |
critical_values |
single boolean specifying whether critical constants are to be computed. |
select_threshold |
single real number strictly between 0 and 1 indicating the largest raw |
pCDFlist_indices |
list of numeric vectors containing the test indices that indicate to which raw |
Details
Computing critical constants (critical_values = TRUE
) requires considerably
more execution time, especially if the number of unique supports is large.
We recommend that users should only have them calculated when they need them,
e.g. for illustrating the rejection set in a plot or other theoretical
reasons. Setting (critical_values = FALSE
) is sufficient for obtaining
rejection decisions and adjusted p
-values.
Value
A DiscreteFWER
S3 class object whose elements are:
Rejected |
rejected raw |
Indices |
indices of rejected hypotheses. |
Num_rejected |
number of rejections. |
Adjusted |
adjusted |
Critical_constants |
critical values (only exists if computations where performed with |
Data |
list with input data. |
Data$Method |
character string describing the performed algorithm, e.g. 'Discrete Bonferroni procedure'. |
Data$Raw_pvalues |
observed |
Data$pCDFlist |
list of the |
Data$FWER_level |
FWER level |
Data$Independence |
boolean indicating whether the |
Data$Single_step |
boolean indicating whether a single-step or step-down procedure was performed. |
Data$Data_name |
the respective variable names of the input data. |
Select |
list with data related to |
Select$Threshold |
|
Select$Effective_Thresholds |
results of each |
Select$Pvalues |
selected |
Select$Indices |
indices of |
Select$Scaled |
scaled selected |
Select$Number |
number of selected |
References
Zhu, Y., & Guo, W. (2019). Family-Wise Error Rate Controlling Procedures for Discrete Data. Statistics in Biopharmaceutical Research, 12(1), 117-128. doi:10.1080/19466315.2019.1654912
See Also
discrete_FWER()
, DSidak()
, DBonferroni()
, DHolm
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-Hochberg without critical values; using test results object
DHoch_fast <- DHochberg(test_results)
summary(DHoch_fast)
# d-Hochberg with critical values; using extracted p-values and supports
DHoch_crit <- DHochberg(raw_pvalues, pCDFlist, critical_values = TRUE)
summary(DHoch_crit)