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 p-values or an R6 object of class DiscreteTestResults from package DiscreteTests for which a discrete FWER procedure is to be performed.

...

further arguments to be passed to or from other methods. They are ignored here.

pCDFlist

list of the supports of the CDFs of the p-values; each list item must be a numeric vector, which is sorted in increasing order and whose last element equals 1.

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 p-value to be considered, i.e. only p-values below this threshold are considered and the procedures are adjusted in order to take this selection effect into account; if select_threshold = 1 (the default), all raw p-values are selected.

pCDFlist_indices

list of numeric vectors containing the test indices that indicate to which raw p-value(s) each support in pCDFlist belongs; if NULL (the default) the lengths of test_results and pCDFlist must be equal.

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 p-values.

Indices

indices of rejected hypotheses.

Num_rejected

number of rejections.

Adjusted

adjusted p-values.

Critical_constants

critical values (only exists if computations where performed with critical_values = TRUE).

Data

list with input data.

Data$Method

character string describing the performed algorithm, e.g. 'Discrete Bonferroni procedure'.

Data$Raw_pvalues

observed p-values.

Data$pCDFlist

list of the p-value supports.

Data$FWER_level

FWER level alpha.

Data$Independence

boolean indicating whether the p-values were considered as independent.

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 p-value selection; only exists if select_threshold < 1.

Select$Threshold

p-value selection threshold (select_threshold).

Select$Effective_Thresholds

results of each p-value CDF evaluated at the selection threshold.

Select$Pvalues

selected p-values that are \leq selection threshold.

Select$Indices

indices of p-values \leq selection threshold.

Select$Scaled

scaled selected p-values.

Select$Number

number of selected p-values \leq selection threshold.

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)


[Package DiscreteFWER version 1.0.0 Index]