You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These now render book-wide, but nothing uses them yet.
Task
Adopt \ppi/\opi in place of the hand-written \pi_a / \pi(a) in the observed-vs-causal marginal-risk material — primarily the subfiles added in #706: _sec-causal-marginal-risk.qmd, _sec-g-computation.qmd, _sec-predictive-margins.qmd, _rem-observed-vs-causal-marginal-risk.qmd, and the _thm-*-marginal-risk.qmd / _exm-* files.
Those files are added by #706 and are not on main until #706 merges, so the adoption can't be done from a main-based PR. Do this after #706 merges.
Notation decision to make first
\potout/\py render as $Y_a$ (subscript), but the #706 content uses $Y^a$ (superscript, the standard causal-inference convention). Decide whether to:
(recommended) keep $Y^a$ in the book and adopt only \ppi/\opi (which match $\pi_a$/$\pi(a)$ exactly), leaving the potential-outcome symbol as-is; or
reconcile — e.g. change the macro to $Y^a$ in d-morrison/macros, then adopt \py too.
Also fold in while doing the macro-adoption pass
Non-blocking macro-style suggestions from #706's review, requiring a new macro in d-morrison/macros (same repo/PR as this adoption work):
\ratio for OMRR/CMRR._sec-marginal-rr.qmd:13,29 define \text{OMRR} \eqdef \frac{\pi(1)}{\pi(0)} / \text{CMRR} \eqdef \frac{\pi_1}{\pi_0} with raw \frac, where the existing \ratio/\ratiof macro (already used for \ratio(\odds_1, \odds_2) in _def_OR.qmd) is the idiomatic form for a ratio of quantities. Rewrite as \ratio(\opi{1}, \opi{0}) / \ratio(\ppi{1}, \ppi{0}).
New \convp macro for convergence in probability.\overset{p}{\to} appears 11 times in Add section to logistic regression on computing marginal risk differences #706's diff / 14 times repo-wide with no covering macro, despite other common relations (e.g. \ind for independence) having one. Add to d-morrison/macros: \def\convp{\overset{p}{\to}}, following the file's existing \def-based relation-macro convention, then replace the raw form across the marginal-risk content (_sec-g-computation.qmd's #thm-g-computation-consistency and its proof, _sec-predictive-margins.qmd's #thm-subgroup-pm, etc.).
Estimator-indirection consistency (\hb → \eb)._thm-g-computation-consistency.qmd and _sec-predictive-margins.qmd's #thm-subgroup-pm write raw \hat\beta throughout, while _sec-logistic-RR-RD.qmd's conceptual-approach subsection already uses the indirected \eb macro (\def\eb{\est{\beta}}) for the same quantity. Purely a maintainability nit (renders identically) — reconcile to \eb while doing this pass.
Tracked as the deferred adoption half of #975/#976.
Background
The
latex-macrossubmodule was bumped tob1bf86fin #976 (merged), which added:\ppi{a}/\potprob{a}→\opi{a}/\obsprob{a}→\potout{a}/\py{a}→These now render book-wide, but nothing uses them yet.
Task
Adopt
\ppi/\opiin place of the hand-written\pi_a/\pi(a)in the observed-vs-causal marginal-risk material — primarily the subfiles added in #706:_sec-causal-marginal-risk.qmd,_sec-g-computation.qmd,_sec-predictive-margins.qmd,_rem-observed-vs-causal-marginal-risk.qmd, and the_thm-*-marginal-risk.qmd/_exm-*files.Why this is a follow-up (not done in #976)
Those files are added by #706 and are not on
mainuntil #706 merges, so the adoption can't be done from amain-based PR. Do this after #706 merges.Notation decision to make first
\potout/\pyrender as\ppi/\opi(which matchd-morrison/macros, then adopt\pytoo.Also fold in while doing the macro-adoption pass
Non-blocking macro-style suggestions from #706's review, requiring a new macro in
d-morrison/macros(same repo/PR as this adoption work):\ratiofor OMRR/CMRR._sec-marginal-rr.qmd:13,29define\text{OMRR} \eqdef \frac{\pi(1)}{\pi(0)}/\text{CMRR} \eqdef \frac{\pi_1}{\pi_0}with raw\frac, where the existing\ratio/\ratiofmacro (already used for\ratio(\odds_1, \odds_2)in_def_OR.qmd) is the idiomatic form for a ratio of quantities. Rewrite as\ratio(\opi{1}, \opi{0})/\ratio(\ppi{1}, \ppi{0}).\convpmacro for convergence in probability.\overset{p}{\to}appears 11 times in Add section to logistic regression on computing marginal risk differences #706's diff / 14 times repo-wide with no covering macro, despite other common relations (e.g.\indfor independence) having one. Add tod-morrison/macros:\def\convp{\overset{p}{\to}}, following the file's existing\def-based relation-macro convention, then replace the raw form across the marginal-risk content (_sec-g-computation.qmd's#thm-g-computation-consistencyand its proof,_sec-predictive-margins.qmd's#thm-subgroup-pm, etc.).\hb→\eb)._thm-g-computation-consistency.qmdand_sec-predictive-margins.qmd's#thm-subgroup-pmwrite raw\hat\betathroughout, while_sec-logistic-RR-RD.qmd's conceptual-approach subsection already uses the indirected\ebmacro (\def\eb{\est{\beta}}) for the same quantity. Purely a maintainability nit (renders identically) — reconcile to\ebwhile doing this pass.Tracked as the deferred adoption half of #975/#976.