我想要计算出的是每个表格中e, f, g,h格的期望频次(expected frequency)
如表格1中 c( 106, 9, 82, 72, 22, 1, 5, 3)(nrow=2,byrow=R)中e,f,g,h格的期望频次分别就是13.22667 1.033333 8.99 7.75
> aa<-matrix(c(106,9,82,72,22,1,5,3),nrow=2,byrow=T)
> aa
[,1] [,2] [,3] [,4]
[1,] 106 9 82 72
[2,] 22 1 5 3
> chisq.test(aa)$expected
[,1] [,2] [,3] [,4]
[1,] 114.77333 8.966667 78.01 67.25
[2,] 13.22667 1.033333 8.99 7.75