0

如何在 R 中测试相等的组大小?

chisq.test(rep(1:3, 100))产生 300 个自由度,而我希望以 2 个自由度执行此测试。

4

1 回答 1

3

chisq.test期望列表数据:

> chisq.test(table(rep(1:3, 100)))

    Chi-squared test for given probabilities

data:  table(rep(1:3, 100)) 
X-squared = 0, df = 2, p-value = 1
于 2013-03-08T07:11:25.610 回答