My aim is to find out if infection state (pos / neg) is associated with the group of patients (A, B or C). For this analysis I have followed suggestion from How to analyze $ 2\times n$ contingency table? and ran propensity test and pairwise propensity test with Bonferroni correction:
Inf_mat <- matrix(c(15,35, 12,29, 18,15), 2, 3,
dimnames = list(infection = c("pos", "neg"),
group = c("A", "B", "C")))
prop.test(t(Inf_mat))
3-sample test for equality of proportions without continuity correction
data: t(Inf_mat)
X-squared = 6.4866, df = 2, p-value = 0.03903
alternative hypothesis: two.sided
sample estimates:
prop 1 prop 2 prop 3
0.3000000 0.2926829 0.5454545
pairwise.prop.test(t(Inf_mat), p.adjust.method ="bonferroni")
Pairwise comparisons using Pairwise comparison of proportions
data: t(Inf_mat)
A B
B 1.00 -
C 0.13 0.15
P value adjustment method: bonferroni
As results of these tests do differ I am not sure how to interpret it. From prop.test
it seems that $H0:pA=pB=pC$ could be rejected as probability of false discovery if there is no association is ~4%. However, as pairwise.prop.test
shows there is no pair of groups where we could reject $H0:pX=pY$ as Bonferroni corrected p-values are rather high.