Chapter 8 Causal Paths and Closing Back Doors

Learning objectives:

  • Identify paths in DAGs
  • Classify paths in DAGs
  • Start to close paths
  • Explore colliders
  • Motivate placebo tests
Session Info
sessionInfo()
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
## 
## time zone: UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] tidyr_1.3.2   readr_2.2.0   scales_1.4.0  janitor_2.2.1 infer_1.1.0  
## [6] gt_1.3.0      ggplot2_4.0.3 dplyr_1.2.1  
## 
## loaded via a namespace (and not attached):
##  [1] sass_0.4.10        generics_0.1.4     xml2_1.6.0         stringi_1.8.9     
##  [5] hms_1.1.4          digest_0.6.39      magrittr_2.0.5     evaluate_1.0.5    
##  [9] grid_4.6.1         timechange_0.4.0   RColorBrewer_1.1-3 bookdown_0.47     
## [13] fastmap_1.2.0      jsonlite_2.0.0     purrr_1.2.2        jquerylib_0.1.4   
## [17] cli_3.6.6          crayon_1.5.3       rlang_1.3.0        bit64_4.8.2       
## [21] withr_3.0.3        cachem_1.1.0       yaml_2.3.12        otel_0.2.0        
## [25] parallel_4.6.1     tools_4.6.1        tzdb_0.5.0         vctrs_0.7.3       
## [29] R6_2.6.1           lifecycle_1.0.5    lubridate_1.9.5    snakecase_0.11.1  
## [33] stringr_1.6.0      bit_4.6.0          fs_2.1.0           vroom_1.7.1       
## [37] pkgconfig_2.0.3    pillar_1.11.1      bslib_0.12.0       gtable_0.3.6      
## [41] glue_1.8.1         xfun_0.60          tibble_3.3.1       tidyselect_1.2.1  
## [45] rstudioapi_0.19.0  knitr_1.51         farver_2.1.2       htmltools_0.5.9   
## [49] rmarkdown_2.31     labeling_0.4.3     compiler_4.6.1     S7_0.2.2