Learn R Programming

MHTcop (version 0.1.1)

ac_fdr.test: Perform a FDR controlling test on marginal p-values that are distributed according to an Archmidean copula

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

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 \le m0Lower \le 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] \(\le\) 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

Run this code
# NOT RUN {
#(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
# }

Run the code above in your browser using DataLab