Skip to content

Add predictor selection chapter (RMB Ch10) with HERS and WCGS DAG examples#400

Merged
d-morrison merged 24 commits intomainfrom
copilot/add-chapter-on-predictor-selection
Apr 16, 2026
Merged

Add predictor selection chapter (RMB Ch10) with HERS and WCGS DAG examples#400
d-morrison merged 24 commits intomainfrom
copilot/add-chapter-on-predictor-selection

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

  • Fix CI failure: corrected include path from _sec_hers_intro.qmd to _subfiles/shared/_sec_hers_intro.qmd in _sec-pred-sel-dag.qmd

Copilot AI and others added 3 commits April 9, 2026 21:27
Copilot AI changed the title [WIP] Add a chapter on predictor selection based on Ch 10 of RMB Add predictor selection chapter (RMB Ch10) with HERS DAG Apr 9, 2026
Copilot AI requested a review from d-morrison April 9, 2026 21:31
@d-morrison
Copy link
Copy Markdown
Owner

…::snapshot())

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/b2029468-74e3-4821-9460-ffbaa54eaa58

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot fix https://github.com/d-morrison/rme/actions/runs/24222907017/job/70718039145?pr=400

Fixed in commit 1cf4786. The CI failure was caused by renv::snapshot() accidentally removing broom.helpers (required by gtsummary >= 2.5.0) along with several other packages from renv.lock. The fix restores the original renv.lock state (including broom.helpers 1.22.0) while adding the new dagitty 0.3-4 entry.

Copilot AI review requested due to automatic review settings April 14, 2026 00:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Predictor Selection” chapter (RMB Ch10) to the Quarto book/website, including an HERS DAG example and accompanying sections.

Changes:

  • Adds dagitty to project dependencies (DESCRIPTION Suggests + renv.lock).
  • Introduces new chapter/section QMD files for predictor selection overview and HERS DAG-based discussion.
  • Wires the new chapter into the Quarto book + website nav, and updates the spelling WORDLIST.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
DESCRIPTION Adds dagitty to Suggests so renders can use it.
renv.lock Locks dagitty version for reproducible installs.
predictor-selection.qmd New top-level chapter file that includes the new sections and examples.
_sec-pred-sel-overview.qmd New introductory overview of predictor selection strategies.
_sec-pred-sel-dag.qmd New DAG theory + HERS DAG section and LDL modeling workflow.
_quarto-book.yml Adds the new chapter to the book build.
_quarto-website.yml Adds the new chapter to website render list + navbar.
inst/WORDLIST Adds new technical terms for spellchecking.

Comment thread _sec-pred-sel-dag.qmd Outdated
Comment thread _sec-pred-sel-dag.qmd Outdated
Comment thread _sec-pred-sel-overview.qmd Outdated
Comment thread inst/WORDLIST Outdated
Comment thread inst/WORDLIST Outdated
Comment thread _sec-pred-sel-dag.qmd Outdated
@d-morrison
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

…r, WORDLIST cleanup

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/f25e1fc0-22c8-49b7-9dd4-6d47d77029a6

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot apply changes based on the comments in this thread

Applied all review changes in 2f09646:

  • Grammar: "describe" → "describes" in _sec-pred-sel-overview.qmd
  • DAG: removed age -> HT edge (HERS is an RCT); updated the age bullet to say it's prognostic but not a confounder; updated the adjustmentSets() notes to reflect the empty adjustment set
  • WORDLIST: removed "Github" (wrong capitalization, "GitHub" already present) and duplicate "Hua"

Copilot AI requested a review from d-morrison April 14, 2026 01:12
Resolved conflicts in:
- .github/copilot-instructions.md: kept both 'Figures and Tables: Use Div Format' (our branch) and 'Landscape Tables in PDF' (main) sections
- inst/WORDLIST: merged union of both word lists, removing nested conflict markers

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in 0c60d75. Two conflicts were present:

  • .github/copilot-instructions.md: kept both the "Figures and Tables: Use Div Format" section (from this branch) and the new "Landscape Tables in PDF" section (from main)
  • inst/WORDLIST: merged the union of both word lists, also removing nested conflict markers that had been left in the file from a previous incomplete merge

Copilot AI and others added 2 commits April 16, 2026 09:54
…lout title fixes, attribution note

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/3baf0a50-ab98-4981-87b5-cf7cbd407687

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

add more details on the HERS study, drawing from https://demorrison.ucdavis.edu/files/Hulley1998HERS.pdf

is there another example dataset we can use as with an observational study design, so that con...

Added in 9cd2203:

  • HERS study details (in _sec-pred-sel-dag.qmd): expanded with enrollment criteria, follow-up duration, LDL/HDL changes (−11%/+10%), null CHD result, time trend, and adverse events (thromboembolic, gallbladder), all with attribution to @HulleyStephen1998RToE.

  • WCGS as observational study example: added a new ## An observational study example: WCGS section with a DAG showing age → TypeA and smoking → TypeA arrows (making them true confounders), adjustmentSets() output, and explanation that confounding is plausible since Type A behavior was not randomly assigned — contrasting with HERS.

@copilot elaborate on 10% rule (change of estimate rule), also adapting content from https://demorrison.ucdavis.edu/files/KleinbaumLogistic.pdf (with attribution, as always - make a note about always ...

Added in 9cd2203:

  • Elaborated 10% rule in _sec-pred-sel-primary.qmd: formal definition with the percent-change formula, a note distinguishing bias vs. significance, and attribution to @kleinbaum2010logistic [Chapter 8].
  • Numerical WCGS example (#sec-pred-sel-10pct-wcgs): fits a full logistic model for CHD in WCGS, drops each confounder one at a time, and shows the percentage change in the Type A coefficient in a table.
  • Attribution guidelines added to copilot-instructions.md under ## Attribution for Adapted Content.

Also fixed the callout heading levels (###) across predictor-selection.qmd, _sec-pred-sel-primary.qmd, and _sec-pred-sel-details.qmd as flagged in the automated review.

Copilot AI changed the title Add predictor selection chapter (RMB Ch10) with HERS DAG Add predictor selection chapter (RMB Ch10) with HERS and WCGS DAG examples Apr 16, 2026
Comment thread _sec-pred-sel-dag.qmd Outdated
Comment thread _sec-pred-sel-primary.qmd Outdated
…pdate copilot-instructions

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/d95a3882-3301-4159-87a9-55279a38ce57

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI requested a review from d-morrison April 16, 2026 17:03
@d-morrison
Copy link
Copy Markdown
Owner

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot fix https://github.com/d-morrison/rme/actions/runs/24529862797/job/71709947757?pr=400

Fixed in 3ff2d2e. The include path for _sec_hers_intro.qmd in _sec-pred-sel-dag.qmd was pointing to the root (_sec_hers_intro.qmd) instead of the correct subfile location (_subfiles/shared/_sec_hers_intro.qmd).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-04-16 22:03 UTC

@d-morrison d-morrison merged commit fb52da1 into main Apr 16, 2026
3 checks passed
@d-morrison d-morrison deleted the copilot/add-chapter-on-predictor-selection branch April 16, 2026 22:01
@d-morrison d-morrison restored the copilot/add-chapter-on-predictor-selection branch April 16, 2026 23:39
@d-morrison
Copy link
Copy Markdown
Owner

@copilot

correct the statement of the main goal of the HERS study: it was estimate the causal effect of HT on CHD event risk.

define a confounder as a common cause of an exposure and outcome.

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.

add a chapter on predictor selection, based on Ch 10 of RMB

3 participants