DBR: [HBR-lambda] procedure

Description Usage Arguments Details Value References See Also Examples

View source: R/DBR_fun.R

Description

Apply the [HBR-λ] procedure, with or without computing the critical constants, to a set of p-values and their discrete support.

Usage

1
2
3
4
5
6
7
DBR(
  raw.pvalues,
  pCDFlist,
  alpha = 0.05,
  lambda = NULL,
  ret.crit.consts = FALSE
)

Arguments

raw.pvalues

vector of the raw observed p-values, as provided by the end user and before matching with their nearest neighbor in the CDFs supports.

pCDFlist

a list of the supports of the CDFs of the p-values. Each support is represented by a vector that must be in increasing order.

alpha

the target FDR level, a number strictly between 0 and 1. For *.fast kernels, it is only necessary, if stepUp = TRUE.

lambda

a number strictly between 0 and 1. If lambda=NULL (by default), then lambda is chosen equal to alpha.

ret.crit.consts

a boolean. If TRUE, critical constants are computed and returned (this is computationally intensive).

Details

[DBR-lambda] is the discrete version of the [Blanchard-Roquain-lambda] procedure (see References), the authors of the latter suggest to take lambda = alpha (see their Proposition 17), which explains the choice of the default value here.

This version: 2019-06-18.

Value

A DiscreteFDR 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 constants (if requested)

Method

Character string describing the used algorithm, e.g. 'Discrete Benjamini-Hochberg procedure (step-up)'

Signif.level

Significance level alpha

Lambda

Value of lambda.

Data$raw.pvalues

The values of raw.pvalues

Data$pCDFlist

The values of pCDFlist

Data$data.name

The respective variable names of raw.pvalues and pCDFlist

References

G. Blanchard and E. Roquain (2009). Adaptive false discovery rate control under independence and dependence. Journal of Machine Learning Research, 10, 2837-2871.

See Also

discrete.BH, DiscreteFDR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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

#Construction of the p-values and their support
df.formatted <- fisher.pvalues.support(counts = df, input = "noassoc")
raw.pvalues <- df.formatted$raw
pCDFlist <- df.formatted$support

DBR.fast <- DBR(raw.pvalues, pCDFlist)
summary(DBR.fast)
DBR.crit <- DBR(raw.pvalues, pCDFlist, ret.crit.consts = TRUE)
summary(DBR.crit)

DiscreteFDR documentation built on Sept. 5, 2021, 5:23 p.m.