卡方檢驗之事後檢驗

t<- as.table(rbind(c(2, 8, 30), c(6,16,18), c(1,13,26)))
dimnames(t) <- list(group=c("甲","乙","丙"),effect=c("低","中","高"))
chisq.test(t)

 

fisher.test(t)
#Fisher's Exact Test for Count Data

#data:  t
#p-value = 0.03694
#alternative hypothesis: two.sided
install.packages("rcompanion")
library(rcompanion)
pairwiseNominalIndependence(t,fisher=T,gtest = F,chisq = F,method="fdr")

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章