[Rd] The two chisq.test p values differ when the contingency table is transposed! (PR#3486)

Duncan Murdoch dmurdoch at pair.com
Thu Aug 21 19:51:33 MEST 2003


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



More information about the R-devel mailing list