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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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