effect size for a test comparing two proportions
for use in power function
Parameters: | prop1, prop2: float or array_like : |
---|---|
Returns: | es : float or ndarray
|
Notes
only method=’normal’ is implemented to match pwr.p2.test see http://www.statmethods.net/stats/power.html
Effect size for normal is defined as
2 * (arcsin(sqrt(prop1)) - arcsin(sqrt(prop2)))
I think other conversions to normality can be used, but I need to check.
Examples
>>> smpr.proportion_effectsize(0.5, 0.4)
0.20135792079033088
>>> smpr.proportion_effectsize([0.3, 0.4, 0.5], 0.4)
array([-0.21015893, 0. , 0.20135792])