Skip to main content

CEM-LinearInf is a Python package for linear causal inference, which can help you implement the whole process of causal inference easily.

Project description

CEM-LinearInf's Documentation

CEM-LinearInf is a Python package for linear causal inference, which can help you implement the whole process of causal inference easily.

Please check out the following sections for further information, including how to install and use this package, and related references.

💡 Installation

Install CEM_LinearInf using pip

pip install CEM_LinearInf

📖 Examples and notebooks

✏️ Functions

  • Coarsened Exact Matching (CEM)

    CEM is a data preprocessing algorithm in causal inference which can construct your observational data into 'quasi' experimental data easily, mitigating the model dependency, bias, and inefficiency of your estimation of the treatment effect (Ho, Imai, King, & Stuart 2007).

    Different coarsen methods and 1 to k matching method based on different distances are supported.

  • Balance Checking

    When we finish the coarsened exact matching, it is necessary to evaluate the quality of the matching with balance checking methods. When the covariate balance is achieved, the resulting effect estimate is less sensitive to model misspecification and ideally close to true treatment effect (Greifer, 2023).

    Different methods including L1 imbalance score, SMD, KS score, density plot, and empirical cdf plot are supported.

  • Treatment Effect Inference

    After conducting the coarsened exact matching and imbalance checking, we can estimate the average treatment effect ATT and heterogeneous treatment effect HTE with statistical inference methods.

    Linear regression models including OLS, Ridge, and Lasso are supported here.

  • Sensitivity Analysis

    When we conduct causal inference to the observational data, the most important assumption is that there is no unobserved confounding. Therefore, after finishing the treatment effect estimation, investigators are advised to conduct the sensitivity analysis to examine how fragile a result is against the possibility of unobserved confounders (Cinelli, Hazlett, 2020).

    In other words, we should examine how strong the effect of unobserved confounders should be to erase the treatment effect estimated.

    Omitted variable bias based sensitivity analysis method (Cinelli, Hazlett, 2020) and Wilcoxon's signed rank test based sensitivity analysis method (Rosenbaum, 2015) are supported here.

⭐️ Reference

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

CEM_LinearInf-0.0.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

CEM_LinearInf-0.0.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file CEM_LinearInf-0.0.1.tar.gz.

File metadata

  • Download URL: CEM_LinearInf-0.0.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for CEM_LinearInf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1d94609843bbc5750aaa23d1b38e3b27f1eb4ce95f0c68a59e61f03261cdfc67
MD5 778e877461bc390bd496d12f43f26f19
BLAKE2b-256 c61f76bd904a91036166f3452500f07b045938df89ce60f654c0195f9b6f0578

See more details on using hashes here.

File details

Details for the file CEM_LinearInf-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for CEM_LinearInf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a218e829559193a49e9e268fbdbf591122a125e383701c8f133fd5ac867ca82d
MD5 1ee1afde851a7c71043e8165fe46ce67
BLAKE2b-256 c2db716bc854d22a6f04236f3e8ccd0927f471ab282fb92aa3ea698a0a0cc41a

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