[R] fisher.test - can I use non-integer expected values?

bakerwl bakerwl at uwyo.edu
Tue Dec 10 23:04:33 CET 2013


I seem to be able to use expected values that are decimal (e.g., 1.33) when
using chisq.test but not when using fisher.test. This happens when using an
array/matrix as input. Fisher.test returns: Error in sprintf(gettext(fmt,
domain = domain), ...) : invalid format '%d'; use format %s for character
objects.

Thus, it appears fisher.test is looking for integers only.

I tried putting the data in x and y factor objects, but that does not work
either.

Is there another way to use non-integer expected values with fisher.test or
is that a limitation of fisher.test?

If I must use integer expected values, I suppose one option would be round
the expected value down or up to an integer. But, which? I tried that, but
they produce different p values.

Thanks for any help!



--
View this message in context: http://r.789695.n4.nabble.com/fisher-test-can-I-use-non-integer-expected-values-tp4681976.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list