Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jrfiedler/causal_inference_julia_code
Julia code for part 2 of the book Causal Inference: What If, by Miguel Hernán and James Robins
https://github.com/jrfiedler/causal_inference_julia_code
causal-inference causality data-science julia julialang
Last synced: 4 months ago
JSON representation
Julia code for part 2 of the book Causal Inference: What If, by Miguel Hernán and James Robins
- Host: GitHub
- URL: https://github.com/jrfiedler/causal_inference_julia_code
- Owner: jrfiedler
- Created: 2021-12-20T19:29:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-08T02:22:05.000Z (about 3 years ago)
- Last Synced: 2024-09-30T08:41:27.571Z (4 months ago)
- Topics: causal-inference, causality, data-science, julia, julialang
- Language: Jupyter Notebook
- Homepage:
- Size: 601 KB
- Stars: 41
- Watchers: 1
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Julia Code for _Causal Inference: What If_
This repo contains Julia code for Part II of the book _Causal Inference: What If_, by Miguel Hernán and James Robins ([book site](https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/)):
> Hernán MA, Robins JM (2020). _Causal Inference: What If_. Boca Raton: Chapman & Hall/CRC.
These notebooks were translated from the Python version [here](http://www.github.com/jrfiedler/causal_inference_python_code), and the code also roughly corresponds to the Stata, R, or SAS programs found at the book site.
The code in this repo has been checked against the 30 March 2021 version of the book.
## Dependencies
Required Julia packages:
- IJulia.jl
- CSV.jl
- DataFrames.jl
- CategoricalArrays.jl
- CairoMakie.jl
- StatsBase.jl
- GLM.jl
- Distributions.jl
- Roots.jl
- Econometrics.jl
- PyCall.jlPyCall.jl allows you to call Python code from within Julia. See [PyCall's GitHub page](https://github.com/JuliaPy/PyCall.jl) for more information, in particular about the Python installation used. Within that Python installation, you'll also need Statsmodels package. You might want to use the Conda.jl package to install Statsmodels. If you're familiar with Python and know which Python installation is being used, you can install Statsmodels in one of the usual ways.
## Data
The data can be obtained from the [book site](https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/).
The notebooks all assume that the **CSV version** of the data has been saved in the same directory as the notebooks.
## Author
James Fiedler