| direct.discrete.BH {DiscreteFDR} | R Documentation | 
Direct Application of Multiple Testing Procedures to Dataset
Description
Apply the [HSU], [HSD], [AHSU] or [AHSD] procedure, with or without computing the critical constants, to a data set of 2x2 contingency tables using Fisher's exact tests which may have to be transformed before computing p-values.
Usage
direct.discrete.BH(
  dat,
  test.fun,
  test.args = NULL,
  alpha = 0.05,
  direction = "su",
  adaptive = FALSE,
  ret.crit.consts = FALSE,
  select.threshold = 1,
  preprocess.fun = NULL,
  preprocess.args = NULL
)
Arguments
| dat | input data; must be suitable for the first parameter of the provided  | 
| test.fun | function from package  | 
| test.args | optional named list with arguments for  | 
| alpha | single real number strictly between 0 and 1 indicating the target FDR level. | 
| direction | single character string specifying whether to perform a step-up ( | 
| adaptive | single boolean specifying whether to conduct an adaptive procedure or not. | 
| ret.crit.consts | 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  | 
| preprocess.fun | optional function for pre-processing the input  | 
| preprocess.args | optional named list with arguments for  | 
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
DBH.su <- direct.discrete.BH(df, "fisher", direction = "su")
summary(DBH.su)
DBH.sd <- direct.discrete.BH(df, "fisher", direction = "sd")
DBH.sd$Adjusted
summary(DBH.sd)
ADBH.su <- direct.discrete.BH(df, "fisher", direction = "su", adaptive = TRUE)
summary(ADBH.su)
ADBH.sd <- direct.discrete.BH(df, "fisher", direction = "sd", adaptive = TRUE)
ADBH.sd$Adjusted
summary(ADBH.sd)