[R] test for contingency table when there are many zeros

Francisco J. Zagmutt gerifalte28 at hotmail.com
Wed Aug 8 18:39:01 CEST 2007


fisher.test(tt)

Francisco

gallon li wrote:
> Here is my table
> 
>> tt
>     A   B
> 1 297 398
> 2 470 376
> 3  30  23
> 4   3   3
> 5   0   0
> 
> b/c two cells are zero, I can't use chisq.test() in R which gives the
> following output;
> 
> 
>> chisq.test(tt)
> 
>         Pearson's Chi-squared test
> 
> data:  tt
> X-squared = NaN, df = 4, p-value = NA
> 
> Warning message:
> Chi-squared approximation may be incorrect in: chisq.test(tt)
> 
> What function should I use then? Any suggestion?
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list