Skip to main content

Causal Inference in Python

Project description

Causal Inference in Python

Causal Inference in Python, or Causalinference in short, is a software package that implements various statistical and econometric methods used in the field variously known as Causal Inference, Program Evaluation, or Treatment Effect Analysis.

Work on Causalinference started in 2014 by Laurence Wong as a personal side project. It is distributed under the 3-Clause BSD license.

Important Links

The official website for Causalinference is

https://causalinferenceinpython.org

The most current development version is hosted on GitHub at

https://github.com/laurencium/causalinference

Package source and binary distribution files are available from PyPi at

https://pypi.python.org/pypi/causalinference

For an overview of the main features and uses of Causalinference, please refer to

https://github.com/laurencium/causalinference/blob/master/docs/tex/vignette.pdf

A blog dedicated to providing a more detailed walkthrough of Causalinference and the econometric theory behind it can be found at

https://laurencewong.com/software/

Main Features

  • Assessment of overlap in covariate distributions
  • Estimation of propensity score
  • Improvement of covariate balance through trimming
  • Subclassification on propensity score
  • Estimation of treatment effects via matching, blocking, weighting, and least squares

Dependencies

  • NumPy: 1.8.2 or higher
  • SciPy: 0.13.3 or higher

Installation

Causalinference can be installed using pip: ::

$ pip install causalinference

For help on setting up Pip, NumPy, and SciPy on Macs, check out this excellent guide <http://www.sourabhbajaj.com/mac-setup>_.

Minimal Example

The following illustrates how to create an instance of CausalModel: ::

from causalinference import CausalModel from causalinference.utils import random_data Y, D, X = random_data() causal = CausalModel(Y, D, X)

Invoking help on causal at this point should return a comprehensive listing of all the causal analysis tools available in Causalinference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

CausalInference-0.1.3-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

Details for the file CausalInference-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: CausalInference-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 51.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for CausalInference-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b69a58231411fa463a7ff825b425bfc36007cf87db59385018fbc57b7915b5
MD5 2d64f3fa5476f332160a3cb49db7eaa4
BLAKE2b-256 dc7f4504b42ef5a1158075954f54d08b95b2d5b2186da0ef9fcbcd0cf31411f2

See more details on using hashes here.

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