Skip to main content

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

pygformula-1.0.5.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

pygformula-1.0.5-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file pygformula-1.0.5.tar.gz.

File metadata

  • Download URL: pygformula-1.0.5.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

Hashes for pygformula-1.0.5.tar.gz
Algorithm Hash digest
SHA256 5e2cbcf7068e4e6dac97929c21975ea29b189aab7717ac1dc51d387c28889894
MD5 68ebfa8c0dca3a91fad6cb05796f0404
BLAKE2b-256 af629a5f55bf769833917976d97363d1e21daa49aaa2da9b6c0cddd8313d3e5c

See more details on using hashes here.

Provenance

File details

Details for the file pygformula-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pygformula-1.0.5-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

Hashes for pygformula-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f393f929d4e0d416d6405270862a864ffe7346e1fc347b93dd9e1df70738d640
MD5 06722fa0c61aa25cebf0bf184b468dd1
BLAKE2b-256 9126f049ec513b3aac97296bbbe2706ec5755cb574ebf4eea1fada5a2757ca44

See more details on using hashes here.

Provenance

Supported by

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