Skip to main content

nonlinear-causal is a Python module for nonlinear causal inference built on top of Two-stage methods.

Project description

Pypi Python MIT

🧬 nonlinear-causal

logo

nonlinear-causal is a Python module for nonlinear causal inference, including hypothesis testing and confidence interval for causal effect, built on top of two-stage methods.

The proposed model is: model

$$ \phi(x) = \mathbf{z}^\prime \mathbf{\theta} + w, \quad y = \beta \phi(x) + \mathbf{z}^\prime \mathbf{\alpha} + \epsilon $$

  • $\beta$: marginal causal effect from X -> Y;
  • $\phi(\cdot)$: nonlinear causal link;

What We Can Do:

  • Estimate $\theta$ and $\beta$.
  • Hypothesis testing (HT) and confidence interval (CI) for marginal causal effect $\beta$.
  • Estimate nonlinear causal link $\phi(\cdot)$.

Installation

Install nonlinear-causal using pip

pip install nonlinear-causal

Install the latest version in Github:

pip install git+https://github.com/nl-causal/nonlinear-causal

Examples and notebooks

Reference

If you use this code please star 🌟 the repository and cite the following paper:

  • Dai, B., Li, C., Xue, H., Pan, W., & Shen, X. (2022). Inference of nonlinear causal effects with GWAS summary data. arXiv preprint arXiv:2209.08889.
@article{dai2022inference,
  title={Inference of nonlinear causal effects with GWAS summary data},
  author={Dai, Ben and Li, Chunlin and Xue, Haoran and Pan, Wei and Shen, Xiaotong},
  journal={arXiv preprint arXiv:2209.08889},
  year={2022}
}

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

nonlinear-causal-0.3.tar.gz (22.4 kB view hashes)

Uploaded Source

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