Skip to content
Prev 54048 / 63421 Next

Are r2dtable and C_r2dtable behaving correctly?

... and
[1] 0.1666667 0.6666667 0.1666667
[1] 1 4 1

so that is exactly what you would expect. However,
[1] 0.005230889

so you wouldn't expect 10782 to recur. It is close to the mean of the hypergeometric distribution, but
[1] 10781.53
[1] 76.14209

(and incidentally, rhyper is plenty fast enough that you don't really need r2dtable for the 2x2 case)

-pd