Skip to main content

A package to compute optimal adjustment sets in causal graphs

Project description

optimaladj: A library for computing optimal adjustment sets in causal graphical models

This package implements the algorithms introduced in Smucler, Sapienza and Rotnitzky (2020) to compute optimal adjustment sets in causal graphical models. The package provides a class, called CasualGraph, that inherits from networkx's DiGraph class and has methods to compute: the optimal, optimal minimal and optimal minimum adjustment sets for individualized treatment rules (point exposure dynamic treatment regimes) in non-parametric causal graphical models with latent variables.

Suppose we are given a causal graph G specifying:

  • a treatment variable A,
  • an outcome variable Y,
  • a set of observable (that is, non-latent) variables N, and
  • a set of observable variables that will be used to allocate treatment L.

Suppose moreover that there exists at least one adjustment set with respect to A and Y in G that is comprised of observable variables.

An optimal adjustment set is an observable adjustment set that yields the non-parametric estimator of the interventional mean with the smallest asymptotic variance among those that are based on observable adjustment sets.

An optimal minimal adjustment set is an observable adjustment set that yields the non-parametric estimator of the interventional mean with the smallest asymptotic variance among those that are based on observable minimal adjustment sets. An observable minimal adjustment set is a valid adjustment set such that all its variables are observable and the removal of any variable from it destroys validity.

An optimal minimum adjustment set is defined similarly, being optimal in the class of observable minimum adjustment sets, that is, valid observable adjustment sets of minimum cardinality among the observable adjustment sets.

Under these assumptions, Smucler, Sapienza and Rotnitzky (2020) show that optimal minimal and optimal minimum adjustment sets always exist, and can be computed in polynomial time. They also provide a sufficient criterion for the existance of an optimal adjustment set and a polynomial time algorithm to compute it when it exists.

Check out our notebook with examples.

Installation

You can install the development version of the package from Github by running

pip install git+https://github.com/facusapienza21/optimaladj.git#egg=optimaladj

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

optimaladj-0.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

optimaladj-0.0.1-py3-none-any.whl (7.2 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