[R] about chisq.test()
zhaodj at ioz.ac.cn
Wed May 19 16:44:42 CEST 2010
I want to check whether 5 decimal data is 1:1:1:1:1. For example,
data = c(14.3,16.2,14.7,18.7,14.5)
Since chisq.test() can do the goodness-of-fit test, it becomes my
choice. However, I find in the "?chisq.test" help file that it requires
"non-negative integers"! It seems that it is inappropriate to do the
test using this function.
The function requires "integer". But what if we input some decimals as
mentioned above? Actually I did it and it seems goes well.
> data = c(14.3,16.2,14.7,18.7,14.5)
Chi-squared test for given probabilities
X-squared = 0.8704, df = 4, p-value = 0.9288
Is this result reliable?
More information about the R-help