Entering edit mode
5.4 years ago
anamaria
▴
220
Hello,
I have a plot like this:
I calculated FDR for each of 4 bars using formula from here:https://www4.stat.ncsu.edu/~osborne/research/microarray/software/usses-ky.pdf on slide 19.
FDR4=qvalue(gwas.eqtl.p.N1)
ng4=length(FDR4$pvalues)
FDR4F=((FDR4$pi0)*ng4*ptresh)/sum(gwas.eqtl.p.N1<ptresh) #using formula from the slides
qqnorm(gwas.eqtl.p.N1,main = "All eQTL")
qqline(gwas.eqtl.p.N1, col = "steelblue", lwd = 2)
toplot.N <- data.frame( set=c("FLCN", "All SNPs", "eQTL from 103 genes","All eQTL"),
FDR =c(FDR1F,FDR2F,FDR3F,FDR4F))
p<-ggplot(toplot.N, aes(x=set, y=-log10(FDR), fill=set)) +
geom_bar(stat="identity")+theme(axis.title.x = element_blank())+
geom_hline(yintercept=-log10(0.05), linetype="dashed", color = "red")
p
I would like to add confidence bounds for FDR for each of 4 sections.
Does anyone know how to do this?
Thanks Ana
I couldn't figure out what you did here. Could you start from the beginning and explain what your goals are? I suspect you're not doing what you meant to do.
I calculated FDR for each of 4 sets. I plotted it. But now I want to add to the plot confidence bounds for the FDR.
False Discovery Rate? It will either give you a corrected p-value for each item in your list of tests or a list of tests that passed FDR at some threshold, not a single value. Can you go back to what you are measuring, what are the values you have.
It depends how the FDR is calculated. If you use the BH procedure, what you get is an estimate of the expected false discovery rate. Technically, the FDR is the smallest value that satisfied the inequality
where Q is the FDR, a is the type I error rate we wish to control, m0 is the number of true null hypotheses and m is the total number of hypotheses.
As this is all highly non-parametric, I'm not sure I know of any ways to put confidence bounds on the FDR I'm afraid. Probably you would need some sort of bootstrap appraoch.