Hi all, I'm wondering if someone could put me on the right path to using the "qvalue" package correctly.
I have an original p value from an analysis, and I've done 1,000 randomisations of the data set. So I now have an original P value and 1,000 random p values. I want to work out the false discovery rate (FDR) (Q; as described by Storey and Tibshriani in 2003) for my original p value, defined as the number of expected false positives over the number of significant results for my original P value. So, for my original P value, I want one Q value, that has been calculated as described above based on the 1,000 random p values. I wrote this code: pvals <- c(list_of_p_values_obtained_from_randomisations) qobj <-qvalue(p=pvals) r_output1 <- qobj$pvalue r_output2 <- qobj$qvalue r_output1 is the list of 1,000 p values that I put in, and r_output2 is a q value for each of those p values (i.e. so there are 1,000 q values). The problem is I don't want there to be 1,000 Q values (i.e one for each random p value). The Q value should be the false discovery rate (FDR) (Q), defined as the number of expected false positives over the number of significant results. So I want one Q value for my original P value, and to calculate that one Q value using the 1,000 random P values I have generated. Could someone please tell me where I'm going wrong. Thanks Tom [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.