Re: [R] chisq warning

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Fri 12 Aug 2005 - 22:37:03 EST

Stephen Choularton <mail <at> bymouth.com> writes:

> I am running chisq as below and getting a warning. Can anyone tell me
> the significance or the warning?
>
> > chisq.test(c(10 ,4 ,2 ,6 ,5 ,3 ,4 ,4 ,6 ,3 ,2 ,2 ,2 ,4 ,7 ,10 ,0 ,6
> ,19 ,3 ,2 ,7 ,2 ,2 ,2 ,1 ,32 ,2 ,3 ,10 ,1 ,3 ,9 ,4 ,10 ,2 ,2 ,4 ,5 ,7 ,6

.....

> Warning message:
> Chi-squared approximation may be incorrect in: chisq.test(c(10, 4, 2, 6,
> 5, 3, 4, 4, 6, 3, 2, 2, 2, 4, 7, 10,

This warning means that the expected count in one group is < 5. Try simulate.p.value = TRUE if you want to be sure your result is meaningful. Looks like you should be cautios: p = 0.0004998 versus p< 2.2 E-16 with simulate.p.value = FALSE.

Dieter



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 12 22:42:44 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:16:21 EST