Skip to content

Instantly share code, notes, and snippets.

@smrmkt
Last active December 20, 2015 19:19
Show Gist options
  • Save smrmkt/6182391 to your computer and use it in GitHub Desktop.
Save smrmkt/6182391 to your computer and use it in GitHub Desktop.
chi-square test and multiple comparison using bonferroni adjust with 3 groups (class A, class B, class C), 2 levels (passed, failed) original prop test metod is provided by Prof. Aoki.
source("http://aoki2.si.gunma-u.ac.jp/R/src/pairwise.prop2.test.R", encoding="euc-jp")
x <- matrix(c(18, 82, 40, 76, 32, 52), ncol=2, byrow=T)
x
chisq.test(x)
fisher.test(x)
pairwise.prop2.test(x, p.adjust.method="holm", test.function=chisq.test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment