Repository navigation
ENH: Multinomial confidence interval (cont. 2953) - #3161
Conversation
This includes tests. There are a number of todos added here and there, and in the documentation, corresponding to what comes next (Goodman method and advice on what to use when). DOCS: explain where the multinomial CI tests come from TST: add missing test from Sison & Glaz paper Also define precision for the tests in the results file, and do some code style fixes. DOCS: cleanup before a real pass on method advice EHN: implement goodman method for multinomial CIs This includes tests. REF: refactor to fix function name FIX: integer division don't behave the same under py2 and py3 DOC: reduce 'TODO' ambitions a little The Hou-Chiang-Tai method would be interesting to implement, but would take a lot more time. DOC: fill docstring for multinomial_proportions_confint FIX: assert_raises_regex is not available in numpy < 1.9 FIX: allow null values in `counts` DOC: Formatting, and include multinomial_confint docstring in docs DOC: formatting and phrasing BUG: str.format() does not exist in python < 2.7 DOC: formatting DOC: a few more details and coming closer to conventions STY: variable names and performance * Don't use `l`, which can be mixed up with `1` * Use exp sum log instead of product division * Use `np.minimum` and `np.maximum` EHN: update method name matching and checks on `counts` In particular, counts can't have 0-valued entries, as the behavior is undefined in that case. DOC: clarify details of the sison-glaz method
|
The case with zero count fails in all older versions on TravisCI. we are not testing with scipy version between 0.14 and 0.17 on TravisCI. (0.17, 0.18 are the current latest versions that we get from conda) (because of the two year release delay, we are testing with ancient scipy 0.11 to 0.14 ) |
|
with scipy 0.16.1 poisson doesn't allow zero mean In scipy 0.17.0 I get We cannot use |
|
Changes Unknown when pulling f3dfc0a on josef-pkt:multinomial_ci2 into * on statsmodels:master*. |
|
all green, I leave the workaround the way it is because this way it is a no-op for scipy >= 0.17. aside: I thought the function might be vectorized, but the proportion p is scalar. I still need to remove a left-in debug print, otherwise I think this looks good. |
f3dfc0a to
d1a258c
Compare
|
Changes Unknown when pulling d1a258c on josef-pkt:multinomial_ci2 into * on statsmodels:master*. |
ENH: Multinomial confidence interval closes statsmodels#2953
this continues PR #2953
remove exception for zero counts
allow counts to be zero or have decimals
speedup by avoiding calculating same value several times