adaFilter: The main function for adaptive filtering procedures

Description Usage Arguments Value References Examples

View source: R/adaFilter.R

Description

The main function for adaptive filtering procedures

Usage

1
2
adaFilter(p.matrix, r, type.I.err = c("FDR", "FWER", "PFER"),
  alpha = 0.05, fast = F)

Arguments

p.matrix

an M * n matrix of p-values. M is the number of PC hypotheses and n is the number of studies. Missing values are allowed.

r

the required replicability level, i.e. the smallest number of nonnull individual hypotheses for a nonnull PC hypotheses

type.I.err

one of "FDR", "FWER" or "PFER", with the default type I error "FDR". For FWER and PFER control, the adaFilter Bonferroni procedure is performed; for FDR control, the adaFilter BH procedure is performed.

alpha

control level of the chosen simultaneous error. Default is 0.05.

fast

logical value, default is FALSE. If fast is TRUE, then only results for hypotheses whose filter p-values are less than alpha are computed, and for other hypotheses the results are NA. This can speed up computation when M is super large.

Value

a data frame of size M * 5 where the 5 columns are:

decision

a length M vector of 1 and 0s indicating whether the corresponding PC hypothesis is rejected or not. For a hypothesis, its decision element is 1 if its adjusted.p element is not greater than alpha.

adjusted.p

the adaFilter adjusted p-values for the selection p-values. If type.I.error is "FDR", then return the adaFilter BH adjusted p-values, otherwise, return the adaFilter Bonferroni adjusted p-values.

selection.p

the length M vector of selection p-values

filter.p

the length M vector of filtering p-values

adj.number

The adaFilter adjustment number. For more details, see reference.

References

J. Wang, L. Gui, W. J. Su, C. Sabatti and A. B. Owen (2020). Detecting Multiple Replicating Signals using Adaptive Filtering Procedures

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Simulate a p-value matrix of size 1000 * 2 with 1000 partial conjunction hypotheses and 2 studies
data <- GenPMat()

## set r = 2, which means that the partial conjunction hypothesis is nonnull 
## only when in both studies the corresponding hypothesis is nonnull
## Control for FDR at level 0.1
result <- adaFilter(data$pvalue.mat, 2, "FDR", 0.1)
## print the true positives
print(which(result$decision == 1 & data$truth.pc == 1))
## plot the histogram of the selection p-values (which should be conservative)
hist(result$selection.p, breaks = 30,
main = "Histogram of the selection p-values")

jingshuw/adaFilter documentation built on July 28, 2021, noon