Update macros documentation - #38
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
\lpto 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Owner
Author
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/d-morrison/macros/sessions/954c6a41-a3c9-4afb-8202-97e8c3d69f43 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Contributor
Done. Added |
Contributor
|
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.
This pull request updates several macro definitions in
macros.qmdto 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:
\lpmacro to take only one argument and use the new\dprodfmacro for linear combinations, and updated related definitions (\lpdp,\lincomp).\logoddsand\loghazto use the new\lincompmacro, ensuring consistent notation for linear predictors. [1] [2]Generalization of difference notation:
\difffor generic differences, and refactored\difflogodds,\hdifflogodds,\diffeta, and\diffloghazto 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.