Description Usage Arguments Value References Examples
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.
1 | ac_fdr.test(p, cop, m0Lower, alpha = 0.05, num.reps = 1e+05)
|
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) |
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
T. Bodnar and T. Dickhaus (2014). False discovery rate control under Archimedean copula. Electronic Journal of Statistics Volume 8, Number 2 (2014), 2207-2241.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.