feat: add likelihood-function, estimated-CDF, and potential/observed-outcome macros - #71
Conversation
Add \Likf (likelihood function, ℒ(·)) and \loglikf / \loglf / \likf as log-likelihood function aliases of the existing \llikf, completing the function-form family for the likelihood and log-likelihood symbols. Each new macro has a matching interpretations.tsv entry. Closes #64 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Dv2xDZnATLy84rCSUzrSn
Add \cdff (CDF applied to argument, F(·)), \hcdf (estimated CDF symbol, F̂), and \hcdff (estimated CDF applied to argument, F̂(·)), following the existing \Q/\Qf/\hQ/\hQf and \surv/\survf/\hsurv/\hSurvf function families. Each new macro has a matching interpretations.tsv entry. Closes #69 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Dv2xDZnATLy84rCSUzrSn
Add notation for causal-inference estimands, following the convention requested in #70 — subscripts for potential (intervened) exposures and parentheses for observed exposures: \potout{a} -> Y_a potential outcome under exposure a \potprob{a} -> pi_a potential outcome probability (Pr(Y_a = 1)) \potmean{a} -> mu_a potential outcome mean (E[Y_a]) \obsprob{a} -> pi(a) observed outcome probability \obsmean{a} -> mu(a) observed outcome mean Each new macro has a matching interpretations.tsv entry. Closes #70 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Dv2xDZnATLy84rCSUzrSn
|
Opened and actively iterating this PR to clear the #64/#69/#70 macro backlog (#56 intentionally left out of scope). Driving it to clean via ARDI — paws off until I'm done. Generated by Claude Code |
There was a problem hiding this comment.
Pull request overview
Adds several new LaTeX macros to macros.qmd to complete common notation “families” (function-form likelihood/log-likelihood, estimated CDF, and potential/observed outcome notation), and updates interpretations.tsv so the macros-table.qmd render check continues to pass.
Changes:
- Added
\Likfplus log-likelihood function aliases (\loglikf,\loglf,\likf) to mirror existing\Lik/\lliksymbols. - Added estimated CDF macros (
\cdff,\hcdf,\hcdff) following the existing hat-wrapped distribution-function pattern. - Added potential vs observed outcome macros (
\potout,\potprob,\potmean,\obsprob,\obsmean) consistent with the subscript-vs-parentheses convention described in the linked issue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| macros.qmd | Introduces the new likelihood/CDF/potential-outcome macros and aliases. |
| interpretations.tsv | Adds interpretation rows for each new macro to keep the macros-table merge/check passing. |
Pair each descriptive #70 macro with a terse alias, matching the corpus convention of a descriptive canonical name plus a short form: \py -> \potout Y_a potential outcome \ppi -> \potprob pi_a potential outcome probability \pmu -> \potmean mu_a potential outcome mean \opi -> \obsprob pi(a) observed outcome probability \omu -> \obsmean mu(a) observed outcome mean (\pmean already denotes the population mean, so the potential-mean shorthand is the symbol-based \pmu.) Each alias has a matching interpretations.tsv entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Dv2xDZnATLy84rCSUzrSn
|
Added short aliases for the potential/observed macros (per request):
Generated by Claude Code |
|
Fully clean and ready for your merge:
No open review threads. Merges Generated by Claude Code |
|
Clears the open-issue backlog (issue #56 intentionally left out of scope). Each issue is a separate commit; every new macro has a matching
interpretations.tsventry, so themacros-table.qmdbuild still passes.#64 — likelihood / log-likelihood function forms
\Likf{x}\Lik(x)\loglikf{x}\llik(x)\llikf)\loglf{x}\llik(x)\llikf)\likf{x}\llik(x)\llikf)Completes the function-form family for the existing
\Lik/\lliksymbols. The lowercase-\lik-means-log-likelihood convention is pre-existing (\likis already an alias of\llik); the TSV entries flag each alias accordingly.#69 — estimated CDF function macros
\cdff{x}\cdf(x)\hcdfF̂\hcdff{x}\hcdf(x)Mirrors the existing
\Q/\Qf/\hQ/\hQfand\surv/\survf/\hsurv/\hSurvfdistribution-function families;\hcdfuses the same\mathop{\hat{…}}\nolimitspattern as\hsurv.#70 — potential-outcome vs observed-outcome notation
Following the convention in the issue — subscripts for potential (intervened) exposures, parentheses for observed exposures:
\potout{a}a\potprob{a}\potmean{a}\obsprob{a}\obsmean{a}These reuse the existing
\prob(π) and\mean(μ) symbols, so they are notation variants of existing estimands rather than a new estimand group, and need no separate hat-wrapped estimators.Verification
macros-table.qmdbuild check: every new macro has aninterpretations.tsventry (no missing/orphan entries; no name collisions).macros.qmdinto a lualatex preamble and rendered every new macro to PDF — all produce the intended symbols (ℒ(θ), ℓ(θ), F(x), F̂, F̂(x), Y_a, π_a, μ_a, π(a), μ(a)).demo-shortcode.qmdto PDF to confirm the include-shortcode path still loadsmacros.qmdcleanly.Full HTML render via CI (
Quarto Preview), sinceDT/knitraren't installable against the container's bleeding-edge R.Closes #64
Closes #69
Closes #70
Generated by Claude Code