私はちょうどYates補正であっても、セルの周波数が低い2 x 2テーブルの場合、R
はchi^2統計を間違って計算しているようです。Rはセル数の少ない2x2テーブルのカイ二乗統計量を誤って計算していますか?
mat <- matrix(c(3, 2, 14, 10), ncol = 2)
chi <- stats::chisq.test(mat)
## Warning message:
## In stats::chisq.test(mat) : Chi-squared approximation may be incorrect
# from the function
chi$statistic
## X-squared
## 1.626059e-31
# as it should be (with Yates correction)
sum((abs(chi$observed - chi$expected) - 0.5)^2/chi$expected)
## [1] 0.1851001
アム私は右R
ことを考えるに誤って計算され、そして0.185を生じる第二の方法は、より正確であること?あるいは、小さな細胞数は、すべてのベットがオフであることを意味しますか?
更新:
イェーツの連続性補正なしで正常に動作するように見えるん:
chi <- stats::chisq.test(mat, correct = FALSE)
## Warning message:
## In stats::chisq.test(mat, correct = FALSE) :
## Chi-squared approximation may be incorrect
chi$statistic
## X-squared
## 0.004738562
sum((abs(chi$observed - chi$expected))^2/chi$expected)
## [1] 0.004738562
を使用する小さな細胞計数のためにカイ二乗の上に[フィッシャーの正確確率検定](https://www.google.com/#q=fisher+exact+test+vs+chi+square)に見て。 – Parfait