Performs pairwise comparisons between pairs of proportions with correction for multiple testing.
pairwise.G.test(x, p.method = "fdr")
matrix with 2 columns giving the counts of successes and failures, respectively.
method for p-values correction. See help of p.adjust
.
name of the test.
a character string giving the name(s) of the data.
method for p-values correction.
table of results.
Since a G-test is an approximate test, an exact test is preferable when the number of individuals is small (200 is a reasonable minimum). See fisher.multcomp
in that case.
# NOT RUN {
x <- matrix(c(44,56,36,64,64,40),ncol=2,dimnames=list(c("Control","Treatment1","Treatment2"),
c("Alive","Dead")),byrow=TRUE)
G.test(x)
pairwise.G.test(x)
# }
Run the code above in your browser using DataLab