Skip to content

Update macros documentation - #38

Merged
d-morrison merged 3 commits into
mainfrom
d-morrison-patch-1
May 11, 2026
Merged

d-morrison merged 3 commits into
mainfrom
d-morrison-patch-1

Conversation

@d-morrison

Copy link
Copy Markdown
Owner

This pull request updates several macro definitions in macros.qmd to improve consistency and clarity of notation, especially for linear combinations and log-odds/log-hazard expressions. The changes mainly standardize the use of the linear combination symbol and its related macros, and introduce a new general difference macro.

Standardization and refactoring of macros:

  • Changed the \lp macro to take only one argument and use the new \dprodf macro for linear combinations, and updated related definitions (\lpdp, \lincomp).
  • Updated the definition of \logodds and \loghaz to use the new \lincomp macro, ensuring consistent notation for linear predictors. [1] [2]

Generalization of difference notation:

  • Introduced a new macro \diff for generic differences, and refactored \difflogodds, \hdifflogodds, \diffeta, and \diffloghaz to use this new macro for improved clarity and consistency. [1] [2]

These changes help make the macro definitions more modular and consistent throughout the codebase.

Copilot AI review requested due to automatic review settings May 11, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors regression-related math macros in macros.qmd to make linear predictors and difference notation more modular and consistent (e.g., reusing a shared linear-combination symbol and a generic difference operator).

Changes:

  • Refactors \lp to use the dot-product helper (\dprodf) for linear combinations.
  • Introduces shared aliases (\lincomp, \diff) and rewires \logodds, \loghaz, and their “difference” macros to use them.
  • Updates difference macros (\difflogodds, \diffloghaz, etc.) to compose from the generic \diff + target quantity.

Comment thread macros.qmd Outdated
Comment thread macros.qmd Outdated
Comment thread macros.qmd Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 18:05
@d-morrison

Copy link
Copy Markdown
Owner Author

@copilot apply changes based on the comments in this thread

Copilot AI commented May 11, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Done. Added \lpdp and \lincomp entries to interpretations.tsv in commit 61ddcbe, which resolves the rendering failure. The duplicate \diff and \lpdp/\lp signature issues were already addressed in the previous commits.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread macros.qmd
Comment thread macros.qmd
@d-morrison
d-morrison merged commit 38d6abb into main May 11, 2026
1 check passed
@d-morrison
d-morrison deleted the d-morrison-patch-1 branch May 11, 2026 18:13
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants