Skip to content

Adopt the new potential/observed-outcome macros (\ppi, \opi) in the marginal-risk content #977

Description

@d-morrison

Background

The latex-macros submodule was bumped to b1bf86f in #976 (merged), which added:

  • \ppi{a} / \potprob{a}$\pi_a$ (causal marginal risk)
  • \opi{a} / \obsprob{a}$\pi(a)$ (observed marginal risk)
  • \potout{a} / \py{a}$Y_a$ (potential outcome)

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.

Why this is a follow-up (not done in #976)

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions