Learn R Programming

brainwaver (version 1.6)

compute.FDR: False Discovery Rate computation

Description

Computation of the p-value cut-off which controls the false discovery rate when the test statistics have positive regression dependency on each of the test statistics corresponding to the true null hypotheses.

Usage

compute.FDR(pvalue.vec, q)

Arguments

pvalue.vec
a vector containing the p-value for each hypothesis test.
q
value of the desired False Discovery Rate, exactly the upper limit for the expectation of the proportion of false positives.

Value

a real giving the p-value cutt-off.

Details

This code implements the FDR procedure described in Benjamini and Yekutieli (2001).

References

Benjamini Y. and Yekutieli D. (2001) The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, Vol. 29, No. 4, pages 1165-1188

Examples

Run this code

data(young)
brain<-as.matrix(brain)

# WARNING : To process only the first five regions
brain<-brain[,1:5]


# Construction of the correlation matrices for each level of the wavelet decomposition
wave.cor.list<-const.cor.list(brain, method = "modwt" ,wf = "la8", n.levels = 4, 
                               boundary = "periodic", p.corr = 0.975)

# For scale 4
pvalue.cor<-p.value.compute(wave.cor.list[[4]],proc.length=dim(brain)[1], 
                             sup=0.44, num.levels=4)

# Computation of the p-value threshold using FDR procedure
pvalue.thresh<-compute.FDR(pvalue.cor,0.05)

Run the code above in your browser using DataLab