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:¶
- prop1, prop2
float
or array_like The proportion value(s).
- prop1, prop2
- Returns:¶
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])
Last update:
Oct 29, 2024