Repository navigation
Conversation
863c2c3 to
f4b16c1
Compare
|
first commit fails on python 2.7, most likely integer division. |
f4b16c1 to
9c0890f
Compare
Codecov Report
@@ Coverage Diff @@
## master #4829 +/- ##
==========================================
+ Coverage 81.38% 81.41% +0.03%
==========================================
Files 581 581
Lines 90194 90611 +417
Branches 10077 10133 +56
==========================================
+ Hits 73406 73774 +368
- Misses 14498 14527 +29
- Partials 2290 2310 +20
Continue to review full report at Codecov.
|
|
I added future division to the first commit in a rebase naming order is reversed from one sample case related to existing functions: bug/limitation of odds_ratio OR value=1 is not supported in Miettinen, Nurminen formula for constrained estimator. current workaround is using default |
|
adding two more old functions, script is from 2015-08-30, earlier version is in #2605 (comment) Koopmans score confint for risk ratio for independent and paired samples paired case has no verified numbers in unit tests |
|
related aside: heteroscedasticity versus binomial, or don't be so negative about wald test with variance that doesn't satisfy null hypothesis. proportions_ztest uses wald with pooled variance, score_tests use variance using proportions under the null. If we allow for heteroscedasticity, e.g. unequal excess dispersion in different samples, then the binomial assumption does not hold and using HC variance, e.g. unpooled empirical variance as in t_test with separate variance would be more robust (AFAIU). The Monte Carlo simulations in the articles that compare small sample performance of different methods all use binomial assumption, AFAIK. I'm not sure whether we can actually estimate an "empirical" variance or dispersion in the two sample case, i.e. we would need repeated or multiple counts for each group, e.g. can we identify a beta-binomial dispersion parameter from the sample. |
|
last commit added draft for test_proportions_2indep in analogy to confint_proportion_2indep mostly copy-paste-adjust from the confint function only smoke test |
|
question: consistency of
quote from NCSS "Two Proportions" documentation Fagerland et al. don't have all analogous versions across |
|
question: should we add compare = "log-ratio" and "log-odds-ratio"? |
4ba3cec to
a00723d
Compare
|
about score confint for ratio: |
|
question: What works vectorized? everything except for score confint? All (semi-)exact methods will most likelily not be vectorized (most likely because of memory consumption, broadcasting to an extra dimension for sample space might work in some cases). score tests,and constrained parameter estimation, I'm not planning (for now) on adding internal loop vectorizing, so allowed argument shape will depend on the method, which IIIRC is similar to some other functions. |
a00723d to
791dc90
Compare
|
question: API for hypothesis test of equality, i.e. no some hypothesis tests are only available for equality p1 = p2 tests. Should we add those to the general tests with |
|
Notes (just as reminder): asymmetry, skewness and score confint Score confint are generally defined through two one-sided hypothesis tests at alpha / 2 confint for comparing two proportions use explicit formulas, but it will be relevant when we compare confint with the hypothesis tests. For example, Gart/Nam use skewness correction and I guess we get asymmetric tails when inverting the two one-sided score tests to get confint. |
|
BUG: value in test_proportions_2indep looks wrong I'm checking value equal to the upper confidence interval. |
|
I had forgotten to take log in the test version to match the confidence intervals. Also, score confint for ratio uses NAM without the Miettinen/Nurminen correction, so confint and test only match if correction=False Then: |
|
and the same for one-sided test, i.e. inferiority or superiority (after fixing another bug) Does the direction 'lower' - 'larger' and 'upper' - 'smaller' match? |
|
travis test run fails it looks to me pytest is trying to run a regular function that starts with |
|
my mistake (kind of) |
dc564f8 to
25b0adf
Compare
|
This includes now some power calculations #1197 no unit tests yet for nobs ratio different from 1 in power/samplesize (need R or Stata again) |
|
I'm getting close to the end, I have some uncommitted docstring and cleanup work todo/tocheck:
unit tests for vectorized - maybe not (see comment above: it works but not in all cases or for all methods) |
5db2308 to
7c0978f
Compare
|
reminder: my notebooks are in |
|
needs rebase should essentially be ready for 0.10, but I don't remember if there is anything left to do before merging. |
|
merged as rebased version #6675 |
update rebased version of this PR is #6675
see #4828
consolidating some experimental code from past weeks, continuation of #2605 (comment)
see also #2607