A python implementation of the parametric g-formula
Project description
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.
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
Built Distribution
File details
Details for the file pygformula-1.1.3.tar.gz
.
File metadata
- Download URL: pygformula-1.1.3.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19fc7074dca669e6ae7b57e78134488569fd6180580b813ecd235a1a920c451 |
|
MD5 | d7cde3e015b311a2471e0bf7797fb802 |
|
BLAKE2b-256 | ccf5be1652cda0be68978d0be5a2329039957ddc5f40270f5171a53d641260e8 |
File details
Details for the file pygformula-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: pygformula-1.1.3-py3-none-any.whl
- Upload date:
- Size: 47.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c37a50ff685ed1502e69977ee0c173a3bc8c075b97fbba4a8c34f3c61b7129b |
|
MD5 | 408e36f8ecbaad1b1e74ef88a983b6ce |
|
BLAKE2b-256 | 72abe5e9cda2ff2863b81fbd360a04bc747f00bd9c85ed4f8e3abd6aa6b860ef |