statsmodels.stats.proportion.proportion_effectsize

statsmodels.stats.proportion.proportion_effectsize(prop1, prop2, method='normal') [source]

effect size for a test comparing two proportions

for use in power function

Parameters: prop2 (prop1,) –
Returns: es – effect size for (transformed) prop1 - prop2
Return type: 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

>>> import statsmodels.api as sm
>>> sm.stats.proportion_effectsize(0.5, 0.4)
0.20135792079033088
>>> sm.stats.proportion_effectsize([0.3, 0.4, 0.5], 0.4)
array([-0.21015893,  0.        ,  0.20135792])

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.proportion.proportion_effectsize.html