[BioC] chi squared test
Robert Gentleman
rgentlem at fhcrc.org
Wed Jun 10 20:16:09 CEST 2009
Hi Hai,
This is an R question, not a Bioconductor question. You should ask your
question there. Also, for all of these tests, you can simply do the calculation
and look up the answer. There is no real reason to ask anyone on a mailing list
for help at this level.
The manual pages for the tests will reveal to you what numbers you need to
input. In particular:
If 'x' is a matrix with at least two rows and columns, it is taken
as a two-dimensional contingency table.
and that is not what you are doing - so that is the most likely the answer to
your question. You really have to read the manual page.
best wishes
Robert
Hai-Ri Li wrote:
> Hi everyone,
>
> When I tried to use chisq.test or fisher.test in bioconductor, I always got
> higher p-value than that with other sources.
>
> For example, I have two observed values 15 and 5 and two expected values 10
> and 10.
>
> Using other sources such as Excel from Microsoft, I got p-value 0.025.
>
> However, in bioconductor,
>
> *chisq*.*test*(x=matrix(c(15,5,10,10),nc=2),correct=FALSE)
>
> or
>
> *chisq*.*test*(x=matrix(c(15,10,5,10),nc=2),correct=FALSE)
>
> p-value always is 0.1025.
>
> Did I do something wrong?
>
> Please tell me why there is big difference in p-value. How can I get low
> p-value in bioconductor?
>
> Thanks,
>
> Hai-Ri
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
--
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem at fhcrc.org
More information about the Bioconductor
mailing list