Skip to content

WIP ENH: rates, poisson means two-sample comparison - #2723

Closed
josef-pkt wants to merge 1 commit into
statsmodels:masterfrom
josef-pkt:poisson_2sample
Closed

josef-pkt wants to merge 1 commit into
statsmodels:masterfrom
josef-pkt:poisson_2sample

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

initial version, to store and to not forget

see #2718 add hypothesis tests and others for 2sample comparison of Poisson rates
companion to #2608 which is for 2-sample proportions

contains

asymptotic tests
exact and mid-p exact conditional
E-test: unconditional with exact distribution

main one missing
BB-test: Berger-Boos unconditional exact

Notes

E-test is brute force for small samples, vectorized and fast with small counts but will blow up memory with large counts, no numerical efficiency improvements of the algorithm.

missing reference numbers for E-test

unit tests compare to some published results, I haven't checked other stats packages yet.

TODO: a lot, I haven't thought much about API yet, nor about how to structure the code for extendability.

@josef-pkt josef-pkt changed the title WIP ENH: initial versions poisson_twosample, etest_twopoisson WIP ENH: rates, poisson means two-sample comparison Dec 4, 2015
@josef-pkt

Copy link
Copy Markdown
Member Author

amended commit to add e-test unit test numbers from Gu et al 2008

@josef-pkt

Copy link
Copy Markdown
Member Author

@josef-pkt

Copy link
Copy Markdown
Member Author

rebased (no merge conflicts)

for consistency: return a Results instance, has also the advantage that we can add the method as a string.

@coveralls

coveralls commented May 20, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 90.447% when pulling f254261 on josef-pkt:poisson_2sample into 90e2af8 on statsmodels:master.

@josef-pkt

Copy link
Copy Markdown
Member Author

rebased again, no merge conflicts

@coveralls

coveralls commented Nov 1, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 81.917% when pulling fe4e0a4 on josef-pkt:poisson_2sample into 5b8f20d on statsmodels:master.

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2723 into master will increase coverage by 0.03%.
The diff coverage is 93.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2723      +/-   ##
==========================================
+ Coverage   79.32%   79.35%   +0.03%     
==========================================
  Files         544      546       +2     
  Lines       81718    81895     +177     
  Branches     9255     9270      +15     
==========================================
+ Hits        64822    64989     +167     
- Misses      14802    14808       +6     
- Partials     2094     2098       +4
Impacted Files Coverage Δ
statsmodels/stats/tests/test_rates_poisson.py 100% <100%> (ø)
statsmodels/stats/rates.py 85.71% <85.71%> (ø)
statsmodels/tsa/vector_ar/vecm.py 93.87% <0%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b8f20d...fe4e0a4. Read the comment docs.

@josef-pkt

Copy link
Copy Markdown
Member Author

This pull request introduces 7 alerts - view on lgtm.com

new alerts:

  • 5 for Variable defined multiple times
  • 2 for Potentially uninitialized local variable

Comment posted by lgtm.com

@josef-pkt

Copy link
Copy Markdown
Member Author

rebased version #6677 merged

@josef-pkt josef-pkt closed this May 5, 2020
@josef-pkt josef-pkt modified the milestones: 0.10, 0.12 May 5, 2020
@josef-pkt josef-pkt added the superseded Used for PRs with content that is superseded by a newer PR label Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-stats superseded Used for PRs with content that is superseded by a newer PR type-enh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants