pygformula: a python implementation of the parametric g-formula
Authors: Jing Li, Sophia Rein, Sean McGrath, Roger Logan, Ryan O’Dea, Miguel Hernán
Overview
The pygformula package implements the non-iterative conditional expectation (NICE) estimator of the g-formula algorithm (Robins, 1986). The g-formula can estimate an outcome’s counterfactual mean or risk under hypothetical treatment strategies (interventions) when there is sufficient information on time-varying treatments and confounders.
Features
- Treatments: discrete or continuous time-varying treatments.
- Outcomes: failure time outcomes or continuous/binary end of follow-up outcomes.
- Interventions: interventions on a single treatment or joint interventions on multiple treatments.
- Random measurement/visit process.
- Incorporation of a priori knowledge of the data structure.
- Censoring events.
- Competing events.
Requirements
The package requires python 3.8+ and these necessary dependencies:
- cmprsk
- joblib
- lifelines
- matplotlib
- numpy
- pandas
- prettytable
- pytruncreg
- scipy
- seaborn
- statsmodels
- tqdm
Documentation
The online documentation is available at pygformula documentation.
Issues
If you have any issues, please open an issue on github, we will regularly check the questions. For any additional questions or comments, please email jing_li@hsph.harvard.edu.
Metadata
Release files for pygformula 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygformula-1.2.0.tar.gz | 40.8 kB | Without provenance | Details for pygformula-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygformula-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for pygformula-1.2.0-py3-none-any.whl |
Total release size: 87.8 kB
Release files / pygformula-1.2.0.tar.gz
| Download URL | pygformula-1.2.0.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e75ca217a1341bc615ea3cc385b724ada34b8c8fb2a3cd7174ea65854b1288bd
|
|
BLAKE2b-256 checksum How to use checksums |
8bdcd920c99cff141e1c90aa0927b607a03a8481a5e0f90a808218a9885e0243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / pygformula-1.2.0-py3-none-any.whl
| Download URL | pygformula-1.2.0-py3-none-any.whl |
|---|---|
| Size | 47.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7ba16a640f3b890f96060e9306e1ec8565d9441a76ba7f1822b2671fb49a2b3
|
|
BLAKE2b-256 checksum How to use checksums |
2c4000d91f47cab46783c70717d0bfa65205dc69a4d8983c2e0a3935e9cc8e0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for pygformula 1.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.