The two chisq.test p values differ when the contingency table is transposed! (PR#3486)
On Thu, 21 Aug 2003 20:16:24 +0200, you wrote:
I think it works to use
STATISTIC <- sum(sort((x - E) ^ 2 / E, decreasing = TRUE))
instead: this starts by summing the big values, and hence if at all
slightly 'underestimates' the real value, which is fine for the
comparisons.
Looks good here. Duncan