Two-sample comparison of proportions, sample size estimation: R vs Stata
I got different results for sample sizes, as follows:
In R
power.prop.test(p1 = 0.70, p2 = 0.85, power = 0.90, sig.level = 0.05)
Result: $n = 160.7777$ (so 161) for each group.
In Stata
sampsi 0.70 0.85, power(0.90) alpha(0.05)
Result: $n = 174$ for each group.
Why the difference? Thanks.
BTW, I ran the same sample size calculation in SAS JMP, the result: $n = 160$ (almost the same as the R result).