Setup for Causal Inference and Causal Data Science Course

To complete before start of the course

Author

Wouter van Amsterdam

We will work with R. You can use your preferred way of working in R to do the practicals. Our preferred way is this:

We try to make our practicals light in the number of required packages, but the packages below are needed. You can install them via:

needed_packages <- c(
  "data.table", "broom", "purrr", "dagitty", "ggplot2", "dplyr", "marginaleffects",
  "MatchIt","survey","tableone"
)
cran_repo <- "https://mirror.lyrahosting.com/CRAN/" # <- a CRAN mirror in the Netherlands, can select another one from here https://cran.r-project.org/mirrors.html

for (pkg in needed_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg, repos=cran_repo)
  }
}