| direct.discrete.BH | R Documentation | 
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.
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
)
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   | 
preprocess.fun | 
 optional function for pre-processing the input   | 
preprocess.args | 
 optional named list with arguments for   | 
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.