Reputation: 19
Trying to calculate proportion for number of pairs of values. Why when used prop.test for one pairs or for several (pairwise.prop.test) i get a difference results?
If i run only for the first pairs i get: P-Value= 0.08181
prop.test(c(73,68),c(86,93),alternative ="two.sided")
##
## 2-sample test for equality of proportions with continuity correction
##
## data: c(73, 68) out of c(86, 93)
## X-squared = 3.0286, df = 1, p-value = 0.08181
## alternative hypothesis: two.sided
## 95 percent confidence interval:
## -0.01122346 0.24653229
## sample estimates:
## prop 1 prop 2
## 0.8488372 0.7311828
And when i run with more than 1 pairs i get diff. P-Value
smokers <- c( 73, 68, 98, 70 )
patients <- c( 86, 93, 136, 182 )
pairwise.prop.test(smokers, patients)
##
## Pairwise comparisons using Pairwise comparison of proportions
##
## data: smokers out of patients
##
## 1 2 3
## 2 0.16 - -
## 3 0.12 0.98 -
## 4 1.8e-11 4.4e-07 2.9e-08
##
## P value adjustment method: holm
What i do wrong?
Thanks
Upvotes: 0
Views: 1098
Reputation: 351
Removing the "Holm" method from the pairwise.prop.test will return the same results, which adjusts p-values -- similarly to "Bonferroni". Note, the latter rounds to 3 digits.
prop.test(c(73,68),c(86,93), alternative ="two.sided")
smokers <- c( 73, 68, 98, 70 )
patients <- c( 86, 93, 136, 182 )
pairwise.prop.test(smokers, patients, p.adjust.method = "none")
Upvotes: 1