This repository contains the lecture slides and code tutorial from the ACIC 2026 short course on ``Causal Machine Learning for Discovering Heterogeneous Treatment Effects''.
slides/: contains short course lecture slidesR/: contains R helper functions for coding demonstrationnotebooks/: contains quarto/R markdown notebooks for coding demonstrationdemo.qmd: quarto notebook with source code for coding walkthroughdemo.html: rendered html output fromdemo.qmddemo.Rmd: R markdown notebook with source code for coding walkthrough; this is provided for users who prefer R markdown over quarto
To run the demo.qmd (or demo.Rmd) notebook, you will need to have the following tools installed on your computer:
- quarto: a scientific and technical publishing system built on Pandoc; you can install quarto here
- R
- The code was initially developed using version 4.4.1, but other versions of R will likely work
All R packages can be installed from the renv.lock file. To do so,
-
Open the
acic2026-hte-short-course.Rprojfile in RStudio -
Check that the
renvR package has been installed on your computer. If not, you can install it via:install.packages('renv') -
After installing the
renvR package, run the following line of code in your R console:renv::restore()
This will install all R packages specified in the
renv.lockfile, which should be all the R packages needed to run the code in this repository.
Alternatively, you can install the necessary R packages manually. The R packages used in this repository include:
- yaml
- rmarkdown
- here
- dplyr
- ggplot2
- grf
- xnie/rlearner
- tibble
- tidyr
- tidyselect
- GGally
- causalDT
- CRE
- knitr
- lmtest
- sandwich
- glmnet
- xgboost (version 1.7.8.1)