A python implementation of the parametric g-formula
Project description
pygformula: a python implementation of the parametric g-formula
Overview
The pygformula package implements the non-iterative conditional expectation (NICE) algorithm of the g-formula algorithm (Robins, 1986). The g-formula can estimate the counterfactual mean or risk of an outcome 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.
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.0.tar.gz
.
File metadata
- Download URL: pygformula-1.1.0.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ded4c3cc8f3d2d8e3d4426d33b79e7af97ab2d5dedd2706aeca0d6fd6fea60f4 |
|
MD5 | 5472757f694bbb2d4c1e24d2c00b3512 |
|
BLAKE2b-256 | b163b23ea20ddd8ac3a7a85b7cfdb32428c1cee055222d8f0607dce0569afd17 |
Provenance
File details
Details for the file pygformula-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pygformula-1.1.0-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4db27556708dec32f920d00e43be6e0f86622a8be3a5bd02cd9b99d93a32710 |
|
MD5 | 04707127e57cc6e0d3482e5ae16e9d0a |
|
BLAKE2b-256 | b2b56f0d18ea21e445bbe13a8bede3bcbf06fb6bc58135499d5a44f2bf6a1ea2 |