Add causal inference chapter#630
Conversation
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/f13c8856-f8ef-4e81-bb1d-b3c9d69be8cf Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/f13c8856-f8ef-4e81-bb1d-b3c9d69be8cf Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new self-contained causal inference chapter to the Quarto book/website, adapting and integrating material around potential outcomes, identification assumptions, and practical estimators using existing course datasets.
Changes:
- Adds new chapter
causal-inference.qmdplus supporting subfiles under_subfiles/causal-inference/. - Registers the new chapter in the book and website render/navigation YAMLs.
- Extends
references.bibandinst/WORDLISTfor new citations and terminology.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| references.bib | Adds causal inference references (Hernán & Robins; Rubin; Holland; Rosenbaum & Rubin). |
| inst/WORDLIST | Adds causal-inference-related spellcheck terms (ATE/ATT/ATU, IPW, exchangeability, etc.). |
| causal-inference.qmd | New chapter scaffold; includes subfiles and shared DAG section; adds learning objectives and summary. |
| _subfiles/causal-inference/_sec_potential_outcomes.qmd | Introduces potential outcomes and core definitions. |
| _subfiles/causal-inference/_sec_causal_estimands.qmd | Defines ATE/ATT/ATU with formal definitions. |
| _subfiles/causal-inference/_sec_assumptions.qmd | Defines consistency, exchangeability, and positivity. |
| _subfiles/causal-inference/_sec_rct.qmd | Explains why randomization identifies causal effects; HERS example. |
| _subfiles/causal-inference/_sec_observational.qmd | Defines confounding/backdoor criterion; WCGS observational framing. |
| _subfiles/causal-inference/_sec_regression_adjustment.qmd | Introduces G-computation/regression adjustment; HERS LDL example with code/table. |
| _subfiles/causal-inference/_sec_propensity_scores.qmd | Defines propensity score and IPW; WCGS example with code/diagnostic plot. |
| _quarto-website.yml | Adds the chapter to website render list and navbar. |
| _quarto-book.yml | Adds the chapter to the book chapter list. |
…used mutate Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/349bc19d-9f76-4d78-8fc6-e0ab6869a72c Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Addressed all open review comments in 9e7f939:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Done in 77e834d. Replaced the |
|
@copilot the causal inference section should come before predictor selection, like in RMB; adjust where definitions are placed accordingly |
…s to causal-inference chapter Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/255b7b24-f38c-418b-973c-f255208848af Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in c1159a8:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot consolidate #sec-causal-observational and #sec-causal-dags-chapter and make the narrative flow straightforward; make a note in copilot-instructions to strive for straightforward narrative flow |
…ive flow; add narrative flow guideline to copilot-instructions Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/9f8d55f1-b1f4-4aed-80bd-2e0c83e20642 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in 106d23c. Consolidation ( The chapter now flows: Potential Outcomes → Estimands → Assumptions → Randomized Experiments → Causal Thinking and DAGs → Observational Studies (applying DAGs to confounding) → Regression Adjustment → Propensity Scores. Copilot instructions: Added a "Narrative Flow" section under General Development Principles covering: introduce concepts before use, avoid forward references when the concept is needed to understand current content, and place foundational sections before applied sections. |
|
@copilot merge #sec-causal-observational and #sec-causal-dags-chapter into a single Observational Studies section; introduce observational studies first, then confounding, then introduce DAGs as a tool to help to identify confounders and sufficient adjustment sets |
…onfounding→DAGs flow Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/71b7ba92-564e-4d4c-8a73-22909b338284 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in a40a6d7. The two sections are now merged into a single
|
2026-04-28 23:27 UTC |
causal-inference.qmdchapter file_subfiles/causal-inference/directory with subfiles_quarto-book.ymland_quarto-website.yml(positioned beforepredictor-selection)inst/WORDLIST\widehat{\E{Y(a)}}instead of\widehat{\E}{Y(a)}(regression adjustment and propensity score subfiles)[@vittinghoff2e, Chapter 9]instead of@vittinghoff2e [Chapter 9]smokingmutate from the HERS LDL regression adjustment examplecausal-inferencebeforepredictor-selectionin book and website navigation; move DAG definitions (_sec-pred-sel-dag.qmd) into the causal inference chapter so they are defined in the chapter that appears first;predictor-selectionnow links back to those definitionshers-data-setupchunk inpredictor-selection.qmdso its analysis sections retain access tohers_ldlafter the DAG include was removed.github/copilot-instructions.mdinstructing contributors to introduce concepts before use and avoid forward references