Add chapters 19–23 (Part III) and standardize LaTeX macros across all chapters#69
Open
Add chapters 19–23 (Part III) and standardize LaTeX macros across all chapters#69
Conversation
…ents
Chapter 19: Time-varying treatments
- Treatment history notation, counterfactuals under strategies
- Static vs. dynamic treatment strategies
- Sequentially randomized experiments
- Sequential exchangeability and positivity
- Time-varying confounding and feedback
Chapter 20: Treatment-confounder feedback
- Elements of feedback: L_k affected by A_{k-1} and confounds A_k
- Why standard regression (stratification, multivariable) fails
- Structural nature of the bias — not fixable by model flexibility
- Adjusting for past treatment produces controlled direct effects
Chapter 21: G-methods for time-varying treatments
- G-formula for time-varying treatments (big g-formula)
- IP weighting with stabilized weights SW^A and SW^C
- Doubly robust AIPW estimator
- G-estimation of structural nested mean models (SNMMs)
- Censoring as a time-varying treatment
Chapter 22: Target trial emulation
- ITT vs. per-protocol effects
- Specifying the target trial components
- Immortal time bias and new user/active comparator design
- Sequential trials design for time zero alignment
- Unified framework for observational causal inference
Chapter 23: Causal mediation
- Limitations of classical Baron-Kenny mediation analysis
- Natural direct and indirect effects (NDE, NIE)
- Controlled direct effect (CDE)
- Interventionist/stochastic mediation approach
- Time-varying mediators as a special case of g-methods
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ucdavis/win/sessions/a538ac1b-2966-4beb-8ded-682aaf0e2482 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ucdavis/win/sessions/a538ac1b-2966-4beb-8ded-682aaf0e2482 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Transcribe lecture notes to match textbook content
Add chapters 19–23 (Part III) and standardize LaTeX macros across all chapters
May 4, 2026
Collaborator
|
@copilot fix spellcheck |
Agent-Logs-Url: https://github.com/ucdavis/win/sessions/649063ba-d668-42f8-8808-dc446b1d6867 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Part III content (Chapters 19–23) to the Quarto lecture notes and standardizes common LaTeX operator notation across the existing chapters using the shared latex-macros submodule.
Changes:
- Added new Quarto chapters 19–23 (time-varying treatments through mediation), each rendering to HTML/RevealJS/PDF (and DOCX, consistent with existing chapters).
- Standardized expectation and independence notation across chapters (e.g.,
E[...]→\E{...},\perp\!\!\!\perp→\ind). - Updated
_quarto-website.ymlnavigation and expandedinst/WORDLISTfor new technical terms.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| inst/WORDLIST | Added causal-inference terms for spellcheck; removed duplicate entry. |
| _quarto-website.yml | Added sidebar navigation entries for new Chapters 19–23. |
| chapters/01-introduction.qmd | Macro standardization updates in math notation. |
| chapters/02-randomized-experiments.qmd | Macro standardization updates in math notation. |
| chapters/03-observational-studies.qmd | Macro standardization updates in math notation. |
| chapters/04-effect-modification.qmd | Macro standardization updates in math notation. |
| chapters/05-interaction.qmd | Macro standardization updates in math notation. |
| chapters/06-graphical-representation.qmd | Macro standardization updates in math notation. |
| chapters/07-confounding.qmd | Macro standardization updates in math notation. |
| chapters/09-measurement-bias.qmd | Macro standardization updates in math notation. |
| chapters/10-random-variability.qmd | Macro standardization updates in math notation. |
| chapters/11-why-model.qmd | Macro standardization updates in math notation. |
| chapters/12-ip-weighting-marginal-structural-models.qmd | Macro standardization updates in math notation. |
| chapters/13-standardization-parametric-g-formula.qmd | Macro standardization updates in math notation. |
| chapters/14-g-estimation-structural-nested-models.qmd | Macro standardization updates in math notation. |
| chapters/15-outcome-regression-propensity-scores.qmd | Macro standardization updates in math notation. |
| chapters/16-instrumental-variable-estimation.qmd | Macro standardization updates in math notation. |
| chapters/18-variable-selection-causal-inference.qmd | Macro standardization updates in math notation. |
| chapters/19-time-varying-treatments.qmd | New Chapter 19 content (Part III). |
| chapters/20-treatment-confounder-feedback.qmd | New Chapter 20 content (Part III). |
| chapters/21-g-methods-time-varying.qmd | New Chapter 21 content (Part III). |
| chapters/22-target-trial-emulation.qmd | New Chapter 22 content (Part III). |
| chapters/23-causal-mediation.qmd | New Chapter 23 content (Part III). |
Collaborator
|
@copilot apply changes based on the comments in this thread |
…ize nested E[] macros in ch02 and ch11 Agent-Logs-Url: https://github.com/ucdavis/win/sessions/29247ca6-572c-4454-bb3b-38fc70b077c5 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Contributor
Author
Applied all three reviewer changes in 42c47e0:
|
Comment on lines
21
to
22
| RStudio | ||
| RevealJS |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chapters/19-time-varying-treatments.qmd(pp. 255-265)chapters/20-treatment-confounder-feedback.qmd(pp. 267-275)chapters/21-g-methods-time-varying.qmd(pp. 277-302)chapters/22-target-trial-emulation.qmd(pp. 305-320)chapters/23-causal-mediation.qmd(pp. 323-330)_quarto-website.ymlnavigation to include chapters 19-23\indmacro (replaces\perp\!\!\!\perp) across all chapters\E{...}macro (replacesE[...]) across all chaptersinst/WORDLIST; remove duplicateggdagentryqmdtoinst/WORDLISTto fix spell check CI failureimmunosuppressiontoinst/WORDLIST(was accidentally removed)E[\hat{\theta}]→\E{\hat{\theta}}inchapters/11-why-model.qmdE[Y^a|L]/E[Y|A=a,L]→\E{\E{...}}with\midinchapters/02-randomized-experiments.qmdspelling::spell_check_package()locally — no errors