生成随机列联表的有效方法? [英] Efficient way to generate random contingency tables?

查看:81
本文介绍了生成随机列联表的有效方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

生成随机列联表的有效方法是什么?列联表被定义为一个矩形矩阵,使得每行的和固定,每列的和固定,但只要每行和每列的和是正确的,单个元素可以是任何东西.

请注意,生成随机列联表非常容易,但我正在寻找比朴素算法更有效的方法.

解决方案

查看networksis 包可能会有所帮助.我相信高效的计算需要花哨的 马尔可夫链顺序重要性重采样 技术,因此如果可以避免,您可能希望避免重新实现它.

相关论文是Chen, Diaconis, Holmes, and Liu(2005).用作者的话来说,[o]你的方法与其他现有的蒙特卡罗方法相比毫不逊色——基于算法,​​有时效率要高几个数量级."

What is an efficient way to generate a random contingency table? A contingency table is defined as a rectangular matrix such that the sum of each row is fixed, and the sum of each column is fixed, but the individual elements may be anything as long as the sum of each row and column is correct.

Note that it's very easy to generate random contingency tables, but I'm looking for something more efficient than the naive algorithm.

解决方案

Looking at the code of the networksis package for R might be helpful. I believe that efficient computation requires fancy Markov Chain sequential importance resampling techniques, so you might want to avoid reimplementing this if you can avoid it.

Edit: The relevant paper is Chen, Diaconis, Holmes, and Liu (2005). In the words of the authors, "[o]ur method compares favorably with other existing Monte Carlo- based algorithms, and sometimes is a few orders of magnitude more efficient."

这篇关于生成随机列联表的有效方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆