You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FAQ/SUM: hypothesis tests, power - signatures and conventions #8206
we should get a more consistent pattern for the signature of functions, including helper functions
When I write new code I don't always remember the pattern, if there is one, and make inconsistent signatures
TBD
basic convention for 2 indep (at least recently):
sample 1 is treatment, sample 2 is control
H0: s1 - s2 - value = 0 and under the alternative it is unequal !=, smaller <, or larger >
in power sample size computation we search for nobs1, given nobs_ratio
nobs2 = nobs1 * nobs_ratio
(If users want to find nobs_ratio for fixed value of nobs2, then they need to flip indices between sample 1 and 2)
in function that can be either for one-sample or two-sample problems, nobs in helper function can be either (total) nobs or nobs1
std or var in signature
the recent power functions all have std and and so do generic functions in weightstats, e.g. _zstat_generic2
new power in stats.rates: PR #8166
I think I use nobs2 instead of nobs1 because I followed the PASS convention (?)
my initial version use var instead of std in following PASS
The original effect_size based power functions in stats.power did not use var and std.
The std is assumed to be the same in null and alternative and is incorporated in effect size,
another naming issue mainly internal and generic, summary statistics helper function
There is no clear naming convention yet
statistic, stat: fully normalized test statistic, i.e. zscored for normal distributed tests
effect_size, stat (?) : normalized test statistic without sqrt(nobs) used in power
effect, stat (?) like diff or ratio differences
with value: for diff eff = p1 - p2 - value or for ratio eff = p1 / p2 - value
without value: eff = p1 - p2 or eff = p1 / p2 (no common name used yet, called either diff or ratio
effect_size (cohen) : effect / std_population as measure of relative size of effect not directly for power
...
I'm using stat or statistic to mean different things in different functions in statsmodels.stats
Also interpretation of effect_size varies by function/purpose/application
related issue:
which effect in ContrastResults for t_test with affine null constraint, i.e. value != 0 ? with or without value ? #742 (comment)
Activity
josef-pkt commentedon Mar 31, 2022
I'm currently working on power for equivalence tests but it is similar in power for other hypothesis tests
helper function for tost in
stats.proportionhelper functions in
stats.powernobs is either one-sample nobs, or nobs1 in usage in calling functions
return nobs1
new power in
stats.rates: PR #8166I think I use nobs2 instead of nobs1 because I followed the PASS convention (?)
my initial version use
varinstead ofstdin following PASSThe original effect_size based power functions in
stats.powerdid not use var and std.The std is assumed to be the same in null and alternative and is incorporated in effect size,
josef-pkt commentedon Apr 1, 2022
another naming issue mainly internal and
generic, summary statistics helper functionThere is no clear naming convention yet
difforratioI'm using
statorstatisticto mean different things in different functions in statsmodels.statsAlso interpretation of
effect_sizevaries by function/purpose/applicationrelated issue:
which effect in ContrastResults for t_test with affine null constraint, i.e. value != 0 ? with or without
value?#742 (comment)
effect and net_effect ?
effandneff/effn?