problem: a sample size for the assumed effect in the 2 sample proportion test I would like to calculate a sample size for the 2 sample proportion test when the significance level is assumed (0.05), power is assumed (0.90) and I'd like 2 sample proportion test to detect that there is at least 5% difference in proportions in 2 groups (in favour in 1 specific group).
Any idea on how to calcuate this? Or any reference to read?
I've found package in R -> pwr and a function pwr.2p.test that enable to calculate a sample with given sig.level, power and given effect but the effect size shoud be delivered as Cohen's d that I can't connect with my desired effect size = at least 5%.
Learn about this from here http://www.statmethods.net/stats/power.html
Thanks for any advce.
 A: The sample size depends on how rare the event is and how you split your sample into treatment and control. For example, here's the graphical output of the following Stata power calculation command: 
power twoprop .1(.1).5, power(0.9) alpha(0.05) diff(.05) nratio(.5 1) onesided graph
The red line shows that if the control group proportion was $p_1=0.5$ (the binomial event of interest is pretty common), then you would need a total sample size of 3,414 observations to detect a 0.05 percentage point difference favoring the treatment group (assuming equal experimental group sizes $\frac{N_2}{N_1}=1$). If the event was relatively rare, say $p_1=0.1$, you would need 1,496 observations split into two to detect 0.05 pp difference between treatment and control.
If you want to split your groups unevenly in an unbalanced design, say $\frac{N_2}{N_1}=\frac{1}{2}$, then you would need a somewhat larger sample size. The blue line that corresponds to the uneven allocation is higher than the red, even-split line. For $p_1=0.5$, we would need $$N'=N_1' + N_2'= 3,842 + 2,561 + 1,281$$ instead of $$N=N_1 + N_2 =  3,414 = 1,707 +    1,707 $$ You essentially need 2 control people for every treatment person you give up.

The formulas used by Stata can be found here.
