[R] Qvalue package: I am getting back 1, 000 q values when I only want 1 q value.
Jim Lemon
drjimlemon at gmail.com
Thu Jan 12 22:27:21 CET 2017
Hi Tom,
>From a quick scan of the docs, I think you are looking for qobj$pi0.
The vector qobj$qvalue seems to be the local false discovery rate for
each of your randomizations. Note that the manual implies that the p
values are those of multiple comparisons within a data set, not
randomizations of the data, so I'm not sure that your usage is valid
for the function..
Jim
On Fri, Jan 13, 2017 at 4:12 AM, Thomas Ryan <tombernardryan at gmail.com> wrote:
> 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 at 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.
More information about the R-help
mailing list