You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: simulate contingency tables for exact monte carlo tests #3557
For conditional tests the simulations are more difficult because we need to simulate contingency tables with given margins which is more difficult than simulating from an unconditional distribution like binomial, multinomial or poisson.
Kim, Donguk, and Alan Agresti. 1997. “Nearly Exact Tests of Conditional Independence and Marginal Homogeneity for Sparse Contingency Tables.” Computational Statistics & Data Analysis 24 (1): 89–104. doi:10.1016/S0167-9473(96)00038-2.
Patefield, W. M. 1981. “Algorithm AS 159: An Efficient Method of Generating Random R × C Tables with Given Row and Column Totals.” Journal of the Royal Statistical Society. Series C (Applied Statistics) 30 (1): 91–97. doi:10.2307/2346669.
IIRC I looked at articles from Berry Mielke in the past but don't remember and contingency tables with fixed margins looked to complicated given my limited interest, maybe this:
Long, Michael A., Kenneth J. Berry, and Paul W. Mielke. 2010. “Multiway Contingency Tables: Monte Carlo Resampling Probability Values for the Chi-Squared and Likelihood-Ratio Tests.” Psychological Reports 107 (2): 501–10. doi:10.2466/03.PR0.107.5.501-510.
Activity
josef-pkt commentedon Feb 26, 2020
just saw while browsing
R stats has Patefield algorithm for
r x crandom tables with fixed marginshttps://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/r2dtable