pystatsbio 2.0.0__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/CHANGELOG.md +134 -0
  2. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/PKG-INFO +47 -8
  3. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/README.md +45 -6
  4. pystatsbio-4.0.0/docs/PYSTATSBIO_CONTEXT.md +981 -0
  5. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/conf.py +2 -2
  6. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pyproject.toml +7 -4
  7. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/CONVENTIONS.md +2 -2
  8. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/__init__.py +1 -1
  9. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/_common.py +2 -1
  10. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/_roc.py +3 -2
  11. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_fit.py +63 -62
  12. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_potency.py +90 -15
  13. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/epi/_measures.py +3 -2
  14. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/epi/_standardize.py +47 -15
  15. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/__init__.py +11 -1
  16. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/meta/_random.py +38 -33
  17. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/pk/_nca.py +21 -17
  18. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_crossover.py +12 -1
  19. pystatsbio-4.0.0/tests/doseresponse/test_ryegrass_drc.py +77 -0
  20. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/epi/test_epi.py +53 -17
  21. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/gee/test_gee.py +1 -1
  22. pystatsbio-4.0.0/tests/meta/test_metafor_bcg.py +61 -0
  23. pystatsbio-4.0.0/tests/pk/test_ars_lambda_z.py +33 -0
  24. pystatsbio-4.0.0/validation/README.md +47 -0
  25. pystatsbio-4.0.0/validation/pyproject.toml +20 -0
  26. pystatsbio-4.0.0/validation/pystatsbioval/__init__.py +24 -0
  27. pystatsbio-4.0.0/validation/pystatsbioval/device.py +156 -0
  28. pystatsbio-4.0.0/validation/pystatsbioval/estimates.py +44 -0
  29. pystatsbio-4.0.0/validation/pystatsbioval/measure.py +156 -0
  30. pystatsbio-4.0.0/validation/pystatsbioval/record.py +83 -0
  31. pystatsbio-4.0.0/validation/pystatsbioval/rrunner.py +69 -0
  32. pystatsbio-4.0.0/validation/pystatsbioval/serialize.py +49 -0
  33. pystatsbio-4.0.0/validation/pystatsbioval/timing.py +76 -0
  34. pystatsbio-4.0.0/validation/tests/test_harness.py +188 -0
  35. pystatsbio-2.0.0/docs/PYSTATSBIO_CONTEXT.md +0 -785
  36. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.github/workflows/publish.yml +0 -0
  37. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.github/workflows/trigger-docs-rebuild.yml +0 -0
  38. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.gitignore +0 -0
  39. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.release/CHECKLIST.md +0 -0
  40. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.release/UNRELEASED.md +0 -0
  41. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/.release/release.py +0 -0
  42. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/LICENSE +0 -0
  43. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/Forge.md +0 -0
  44. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/GPU_BACKEND_NOTES.md +0 -0
  45. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/Makefile +0 -0
  46. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/PROGRESS.md +0 -0
  47. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/Powerhouse.md +0 -0
  48. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/SGC_BIO_DIRECTIVE.md +0 -0
  49. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/SGC_CORE_DIRECTIVE.md +0 -0
  50. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.buildinfo +0 -0
  51. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/__intersphinx_cache__/numpy_objects.inv +0 -0
  52. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/__intersphinx_cache__/python_objects.inv +0 -0
  53. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/__intersphinx_cache__/scipy_objects.inv +0 -0
  54. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/diagnostic.doctree +0 -0
  55. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/doseresponse.doctree +0 -0
  56. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/environment.pickle +0 -0
  57. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/index.doctree +0 -0
  58. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/pk.doctree +0 -0
  59. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/.doctrees/power.doctree +0 -0
  60. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/index.html +0 -0
  61. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/diagnostic/_accuracy.html +0 -0
  62. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/diagnostic/_batch.html +0 -0
  63. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/diagnostic/_common.html +0 -0
  64. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/diagnostic/_cutoff.html +0 -0
  65. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/diagnostic/_roc.html +0 -0
  66. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_batch.html +0 -0
  67. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_bmd.html +0 -0
  68. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_common.html +0 -0
  69. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_fit.html +0 -0
  70. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_models.html +0 -0
  71. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/doseresponse/_potency.html +0 -0
  72. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/pk/_common.html +0 -0
  73. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/pk/_nca.html +0 -0
  74. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_anova.html +0 -0
  75. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_cluster.html +0 -0
  76. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_common.html +0 -0
  77. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_crossover.html +0 -0
  78. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_means.html +0 -0
  79. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_noninferiority.html +0 -0
  80. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_proportions.html +0 -0
  81. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_modules/pystatsbio/power/_survival.html +0 -0
  82. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_sources/diagnostic.rst.txt +0 -0
  83. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_sources/doseresponse.rst.txt +0 -0
  84. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_sources/index.rst.txt +0 -0
  85. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_sources/pk.rst.txt +0 -0
  86. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_sources/power.rst.txt +0 -0
  87. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/base-stemmer.js +0 -0
  88. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/basic.css +0 -0
  89. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/custom.css +0 -0
  90. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/debug.css +0 -0
  91. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/doctools.js +0 -0
  92. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/documentation_options.js +0 -0
  93. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/english-stemmer.js +0 -0
  94. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/file.png +0 -0
  95. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/language_data.js +0 -0
  96. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/minus.png +0 -0
  97. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/plus.png +0 -0
  98. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/pygments.css +0 -0
  99. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/scripts/furo-extensions.js +0 -0
  100. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/scripts/furo.js +0 -0
  101. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/scripts/furo.js.LICENSE.txt +0 -0
  102. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/scripts/furo.js.map +0 -0
  103. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/searchtools.js +0 -0
  104. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/skeleton.css +0 -0
  105. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/sphinx_highlight.js +0 -0
  106. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/styles/furo-extensions.css +0 -0
  107. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/styles/furo-extensions.css.map +0 -0
  108. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/styles/furo.css +0 -0
  109. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/_static/styles/furo.css.map +0 -0
  110. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/diagnostic.html +0 -0
  111. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/doseresponse.html +0 -0
  112. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/genindex.html +0 -0
  113. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/index.html +0 -0
  114. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/objects.inv +0 -0
  115. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/pk.html +0 -0
  116. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/power.html +0 -0
  117. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/py-modindex.html +0 -0
  118. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/search.html +0 -0
  119. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_build/html/searchindex.js +0 -0
  120. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/_static/custom.css +0 -0
  121. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/diagnostic.rst +0 -0
  122. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/doseresponse.rst +0 -0
  123. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/epi.rst +0 -0
  124. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/gee.rst +0 -0
  125. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/index.rst +0 -0
  126. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/meta.rst +0 -0
  127. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/pk.rst +0 -0
  128. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/docs/power.rst +0 -0
  129. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/__init__.py +0 -0
  130. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/_accuracy.py +0 -0
  131. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/_batch.py +0 -0
  132. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/diagnostic/_cutoff.py +0 -0
  133. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/__init__.py +0 -0
  134. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_batch.py +0 -0
  135. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_bmd.py +0 -0
  136. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_common.py +0 -0
  137. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/doseresponse/_models.py +0 -0
  138. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/epi/__init__.py +0 -0
  139. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/epi/_common.py +0 -0
  140. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/epi/_mantel_haenszel.py +0 -0
  141. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/_common.py +0 -0
  142. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/_correlation.py +0 -0
  143. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/_estimating_equations.py +0 -0
  144. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/_sandwich.py +0 -0
  145. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/backends/__init__.py +0 -0
  146. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/backends/_gpu_correlation.py +0 -0
  147. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/backends/_gpu_family.py +0 -0
  148. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/gee/backends/gpu_fit.py +0 -0
  149. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/meta/__init__.py +0 -0
  150. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/meta/_common.py +0 -0
  151. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/meta/_fixed.py +0 -0
  152. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/meta/_heterogeneity.py +0 -0
  153. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/pk/__init__.py +0 -0
  154. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/pk/_common.py +0 -0
  155. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/__init__.py +0 -0
  156. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_anova.py +0 -0
  157. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_cluster.py +0 -0
  158. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_common.py +0 -0
  159. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_means.py +0 -0
  160. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_noninferiority.py +0 -0
  161. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_proportions.py +0 -0
  162. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/power/_survival.py +0 -0
  163. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/pystatsbio/py.typed +0 -0
  164. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/__init__.py +0 -0
  165. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/__init__.py +0 -0
  166. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_accuracy.py +0 -0
  167. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_batch.py +0 -0
  168. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_common.py +0 -0
  169. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_cutoff.py +0 -0
  170. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_roc.py +0 -0
  171. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/diagnostic/test_roc_test.py +0 -0
  172. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/__init__.py +0 -0
  173. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_batch.py +0 -0
  174. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_bmd.py +0 -0
  175. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_common.py +0 -0
  176. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_fit.py +0 -0
  177. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_models.py +0 -0
  178. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/doseresponse/test_potency.py +0 -0
  179. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/epi/__init__.py +0 -0
  180. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/gee/__init__.py +0 -0
  181. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/meta/__init__.py +0 -0
  182. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/meta/test_meta.py +0 -0
  183. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/pk/__init__.py +0 -0
  184. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/pk/test_common.py +0 -0
  185. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/pk/test_nca.py +0 -0
  186. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/__init__.py +0 -0
  187. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_anova.py +0 -0
  188. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_cluster.py +0 -0
  189. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_common.py +0 -0
  190. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_crossover.py +0 -0
  191. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_means.py +0 -0
  192. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_noninferiority.py +0 -0
  193. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_proportions.py +0 -0
  194. {pystatsbio-2.0.0 → pystatsbio-4.0.0}/tests/power/test_survival.py +0 -0
@@ -1,5 +1,139 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Summary
6
+
7
+ 4.0.0 is a correctness bundle from the first full validation sweep of every
8
+ subsystem against its R reference (drc, PKNCA/NonCompart, pROC/epiR, pwr/PowerTOST,
9
+ epiR/epitools, metafor, geepack). It fixes several silently-wrong results in the
10
+ dose-response and epidemiology modules and a heterogeneity-statistic bug in
11
+ meta-analysis, plus documentation corrections. Results now agree with the R
12
+ references to their stated tolerances. It is a **major** release because one fix
13
+ changes a public signature (see Breaking changes).
14
+
15
+ ### Breaking changes
16
+
17
+ - **`epi.rate_standardize(method="indirect")` now requires a `standard_weights`
18
+ argument** (the standard population's stratum sizes) to compute the standardized
19
+ rate, and raises `ValidationError` without it. Previously the standardized rate
20
+ was silently wrong (it collapsed to the crude study rate); computing it correctly
21
+ needs the standard population's age distribution, which the old signature did not
22
+ carry. The SIR (the primary indirect output) is unaffected. Direct
23
+ standardization is unchanged.
24
+
25
+ ### Fixed
26
+
27
+ - **`doseresponse.ec50()` now returns the true EC50/ED50 for asymmetric models.**
28
+ It previously returned the model's raw `e` location parameter, which is the
29
+ half-maximal dose only for the symmetric LL.4 model; for LL.5/W1.4/W2.4/BC.5 it
30
+ was off by 9–27% (e.g. LL.5 on `drc::ryegrass`: 2.21 vs the correct 3.02).
31
+ `ec50()` now solves the fitted curve for the dose at the half-maximal response,
32
+ matching `drc::ED(type="relative")` to <2e-5, and its confidence-interval SE
33
+ comes from the delta method applied to the solved ED50 (matching
34
+ `drc::ED(interval="delta")`). LL.4 is unchanged (ED50 == e).
35
+ (`pystatsbio/doseresponse/_potency.py`)
36
+ - **`doseresponse.fit_drm(model="W2.4")` no longer converges to an inferior local
37
+ optimum on decreasing data.** The data-driven self-start seeded the wrong basin,
38
+ silently returning a ~14%-worse RSS with swapped asymptotes (RSS 6.02 vs drc's
39
+ 5.29 on `ryegrass`). An auto-start W2.4 fit now also tries the mirror start and
40
+ keeps the lower-RSS result, recovering the natural-label global optimum.
41
+ Multistart never worsens a fit. (`pystatsbio/doseresponse/_fit.py`)
42
+ - **`epi.epi_2by2` population attributable fraction now uses the exposure
43
+ prevalence.** Levin's PAF was computed with the disease prevalence `(a+c)/n`
44
+ instead of the exposure prevalence `(a+b)/n`, giving a value matching no
45
+ standard estimand (e.g. 0.286 instead of the correct 0.500 on a table with
46
+ RR=3 and 50% exposed). (`pystatsbio/epi/_measures.py`)
47
+ - **`epi.rate_standardize(method="indirect")` now returns the correct
48
+ standardized rate.** The adjusted rate weighted the standard rates by the
49
+ *study* person-time, which algebraically collapsed it to the crude study rate.
50
+ It now takes a new **`standard_weights`** argument (the standard population's
51
+ stratum sizes, matching `epitools::ageadjust.indirect`'s `stdpop`) and returns
52
+ `SIR × standard-population crude rate`, matching epitools to ~1e-13. The
53
+ `indirect` method now requires `standard_weights` and fails loud without it
54
+ (the SIR itself is unaffected). (`pystatsbio/epi/_standardize.py`)
55
+ - **`meta.rma` now reports estimator-specific I² and H².** They were computed
56
+ from Cochran's Q (the DerSimonian-Laird value) for every estimator, so
57
+ `method="REML"` (the default) and `method="PM"` reported DL's heterogeneity
58
+ statistics instead of their own (e.g. REML I² 92.65 instead of 92.07 on the
59
+ BCG dataset). I²/H² now come from each method's tau² via the "typical"
60
+ within-study variance, matching `metafor::rma`; DL is unchanged. Also,
61
+ `method="REML"`'s tau² standard error now uses the expected (Fisher)
62
+ information, matching `metafor` to ~1e-8. (`pystatsbio/meta/_random.py`)
63
+ - **`pk.nca` terminal-slope (lambda_z) auto-selection now uses the WinNonlin/
64
+ NonCompart "Adjusted R-squared Best Fit" (ARS) rule.** It previously took the
65
+ strict argmax of the adjusted R², which on some profiles selects fewer terminal
66
+ points than the pharmacometrics standard (e.g. 3 vs 7 points on one
67
+ Theophylline subject, a ~4% half-life difference). It now chooses the window
68
+ with the most points whose adjusted R² is within 0.0001 of the maximum,
69
+ matching `NonCompart::sNCA` to machine precision across the Theophylline
70
+ dataset. (`pystatsbio/pk/_nca.py`)
71
+
72
+ ### Documentation
73
+
74
+ These correct descriptions and references where the code was already correct and
75
+ R-matching; no numeric behaviour changed.
76
+
77
+ - `doseresponse.ec50()`: the confidence interval is a raw-scale symmetric Wald
78
+ interval (delta method), not a log-scale interval.
79
+ - `diagnostic.roc()` AUC CI: described as a symmetric Wald interval on the AUC
80
+ scale (matching `pROC::ci.auc(method="delong")`), not "logit-transformed".
81
+ - `power.power_crossover_be()`: documents that power uses the noncentral-t
82
+ approximation (PowerTOST `method="nct"`), which differs from PowerTOST's default
83
+ `exact` (Owen's Q) in power by up to ~1e-2 at low power/high CV; sample size is
84
+ unaffected.
85
+ - README power R-reference table: corrected three entries that named R functions
86
+ which do not exist in the cited packages (`power_anova_factorial`,
87
+ `power_superiority_mean`, `power_cluster`) and re-pointed `power_fisher_test` and
88
+ `power_crossover_be` to the references they actually match.
89
+ - `gee`: documents that `.scale`/`.alpha` use a degrees-of-freedom correction
90
+ (matching statsmodels; differs from geepack's uncorrected moments by <1-2%),
91
+ while coefficients and robust SE match geepack.
92
+ - `epi.rate_standardize` (direct): clarified that the CI is a normal approximation
93
+ (the point estimate and variance match `epitools::ageadjust.direct`; the
94
+ Fay-Feuer gamma interval endpoints differ).
95
+
96
+
97
+ ## 3.0.0
98
+
99
+ ### Summary
100
+
101
+ 3.0 tracks the PyStatistics 5.0 API. PyStatsBio's statistical results are
102
+ unchanged; this is a breaking release because the required PyStatistics floor
103
+ moves to 5.0 (the 4.x API it was built against is gone) and one relayed value
104
+ changes.
105
+
106
+ ### Changed
107
+
108
+ - **Requires `pystatistics>=5.0`** (was `>=4.0`). PyStatistics 5.0 hard-renamed
109
+ ~40 public names and removed the 4.x surface with no shim, so PyStatsBio
110
+ cannot run on 4.x. PyStatsBio's own source needed no code changes: its only
111
+ coupling to PyStatistics is through internal infrastructure
112
+ (`core.exceptions`, `core.result`, `core.compute.{backend,device,tolerances}`,
113
+ `regression.families`), all of which 5.0 left stable. Verified by running the
114
+ full test suite against `pystatistics==5.0.0` from PyPI. (`pyproject.toml`)
115
+ - **GLM/GEE family names are lowercase.** `gee(..., family="gamma").family_name`
116
+ now returns `"gamma"` instead of `"Gamma"`, matching the sibling families
117
+ (`"gaussian"`, `"binomial"`, `"poisson"`). The value is relayed straight from
118
+ PyStatistics' `Family.name`, which 5.0 changed for naming consistency
119
+ (`GammaFamily`→`Gamma`, `.name` `'Gamma'`→`'gamma'`); PyStatsBio's GEE code
120
+ (`gee/__init__.py`) was already correct and needed no change. Updated the one
121
+ stale test assertion in `tests/gee/test_gee.py`
122
+ (`TestBasicFitting::test_gamma_family`).
123
+
124
+ ### Fixed
125
+
126
+ - **README dose-response model identifier corrected**: the `doseresponse`
127
+ models list advertised `BC.4` for the Brain-Cousens hormesis model, but
128
+ `fit_drm`/`fit_drm_batch` only accept `BC.5` (the shipped model is the
129
+ 5-parameter Brain-Cousens). Following the README verbatim raised a
130
+ `ValidationError`. The README now lists `BC.5`; the code is unchanged.
131
+ - `docs/conf.py` `version`/`release` were stuck at `0.1.0` (never tracked the
132
+ package version); set to `3.0.0`.
133
+ - `pystatsbio/CONVENTIONS.md` §0 now cites the pystatistics **5.0** constitution
134
+ and its amendments **A1–A14** (was "4.0" / "A1–A5").
135
+
136
+
3
137
  ## 2.0.0 — the consistency release
4
138
 
5
139
  A library-wide pass that aligns PyStatsBio with the PyStatistics 4.0 API
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pystatsbio
3
- Version: 2.0.0
3
+ Version: 4.0.0
4
4
  Summary: Biotech and pharmaceutical statistical computing for Python
5
5
  Project-URL: Homepage, https://sgcx.org/technology/pystatsbio/
6
6
  Project-URL: Documentation, https://sgcx.org/docs/pystatsbio/
@@ -23,7 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
23
23
  Classifier: Typing :: Typed
24
24
  Requires-Python: >=3.11
25
25
  Requires-Dist: numpy>=1.24
26
- Requires-Dist: pystatistics>=4.0
26
+ Requires-Dist: pystatistics>=5.0
27
27
  Requires-Dist: scipy>=1.10
28
28
  Provides-Extra: all
29
29
  Requires-Dist: furo; extra == 'all'
@@ -69,6 +69,45 @@ Each function states exactly which R function it replicates and to what toleranc
69
69
 
70
70
  ---
71
71
 
72
+ ## What's New in 4.0
73
+
74
+ Version 4.0 is a correctness release from a full validation sweep of every module
75
+ against its R reference (drc, PKNCA/NonCompart, pROC/epiR, pwr/PowerTOST, metafor,
76
+ geepack). It fixes several results that were silently wrong and now agree with the
77
+ R references to tight tolerances:
78
+
79
+ - **`doseresponse.ec50()`** returns the true EC50/ED50 for the asymmetric models
80
+ (LL.5, W1.4, W2.4, BC.5), by solving the fitted curve for the half-maximal dose
81
+ rather than returning the raw location parameter (which was off by up to ~27%).
82
+ - **`doseresponse.fit_drm(model="W2.4")`** no longer converges to an inferior local
83
+ optimum on decreasing data.
84
+ - **`epi.epi_2by2`** population attributable fraction now uses the exposure
85
+ prevalence in Levin's formula.
86
+ - **`meta.rma`** reports estimator-specific I²/H² (the default REML/PM previously
87
+ reported the DerSimonian-Laird value).
88
+ - **`pk.nca`** terminal-slope selection uses the WinNonlin/NonCompart "best-fit"
89
+ rule, matching the reference tools.
90
+
91
+ **Breaking change:** `epi.rate_standardize(method="indirect")` now requires a
92
+ `standard_weights` argument (the standard population's age distribution) to compute
93
+ the standardized rate — previously it was silently wrong. The SIR is unaffected.
94
+
95
+ ## What's New in 3.0
96
+
97
+ Version 3.0 tracks the PyStatistics 5.0 API. **It requires `pystatistics>=5.0`**
98
+ and will not run on 4.x. PyStatsBio's own statistical results are unchanged; the
99
+ breaking change is the raised dependency floor plus one relayed value:
100
+
101
+ - **GLM/GEE family names are lowercase.** Following PyStatistics 5.0's naming
102
+ cleanup, the Gamma family now reports `result.family_name == "gamma"` (was
103
+ `"Gamma"`), consistent with `"gaussian"`, `"binomial"`, and `"poisson"`. Code
104
+ that compared against the capitalized `"Gamma"` must switch to `"gamma"`.
105
+
106
+ Everything introduced in 2.0 — the `…Solution` result objects, the descriptive
107
+ power-analysis parameters, the hyphenated option values, and the
108
+ `ValidationError` / `ConvergenceError` / `NumericalError` taxonomy — is
109
+ unchanged.
110
+
72
111
  ## What's New in 2.0
73
112
 
74
113
  Version 2.0 is a consistency release that aligns the whole library with the
@@ -285,16 +324,16 @@ print(result.summary())
285
324
  | `power_t_test()` | `pwr::pwr.t.test()` |
286
325
  | `power_paired_t_test()` | `pwr::pwr.t.test(type="paired")` |
287
326
  | `power_prop_test()` | `pwr::pwr.2p.test()` |
288
- | `power_fisher_test()` | `TrialSize::TwoSampleProportion.Equality()` |
327
+ | `power_fisher_test()` | `pwr::pwr.2p.test()` (via Cohen's h) |
289
328
  | `power_logrank()` | `gsDesign::nSurv()` |
290
329
  | `power_anova_oneway()` | `pwr::pwr.anova.test()` |
291
- | `power_anova_factorial()` | `TrialSize::FactorialDesign()` |
330
+ | `power_anova_factorial()` | `pwr::pwr.f2.test()` |
292
331
  | `power_noninf_mean()` | `TrialSize::TwoSampleMean.NIS()` |
293
332
  | `power_noninf_prop()` | `TrialSize::TwoSampleProportion.NIS()` |
294
333
  | `power_equiv_mean()` | `TrialSize::TwoSampleMean.Equivalence()` |
295
- | `power_superiority_mean()` | `TrialSize::TwoSampleMean.Superiority()` |
296
- | `power_crossover_be()` | `PowerTOST::sampleSize()` |
297
- | `power_cluster()` | `samplesize::n.twogroup()` with ICC |
334
+ | `power_superiority_mean()` | `TrialSize::TwoSampleMean.NIS()` |
335
+ | `power_crossover_be()` | `PowerTOST::sampleN.TOST()`, `power.TOST(method="nct")` |
336
+ | `power_cluster()` | `clusterPower`, `CRTSize` (ICC-adjusted) |
298
337
 
299
338
  ### `doseresponse` — Dose-Response Modeling
300
339
 
@@ -307,7 +346,7 @@ print(result.summary())
307
346
  | `bmd()` | `drc::bmd()` / `BMDS` |
308
347
 
309
348
  Models: `LL.4` (4PL), `LL.5` (5PL), `W1.4` (Weibull-1), `W2.4` (Weibull-2),
310
- `BC.4` (Brain-Cousens hormesis).
349
+ `BC.5` (Brain-Cousens hormesis).
311
350
 
312
351
  ### `diagnostic` — Diagnostic Accuracy
313
352
 
@@ -22,6 +22,45 @@ Each function states exactly which R function it replicates and to what toleranc
22
22
 
23
23
  ---
24
24
 
25
+ ## What's New in 4.0
26
+
27
+ Version 4.0 is a correctness release from a full validation sweep of every module
28
+ against its R reference (drc, PKNCA/NonCompart, pROC/epiR, pwr/PowerTOST, metafor,
29
+ geepack). It fixes several results that were silently wrong and now agree with the
30
+ R references to tight tolerances:
31
+
32
+ - **`doseresponse.ec50()`** returns the true EC50/ED50 for the asymmetric models
33
+ (LL.5, W1.4, W2.4, BC.5), by solving the fitted curve for the half-maximal dose
34
+ rather than returning the raw location parameter (which was off by up to ~27%).
35
+ - **`doseresponse.fit_drm(model="W2.4")`** no longer converges to an inferior local
36
+ optimum on decreasing data.
37
+ - **`epi.epi_2by2`** population attributable fraction now uses the exposure
38
+ prevalence in Levin's formula.
39
+ - **`meta.rma`** reports estimator-specific I²/H² (the default REML/PM previously
40
+ reported the DerSimonian-Laird value).
41
+ - **`pk.nca`** terminal-slope selection uses the WinNonlin/NonCompart "best-fit"
42
+ rule, matching the reference tools.
43
+
44
+ **Breaking change:** `epi.rate_standardize(method="indirect")` now requires a
45
+ `standard_weights` argument (the standard population's age distribution) to compute
46
+ the standardized rate — previously it was silently wrong. The SIR is unaffected.
47
+
48
+ ## What's New in 3.0
49
+
50
+ Version 3.0 tracks the PyStatistics 5.0 API. **It requires `pystatistics>=5.0`**
51
+ and will not run on 4.x. PyStatsBio's own statistical results are unchanged; the
52
+ breaking change is the raised dependency floor plus one relayed value:
53
+
54
+ - **GLM/GEE family names are lowercase.** Following PyStatistics 5.0's naming
55
+ cleanup, the Gamma family now reports `result.family_name == "gamma"` (was
56
+ `"Gamma"`), consistent with `"gaussian"`, `"binomial"`, and `"poisson"`. Code
57
+ that compared against the capitalized `"Gamma"` must switch to `"gamma"`.
58
+
59
+ Everything introduced in 2.0 — the `…Solution` result objects, the descriptive
60
+ power-analysis parameters, the hyphenated option values, and the
61
+ `ValidationError` / `ConvergenceError` / `NumericalError` taxonomy — is
62
+ unchanged.
63
+
25
64
  ## What's New in 2.0
26
65
 
27
66
  Version 2.0 is a consistency release that aligns the whole library with the
@@ -238,16 +277,16 @@ print(result.summary())
238
277
  | `power_t_test()` | `pwr::pwr.t.test()` |
239
278
  | `power_paired_t_test()` | `pwr::pwr.t.test(type="paired")` |
240
279
  | `power_prop_test()` | `pwr::pwr.2p.test()` |
241
- | `power_fisher_test()` | `TrialSize::TwoSampleProportion.Equality()` |
280
+ | `power_fisher_test()` | `pwr::pwr.2p.test()` (via Cohen's h) |
242
281
  | `power_logrank()` | `gsDesign::nSurv()` |
243
282
  | `power_anova_oneway()` | `pwr::pwr.anova.test()` |
244
- | `power_anova_factorial()` | `TrialSize::FactorialDesign()` |
283
+ | `power_anova_factorial()` | `pwr::pwr.f2.test()` |
245
284
  | `power_noninf_mean()` | `TrialSize::TwoSampleMean.NIS()` |
246
285
  | `power_noninf_prop()` | `TrialSize::TwoSampleProportion.NIS()` |
247
286
  | `power_equiv_mean()` | `TrialSize::TwoSampleMean.Equivalence()` |
248
- | `power_superiority_mean()` | `TrialSize::TwoSampleMean.Superiority()` |
249
- | `power_crossover_be()` | `PowerTOST::sampleSize()` |
250
- | `power_cluster()` | `samplesize::n.twogroup()` with ICC |
287
+ | `power_superiority_mean()` | `TrialSize::TwoSampleMean.NIS()` |
288
+ | `power_crossover_be()` | `PowerTOST::sampleN.TOST()`, `power.TOST(method="nct")` |
289
+ | `power_cluster()` | `clusterPower`, `CRTSize` (ICC-adjusted) |
251
290
 
252
291
  ### `doseresponse` — Dose-Response Modeling
253
292
 
@@ -260,7 +299,7 @@ print(result.summary())
260
299
  | `bmd()` | `drc::bmd()` / `BMDS` |
261
300
 
262
301
  Models: `LL.4` (4PL), `LL.5` (5PL), `W1.4` (Weibull-1), `W2.4` (Weibull-2),
263
- `BC.4` (Brain-Cousens hormesis).
302
+ `BC.5` (Brain-Cousens hormesis).
264
303
 
265
304
  ### `diagnostic` — Diagnostic Accuracy
266
305