Jitao David Zhang and Tom Michoel
This repository offers practitioners of drug discovery and development reproducible tutorials for doing causal inference. We provide three interactive notebooks to illustrate (1) causal inference with the generic programming language Python, (2) Bayesian causal inference with the statistical programming language GNU-R, and (3) model selection using the scientific programming language Julia.
The software repository accompanies our review article Causal inference in drug discovery and development, published in Drug Discovery Today in 2023, and is released with the CC-BY 4.0 license. Feedback through issues and pull requests are welcome.
We thank Zhiwen Jiang for inspirations and discussions.
See 2021-11-dowhy.ipynb. The examples are taken from the documentations of the DoWhy package.
- How to work with DoWhy in four steps:
- Modelling
- Identification
- Estimation
- Refutation
- Working with DoWhy and EconML: an non-linear example
- DoWhy API for Pandas data frames
Create a conda environment using the environment.yml file, install a new python kernel for Jupyter with the command below, and run the Jupyter notebook with the kernel.
conda activate causality
conda install -c conda-forge pip ipykernel
python -m ipykernel install --user --name causal --display-name "causality"See 2021-12-CausalSalad.Rmd. The models are largely taken from the Causal Salad 2021 repository contributed by Richard McElreath.
See 2022-08-CausalModelSelectio.jmd. This tutorial explains and illustrates the principles of causal model selection in the analysis of molecular QTL data. The tutorial is written in julia using Weave.jl. If you are not familiar with julia, download or clone the contents of this repository and open the file 2022-08-CausalModelSelection.html in a browser. The code itself uses basic statistical and plotting functions, and should be easy to translate to other languages.