質問

I'm doing a prop.test() on 3 groups:

data = data.frame(a = c(85*0.3412,85*(1-0.3412)),b = c(203*0.2217,203*(1-0.2217)), c = c(231,197))
prop.test(t(data))

The p.value is very low (1.041e-13). I want to know which pair of groups show a significant difference of proportion.

I thought I could run the following code ....

library(agricolae)    
HSD.test(prop.test(t(data)))

... but it is not working because HSD.test can only deal with aov or lm object.

What solution do I have left ? No matter if the solution implies a Bonferroni (or other) correction instead of a Tukey correction.

役に立ちましたか?

解決

This does a Bonferroni-Holm adjustment by default; see the documentation for other options.

> pairwise.prop.test(t(data))

    Pairwise comparisons using Pairwise comparison of proportions 

data:  t(data) 

  a      b      
b 0.0490 -      
c 0.0025 3.1e-13

P value adjustment method: holm 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top