Skip to main content

Clinical-trial and clinical-research statistical computing for Python

Project description

PyStatsClinical

Clinical-trial and clinical-research statistical computing for Python.

Status: 0.1.0 — first module shipped. The treatment-effect module is available now; more clinical-research methods are on the roadmap below.

PyStatsClinical is part of the open-core PyStatistics family:

Package Layer
pystatistics Fundamental, general statistics
pystatsbio Biotech / pharma statistics
pystatsclinical Clinical-trial / clinical-research statistics
pystatsgenomic Genomics / computational-biology statistics
pystatsfinance Financial / quantitative statistics
pystatsinsurance Actuarial / insurance statistics

Like its siblings, it builds on pystatistics for the general statistical layer and adds methods specific to clinical research.

What's available now (0.1.0)

Treatment-effect measures from a two-arm 2×2 — the canonical readout for a binary outcome:

from pystatsclinical import effect

r = effect.risk_measures(
    treated_events=15, treated_n=100,
    control_events=30, control_n=100,
)
print(r.summary())

risk_measures reports the control and experimental event rates (CER, EER), the absolute risk reduction (ARR) with a Newcombe or Wald confidence interval, the risk ratio (RR) with the Katz log-method interval, the relative risk reduction (RRR), and the number needed to treat / harm (NNT/NNH) with the Altman (1998) interval. It fails loud on invalid counts and on an undefined risk ratio (CER = 0).

Roadmap (candidates, not commitments)

  • Responder analysis: responder rate with a confidence interval at a clinical threshold.
  • Diagnostic accuracy: sensitivity, specificity, predictive values, likelihood ratios.
  • Non-inferiority / equivalence testing and stratified (Mantel–Haenszel) effects.

Installation

pip install pystatsclinical

License

MIT © Hai-Shuo. Part of the SGCX open-core ecosystem.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pystatsclinical-0.1.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pystatsclinical-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file pystatsclinical-0.1.1.tar.gz.

File metadata

  • Download URL: pystatsclinical-0.1.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pystatsclinical-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e43730d1576c1a0334949fd6e5059cc57efb0aed4db61c9227fe5b7189be6d13
MD5 72c9e9560e65b00c95ff5eed68bec25c
BLAKE2b-256 f16e1a9aec6fd6e3db289b6db4c95b32472246a2602fc6504799bb4305fc648c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pystatsclinical-0.1.1.tar.gz:

Publisher: publish.yml on sgcx-org/pystatsclinical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pystatsclinical-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pystatsclinical-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7ee6c05cac8ac9482b6a8779d3950c65992027175698e228d7871561223e777
MD5 84e47c4fe9b17f5b7b4a901d6ca1f8b8
BLAKE2b-256 0dcacc0b6beb020d5f6a0cdb574f33a72e03db3102077b6c7ef9098f8f937a16

See more details on using hashes here.

Provenance

The following attestation bundles were made for pystatsclinical-0.1.1-py3-none-any.whl:

Publisher: publish.yml on sgcx-org/pystatsclinical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page