Skip to main content

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.

Metadata

Release files for pystatsclinical 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pystatsclinical 0.1.1
File Size Uploaded Provenance
pystatsclinical-0.1.1.tar.gz 16.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pystatsclinical 0.1.1
File Interpreter ABI Platform
pystatsclinical-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / pystatsclinical-0.1.1.tar.gz

Download URL pystatsclinical-0.1.1.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e43730d1576c1a0334949fd6e5059cc57efb0aed4db61c9227fe5b7189be6d13
BLAKE2b-256 checksum
How to use checksums
f16e1a9aec6fd6e3db289b6db4c95b32472246a2602fc6504799bb4305fc648c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Release files / pystatsclinical-0.1.1-py3-none-any.whl

Download URL pystatsclinical-0.1.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7ee6c05cac8ac9482b6a8779d3950c65992027175698e228d7871561223e777
BLAKE2b-256 checksum
How to use checksums
0dcacc0b6beb020d5f6a0cdb574f33a72e03db3102077b6c7ef9098f8f937a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Security for pystatsclinical 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pystatsclinical-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page