ac_fdr.test: Perform a FDR controlling test on marginal p-values that are...

Description Usage Arguments Value References Examples

Description

Performs a test on marginal p-values according to the procedure described in Bodnar, Dickhaus (2014). See the vignette vignette('fdr-test',package='MHTcop') for a detailed explanation of the example.

Usage

1
ac_fdr.test(p, cop, m0Lower, alpha = 0.05, num.reps = 1e+05)

Arguments

p

The vector of marginal p-values

cop

The dependency model for the p-values (for example copula::copClayton)

m0Lower

A lower bound on the number of true null hypotheses (i.e. m0Lower is a reasonable lower bound for the number of true null hypotheses), 1 ≤ m0Lower ≤ length(p)

alpha

The desired FDR level

num.reps

The number of samples to draw for the Monte-Carlo integration (default = 1e5)

Value

The adjusted p-values p.adjusted such that performing the test by rejecting the i-th hypothesis if and only if p.adjusted[i] alpha is a test at FDR level alpha

References

T. Bodnar and T. Dickhaus (2014). False discovery rate control under Archimedean copula. Electronic Journal of Statistics Volume 8, Number 2 (2014), 2207-2241.

Examples

1
2
3
4
5
6
7
8
9
#(Using p-values generated from the model (16))
library(copula)
set.seed(1)
m <- 20
m0 <- 0.8*m
p_values <- rCopula(1,onacopulaL(copClayton,list(1,1:20)))
mu<-runif(m-m0, min=-1, max=-1/2)
p_values[1,(m0+1):m]<-pnorm(sqrt(m)*mu+qnorm(p_values[(m0+1):m]),0,1)
ac_fdr.test(p_values,setTheta(copClayton,1),m0,0.05,1e4)$test

MHTcop documentation built on May 2, 2019, 7:59 a.m.