[R] a statistic question about chisq.test()
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Mar 26 22:24:01 CET 2003
aprilsun wrote:
>
> Hi,
> In the chisq.test(), if the expected frequency for some categories is <5, there will be a warning message which says
> Warning message:
> Chi-squared approximation may be incorrect in: chisq.test(x, p = probs)
It's a warning message, not an error. It point's you to the problem that
a number < 5 is not "large", whereas in theory "large" numbers are
assumed when running this test.
> I am wondering whether there are some methods to get rid of this mistake... Seems the ?chisq.test() doesn't provide more
> options to solve this problem. Or, the only choice is to preprocess the data to avoid this situation?
It depends on the problem. Fisher's exact test (or it's extended
version) might be an alternative, see ?fisher.test and an appropriate
statistics textbook.
Uwe Ligges
> Thanks a lot!
>
> aprilsun
More information about the R-help
mailing list