I want to know the sample size required. In R
library(pwr)
pwr.2p.test(h = ES.h(0.022,0.001),sig.level = 0.05,power = 0.8,alternative = "greater")
gives the results
Difference of proportion power calculation for binomial distribution (arcsine transformation)
h = 0.2344905
n = 224.8784
sig.level = 0.05
power = 0.8
alternative = greater
NOTE: same sample sizes
In G*Power tool, the result is
My question is, why the sample sizes from R and G*Power differ so much (225 vs 318)? Thanks.
The reason for the difference is that pwr:pwr.2p.test uses a different approach for calculating Cohen's effect size h, i.e. it uses arcsin transformation. In contrast, GPower as well as the built-in power test from the stats library use an approximation.
To match results between pwr and GPower, go to GPower and when entering your model details, select "Options" at the bottom and turn on arcsin transformation.
Quote from GPower documentation (bolding added by me):
Source: https://paperity.org/p/19044909/g-power-3-a-flexible-statistical-power-analysis-program-for-the-social-behavioral-and