# causalinferencebook_stata **Repository Path**: econometric/causalinferencebook_stata ## Basic Information - **Project Name**: causalinferencebook_stata - **Description**: Stata Code for Causal Inference: What If - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 3 - **Created**: 2020-03-01 - **Last Updated**: 2022-10-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # _Causal Inference_ 资源汇总 书籍主页为: https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/ Python代码链接为: https://github.com/jrfiedler/causal_inference_python_code Stata & R代码链接为: https://remlapmot.github.io/cibookex-r/index.html Causal Inference: What If. R and Stata code for Exercises链接为: https://remlapmot.github.io/cibookex-r/index.html To cite the book, please use “Hernán MA, Robins JM (2020). Causal Inference: What If. Boca Raton: Chapman & Hall/CRC.” # _Causal Inference_ Stata Code This repo contains Stata code for 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/). The code here corresponds to the SAS programs found at the book site. ## Data The data can be obtained from the [book site](https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/). The do files all assume that the Stata version of the data (.dta) has been saved in the same directory as the do files. To automatically set the working directory, open Stata by directly double-clicking on the do files. If you open the do files from within Stata you will need to set the working directory manually: before running the command: use "nhefs.dta" add your path (eg. use "C:\Users\Downloads\nhefs.dta") ## Author Ellie Murray