Add HERS dataset linear regression example with interactions, interspersed with birthweight analysis (Vittinghoff Ch. 4)#381
Conversation
|
add a model with interactions, like we did for the birthweight data. intersperse the HERS analysis with the corresponding sections of the birthweight analysis |
|
@copilot add a model with interactions, like we did for the birthweight data. intersperse the HERS analysis with the corresponding sections of the birthweight analysis |
Done in commit
Each HERS section follows the same structure as its birthweight counterpart: model equation, parameter table, and fitted-values plot. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot add interaction between bmi and statin use to the HERS model, and remove the interaction between bmi and HT |
Done in commit
The model equation is now: Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot resolve merge conflicts |
Done in commit |
There was a problem hiding this comment.
Pull request overview
This PR integrates a HERS dataset linear regression example into the “Linear Models Overview” material, interleaving it with the existing birthweight discussion to mirror the narrative flow of Vittinghoff Ch. 4.
Changes:
- Adds two new HERS section subfiles: one for a parallel-lines model and one for an interaction model (BMI × statin use).
- Inserts those HERS sections into
_sec_linreg_understanding.qmdat the intended points in the birthweight narrative. - Updates
inst/WORDLIST(but currently with apparent duplication/ordering issues).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
inst/WORDLIST |
Adds spellcheck allowlist terms, but the resulting file contains duplicates/merge artifacts that should be cleaned up. |
_sec_linreg_understanding.qmd |
Includes the new HERS sub-sections into the main linear regression “understanding” chapter flow. |
_sec_hers_lm_parallel.qmd |
New HERS intro + parallel lines regression section (treatment indicator + BMI). |
_sec_hers_lm_interact.qmd |
New HERS interaction section (adds statins and BMI:statins interaction; plot by statin use). |
_sec_exm_hers_lm.qmd |
Adds a standalone HERS example section that appears unused/unreferenced and conflicts with the PR’s stated restructuring goals. |
|
@copilot apply changes based on the comments in this thread |
Done in commit
|
- Per CLAUDE.md "Subfiles must NOT begin with a section heading", move the 7 leading ### headings from _subfiles/Linear-models-overview/_sec_hers_*.qmd into the parent files (_sec_linreg_understanding.qmd and _sec_linreg_assess.qmd), where the table-of-contents tree controls them and where Quarto's chapter-level rendering picks them up consistently. - _sec_hers_lm_model_selection.qmd: replace `library(lmtest)` + `lrtest(...)` with namespace-qualified `lmtest::lrtest(...)`. Avoids surprising the reader (and downstream chunks) with a full attach that may shadow generics.
|
Claude finished @d-morrison's task in 3m 31s —— View job Code Review — PR #381
What the most recent commit (92b54ff) fixed
Remaining issues1.
|
…odel-hers-dataset
1. Hoist the lm2-diagnostics heading to the parent: split
_sec_hers_lm_diagnostics.qmd into lm1 and a new lm2 subfile, with the
'### Diagnostics for hers interaction model' heading now in
_sec_linreg_assess.qmd (matching the lm1 heading)
2. Convert the AIC/BIC and deviance GOF outputs to :::{#tbl-...} div
format with captions (instead of #| label: chunk options)
4. Fix the wrong label prefix: lst-hers-lrt -> a {#tbl-hers-lrt} div
3. Add #| code-fold: true to the stratified-regression table chunks
5. Fix the stratified-model notation: condition on V=v (the 0/1 statin
indicator defined in the data-notation section) rather than U=u, so
the indicator arithmetic (1-v), bv is well-defined
6. Explain that age is intentionally omitted from the stratified model
7. Drop the redundant hers_plot_data recomputation in the interaction
subfile (it is already computed in the parallel-planes subfile, which
renders earlier)
8. Pin the regress3d Remotes entry to commit 158d63c (from renv.lock)
instead of the mutable add-show_legend branch ref
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Claude finished @d-morrison's task in 5m 11s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | lm2-diagnostics ### heading inside subfile |
✅ Fixed — split into _sec_hers_lm_diagnostics_lm2.qmd; heading now in _sec_linreg_assess.qmd |
| 2 | GOF tables using #| label: chunk option instead of div format |
✅ Fixed — both are now :::{#tbl-hers-aic-bic} / :::{#tbl-hers-deviance} divs |
| 3 | Missing #| code-fold: true in stratified chunks |
✅ Fixed — both tbl-hers-lm-strat and tbl-hers-lm-statin-interact chunks now have it |
| 4 | Wrong lst- label prefix in model selection |
✅ Fixed — now :::{#tbl-hers-lrt} div with caption |
| 5 | Notation mismatch U=u vs v in stratified equation |
✅ Fixed — LHS now \E{LDL|B=b, V=v} |
| 6 | age silently dropped in stratified model |
✅ Fixed — explanation added in ::: notes block |
| 7 | Redundant hers_plot_data recomputation in interact file |
✅ Fixed — interact file now uses the object defined in the parallel file |
| 8 | regress3d pinned to mutable branch ref |
✅ Fixed — DESCRIPTION now pins to 158d63cee6d823eccb5b0fc45e11f013ea0097d7 |
Remaining issues (new)
1. tbl-hers-lm2 caption lacks equation cross-reference (_sec_hers_lm_interact.qmd:45)
The parallel table caption reads:
Regression parameter estimates for [Model @eq-hers-parallel]
The interaction table caption reads:
HERS interaction model
For consistency, change the interaction caption to reference the equation number:
Regression parameter estimates for [Model @eq-hers-interact]
2. Redundant library() calls in parallel file (_sec_hers_lm_parallel.qmd:50–51)
library(plotly)
library(regress3d)All downstream calls in this file already use plotly:: and regress3d:: prefixes, so these library() calls are redundant. Remove them; the interact file works the same way (no library() calls at all), confirming they are not needed.
3. hers_no / hers_yes re-defined to identical values in interact file (_sec_hers_lm_interact.qmd:57, 93)
The parallel file (lines 52, 88) defines:
hers_no <- hers_plot_data |> dplyr::filter(statins == "no")
hers_yes <- hers_plot_data |> dplyr::filter(statins == "yes")The interact file (lines 57, 93) re-defines them to the same values. Since both subfiles render sequentially in the same document, the objects already exist. Remove the re-definitions from the interact file; the parallel file's definitions are sufficient.
4. Forward reference to stratified model (_sec_hers_lm_parallel.qmd:123)
The stratified regression model below addresses this...
CLAUDE.md: "Introduce concepts before using them — no forward references."
The stratified section hasn't been introduced yet when this sentence appears. Rephrase to remove the forward reference, e.g.:
"Statin use appears to shift the baseline LDL level, a pattern the parallel-planes model cannot capture because it does not include
statinsas a predictor."
5. Two printed outputs inside one :::{#tbl-hers-aic-bic} div (_sec_hers_lm_gof.qmd:11–20)
AIC(hers_lm1, hers_lm2)
BIC(hers_lm1, hers_lm2)These two calls each produce a separate printed table. Putting both inside a single :::{#tbl-hers-aic-bic} div results in two outputs under one cross-reference anchor, which Quarto may render correctly for some formats but not others. Combine them into a single table (e.g., left_join(AIC(...), BIC(...), by = "df")) or give each its own div with a separate cross-reference anchor.
Positive notes
- All 8 prior findings addressed cleanly.
regress3dcorrectly pinned to a commit SHA inDESCRIPTION.- Diagnostics split into two subfiles with headings in the parent — clean structure.
- GOF divs have descriptive captions and
code-fold: truethroughout. - Stratified equation LHS now matches the RHS notation (
V=v). lmtest::lrtest()namespace-qualified, wrapped in a proper:::{#tbl-hers-lrt}div.- WORDLIST sorted, no duplicates; all 9 new entries are justified.
| Branch
|
Addressed all 8 findings from the latest review (commit
Checks: @claude please re-review. Generated by Claude Code |
|
👀 Picked up by workflow run #27814393620. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
…F tables - interaction-model table caption now references [Model @eq-hers-interact] (matching the parallel-planes table convention) - remove redundant library(plotly)/library(regress3d) from the parallel subfile (all calls are namespace-qualified) - remove redundant hers_no/hers_yes redefinitions from the interaction subfile (already defined in the parallel subfile, which renders earlier) - rephrase the forward reference to the stratified model in the parallel subfile into a description of what the parallel-planes model cannot capture - combine the AIC/BIC and deviance outputs into single knitr::kable tables so each tbl- div has one output under its cross-reference anchor - replace 'below' with an @tbl-hers-lrt cross-reference in the GOF notes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Round 2 — addressed all 5 new findings (commit
Proactive (same no-forward-reference rule): replaced "The likelihood ratio test below…" in the GOF notes with an Checks: @claude please re-review. Generated by Claude Code |
|
Claude finished @d-morrison's task in 3m 7s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | tbl-hers-lm2 caption lacked equation cross-reference |
✅ Fixed — caption now reads "Regression parameter estimates for [Model @eq-hers-interact]" |
| 2 | Redundant library(plotly) / library(regress3d) in parallel file |
✅ Fixed — removed; all calls use plotly:: / regress3d:: prefixes |
| 3 | hers_no / hers_yes redefined identically in interact file |
✅ Fixed — removed from interact file; objects defined once in parallel file |
| 4 | Forward reference "The stratified regression model below…" | ✅ Fixed — rephrased to "a shift the parallel-planes model cannot capture, because it does not include statin use as a predictor" |
| 5 | Two printed outputs inside one :::{#tbl-hers-aic-bic} div |
✅ Fixed — combined into a single data.frame() + knitr::kable() call; deviance table also converted |
Remaining issues (new)
1. Redundant library(plotly) in _sec_hers_data.qmd:58
library(plotly)Every plotly call in this chunk (plotly::plot_ly(), plotly::layout()) already uses explicit plotly:: prefix — the same fix applied to the parallel file in the last round. Remove library(plotly).
2. tbl-hers-lm-statin-interact caption is vague and references no equation (_sec_hers_lm_stratified.qmd:68)
Statin interaction model estimatesThe left-hand table (tbl-hers-lm-strat) references @eq-hers-strat. The right-hand table shows hers_lm_statins_interact = LDL ~ statins + BMI + statins:BMI, but this model is never written out as a displayed equation — the reader must infer the specification from the R code. In the birthweight counterpart (_sec_linreg_understanding.qmd), the right-hand table references @eq-BW-lm-interact, which was introduced earlier. For HERS, the analogous equation (LDL ~ statins + BMI + statins:BMI) should be displayed before the table and the caption updated to reference it.
Positive notes
- All 5 prior findings addressed cleanly and correctly.
@tbl-hers-lrtcross-reference in the GOF notes correctly replaces "below" — follows CLAUDE.md convention.- AIC/BIC and deviance tables each produce a single output under their div anchors.
- No new
library()redundancies introduced in the interact or model-selection files. regress3dcorrectly pinned to commit SHA inDESCRIPTION.
| Branch
…t library(plotly) - add a displayed equation (eq-hers-strat-interact) for the reference-coded interaction parameterization LDL ~ statins + BMI + statins:BMI, and update the right-hand stratified table caption to reference it (matching the left-hand table's reference to eq-hers-strat) - remove redundant library(plotly) from _sec_hers_data.qmd; all plotly calls in that chunk are namespace-qualified (library(GGally) stays, as ggpairs() is called unqualified) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Round 3 — addressed both new findings (commit
Checks: @claude please re-review. Generated by Claude Code |
|
Claude finished @d-morrison's task in 3m 12s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | Redundant library(plotly) in _sec_hers_data.qmd |
✅ Fixed — removed; all plotly calls use plotly:: prefix |
| 2 | tbl-hers-lm-statin-interact caption lacked equation cross-reference |
✅ Fixed — caption now reads "Regression parameter estimates for [Model @eq-hers-strat-interact]"; @eq-hers-strat-interact is defined just above the two-column table layout |
Remaining issues (new)
1. Interaction model 3D figure captions don't reference @eq-hers-interact (_sec_hers_lm_interact.qmd:80–81, 114–115)
The parallel-planes figure captions both reference the model equation:
Fitted regression surface from [Model @eq-hers-parallel] (patients not taking statins)
Fitted regression surface from [Model @eq-hers-parallel] (patients taking statins)
The interaction model figure captions do not:
Interaction model regression surface for `hers` data (patients not taking statins)
Interaction model regression surface for `hers` data (patients taking statins)
Fix: update both interaction figure captions to read "Fitted regression surface from [Model @eq-hers-interact] (patients not taking statins)" and "(patients taking statins)" to match the parallel-planes pattern.
2. Redundant library(ggplot2) in diagnostics subfile (_sec_hers_lm_diagnostics.qmd:14)
library(ggplot2)ggplot2 is already attached via library(tidyverse) in _sec_linreg_understanding.qmd, which renders before the assess section. All other HERS subfiles either use :: namespacing or have a genuinely necessary library() call (e.g., library(GGally) for unqualified ggpairs()). This is the only HERS subfile with a library() call for something already loaded. Since the diagnostics ggplot calls are all unqualified, the options are:
- Remove
library(ggplot2)(relies ontidyversebeing loaded upstream — fragile) - Replace with
ggplot2::ggplot(...),ggplot2::geom_point(...), etc. (verbose but self-contained)
Neither change is urgent, but the current state is inconsistent with the rest of the HERS subfiles.
Positive notes
@eq-hers-strat-interactis correctly defined before the two-column table layout, and the surrounding prose ("Equivalently, we can fit the same model using reference coding…") contextualises the relationship between the two parameterisations.regress3dpinned to commit SHA158d63cin DESCRIPTION — confirmed stable.- WORDLIST is sorted with no duplicates; 9 new HERS terms are all justified.
- All 7 HERS subfiles are clean of leading section headings.
library(plotly)removed from_sec_hers_data.qmd;library(GGally)correctly retained sinceggpairs()is called unqualified.- AIC/BIC and deviance tables each produce a single output under their div anchors.
@tbl-hers-lrtcross-reference in GOF notes correctly replaces a forward "below" reference.
| Branch |
…p redundant library(ggplot2) - both interaction-model 3D figure captions now read 'Fitted regression surface from [Model @eq-hers-interact]', matching the parallel-planes figure caption convention - remove redundant library(ggplot2) from the diagnostics subfile; ggplot2 is loaded globally via r-config (like every other chapter subfile) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Claude finished @d-morrison's task in 2m 2s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | Interaction model 3D figure captions lacked @eq-hers-interact reference |
✅ Fixed — fig-hers-interact-fit-no (line 80) and fig-hers-interact-fit-yes (line 114) now read "Fitted regression surface from [Model @eq-hers-interact] (patients not/taking statins)" |
| 2 | Redundant library(ggplot2) in _sec_hers_lm_diagnostics.qmd |
✅ Fixed — removed; all ggplot2 calls rely on tidyverse loaded upstream, consistent with _sec_hers_lm_diagnostics_lm2.qmd |
No new issues found
All 8 HERS subfiles and the two parent includes are clean:
_sec_hers_data.qmd—library(GGally)correctly retained (needed for unqualifiedggpairs());library(plotly)correctly removed; all plotly calls areplotly::-qualified._sec_hers_lm_parallel.qmd— nolibrary()calls;hers_no/hers_yes/hers_plot_datadefined once here and reused downstream._sec_hers_lm_interact.qmd— no redundant object redefinitions; both 3D figure captions reference@eq-hers-interact;tbl-hers-lm2caption references@eq-hers-interact._sec_hers_lm_diagnostics.qmd— nolibrary()calls; consistent with lm2 diagnostics file._sec_hers_lm_diagnostics_lm2.qmd— clean;hers_lm2in scope from earlier include._sec_hers_lm_gof.qmd— AIC/BIC and deviance each produce a singleknitr::kable()output under their div anchors;@tbl-hers-lrtforward-reference cross-link correct._sec_hers_lm_model_selection.qmd—lmtest::lrtest()qualified;:::{#tbl-hers-lrt}div with caption._sec_hers_lm_stratified.qmd— both equations displayed (@eq-hers-stratand@eq-hers-strat-interact); both table captions reference their respective equations;V=vnotation consistent on both LHS and RHS;ageomission explained;#| code-fold: trueon all chunks.regress3din DESCRIPTION — pinned to commit SHA158d63cee6d823eccb5b0fc45e11f013ea0097d7.- WORDLIST — 9 new entries (
Statins,bv,drinkany,drk,nw,sciid,smk,tabset), no duplicates.
This PR is ready to merge.
| Branch |
|
Round 4 — addressed both new findings (commit
Checks: @claude please re-review. Generated by Claude Code |
|
👀 Picked up by workflow run #27815436964. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
|
I now have everything I need for a thorough review. Here's my assessment: Round 4 review — two findings remain 1.
|
Every other hers model (hers_lm1, hers_lm2, hers_lm_statins_interact) sets na.action = na.exclude; hers_lm_strat used the default na.omit. na.exclude pads fitted values/residuals with NA placeholders so lengths align with the data, matching the rest of the chapter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Two reviews landed on
Checks: @claude please re-review. Generated by Claude Code |
|
Claude finished @d-morrison's task in 1m 47s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | hers_lm_strat missing na.action = na.exclude |
✅ Fixed — _sec_hers_lm_stratified.qmd:40 now sets na.action = na.exclude, matching every other hers model in this PR |
Rebuttal accepted
The suggestion to split model fitting out of the {#tbl-hers-lm1} chunk into a hidden setup chunk is correctly rebutted. All three HERS model table chunks (tbl-hers-lm1, tbl-hers-lm2, both stratified tables) follow the same pattern: model fit + table print inside a single code-fold: true block. The parent _sec_linreg_understanding.qmd does the same for the birthweight models. Changing one of the three would create an asymmetry and would remove pedagogically useful model-fitting code from students' view.
No new issues found
All 8 HERS subfiles are clean:
_sec_hers_data.qmd—library(GGally)retained (needed for unqualifiedggpairs()); nolibrary(plotly); all plotly callsplotly::-qualified._sec_hers_lm_parallel.qmd— nolibrary()calls;hers_lm1,hers_plot_data,hers_no,hers_yesdefined once and reused downstream;na.action = na.excludeset; forward reference to stratified section removed._sec_hers_lm_interact.qmd— no redundant object redefinitions; both 3D figure captions reference@eq-hers-interact; table caption references@eq-hers-interact;na.action = na.excludeset._sec_hers_lm_diagnostics.qmd— nolibrary()calls; all figures faceted by statins withlabel_both;code-fold: truethroughout._sec_hers_lm_diagnostics_lm2.qmd— same structure;hers_lm2in scope from earlier include._sec_hers_lm_gof.qmd— AIC/BIC and deviance each produce a singleknitr::kable()output under their div anchors;@tbl-hers-lrtcross-reference correctly replaces "below"._sec_hers_lm_model_selection.qmd—lmtest::lrtest()namespace-qualified;:::{#tbl-hers-lrt}div with caption._sec_hers_lm_stratified.qmd— both equations displayed (@eq-hers-strat,@eq-hers-strat-interact); both table captions reference their equations; LHS notation consistent (V=v);ageomission explained;na.action = na.excludeon both models;code-fold: trueon all chunks.
Parent includes (_sec_linreg_understanding.qmd, _sec_linreg_assess.qmd) correctly place all ### headings at the include sites; no ### headings appear inside any subfile.
This PR is ready to merge.
| Branch
|
👀 Picked up by workflow run #27842275070. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
|
I've now read the full diff. Let me write the review. Code Review — PR #381 (round 5, commit
|
| Item | Disposition |
|---|---|
na.action = na.exclude on hers_lm_strat |
✅ Addressed in 1ca8d36 |
Move hers_lm1 fit to hidden setup chunk |
✅ Rebut is sound — foldable model-fitting code is pedagogically useful and consistent with all three HERS table subfiles |
_sec_hers_data.qmd at 149 lines |
✅ Acknowledged; content is cohesive |
library(GGally) in figure chunk |
✅ Justified — ggpairs() is called unqualified |
@tbl-hers-lrt cross-reference from GOF section |
✅ Quarto resolves cross-references across the full document; not a forward-reference problem |
Cross-subfile dependencies (hers_no, hers_yes, hers_plot_data) |
✅ Intentional and consistent with the sibling-subfile pattern |
The statins filter is a minor correctness issue but worth fixing before merge, since it affects a figure in the data introduction section. Everything else looks ready.
— posted by @claude post-step from workflow run
…esthetic statins is used as the discrete color in the 3D scatter (color map c(no=steelblue, yes=darkorange)); an NA would render as an unmapped 'NA' color. Add !is.na(statins) to the filter to guard against that. The current data has no NA statins, so the rendered figure is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CqGbHzLqKVGnbEpLEdadG
|
Addressed the agent post-step's new finding (commit
Checks: (The @claude please re-review. Generated by Claude Code |
|
Claude finished @d-morrison's task in 2m 50s —— View job Code Review — PR #381 (re-review after
|
| # | Finding | Status |
|---|---|---|
| 1 | hers_scatter_data missing !is.na(statins) guard before statins-as-color usage |
✅ Fixed — _sec_hers_data.qmd:59 now filters !is.na(statins) alongside age/BMI/LDL |
One minor observation (not blocking)
hers_plot_data in _sec_hers_lm_parallel.qmd:28–29 still doesn't include !is.na(statins):
hers_plot_data <- hers |>
dplyr::filter(!is.na(age), !is.na(BMI), !is.na(LDL))hers_plot_data is then used to derive hers_no / hers_yes (via statins == "no" / "yes" filters, which silently drop any NA-statins rows) and to compute the 3D regression surface extent. Since the current data has 0 NA statins, this is not a practical problem, and the behavior is defensibly different from hers_scatter_data (which explicitly needs the guard because statins drives the color map). Mentioning for completeness; not a blocker.
No other issues found
All 8 HERS subfiles are clean:
_sec_hers_data.qmd—!is.na(statins)now guarded inhers_scatter_data;library(GGally)retained;library(plotly)removed; all plotly callsplotly::-qualified._sec_hers_lm_parallel.qmd— nolibrary()calls;hers_lm1,hers_plot_data,hers_no,hers_yesdefined once;na.action = na.excludeset; forward reference to stratified section removed._sec_hers_lm_interact.qmd— no redundant object redefinitions; both 3D captions reference@eq-hers-interact; table caption references@eq-hers-interact;na.action = na.excludeset._sec_hers_lm_diagnostics.qmd— nolibrary()calls; all figures faceted withlabel_both;code-fold: truethroughout._sec_hers_lm_diagnostics_lm2.qmd— same structure;hers_lm2in scope from earlier include._sec_hers_lm_gof.qmd— AIC/BIC and deviance each produce a singleknitr::kable()output under their div anchors;@tbl-hers-lrtcross-reference correctly replaces a directional "below"._sec_hers_lm_model_selection.qmd—lmtest::lrtest()qualified;:::{#tbl-hers-lrt}div with caption;code-fold: true._sec_hers_lm_stratified.qmd— both equations displayed; both table captions reference their equations;V=vnotation consistent on both LHS and RHS;ageomission explained;na.action = na.excludeon both models;code-fold: trueon all chunks.
Parent includes (_sec_linreg_understanding.qmd, _sec_linreg_assess.qmd) correctly place all ### headings at the include sites; no subfile begins with a heading. regress3d is pinned to commit SHA 158d63c in DESCRIPTION. WORDLIST is sorted with no duplicates.
This PR is ready to merge.
| Branch
|
👀 Picked up by workflow run #27842747585. R/Quarto/renv setup runs first (~3-5 min); Claude itself responds after that. |
|
Thanks — noting the round-7 verdict is "ready to merge." On the one remaining non-blocking observation ( This PR is at a clean, ready-to-merge verdict from both review workflows. Generated by Claude Code |
|
I've reviewed the full diff across all 11 changed files. Here is my assessment: Round 5 review — no new issues The code on Cross-file R environment dependencies —
Diagnostic Latest
GOF tables — each Figure captions — both interaction-model 3D figures read "Fitted regression surface from [Model @eq-hers-interact]", matching the parallel-planes convention. ✓ WORDLIST — DESCRIPTION — No new issues found. The claude-code-review workflow's "ready to merge" verdict on the predecessor commit stands. This is good to go pending CI. — posted by @claude post-step from workflow run |
Built to branch |
LDL ~ age + BMI + age:BMI(predictors areageandBMI; statin use shown as color grouping)statinswithlabel_bothregress3d(fromd-morrison/regress3d@add-show_legend) added to DESCRIPTION Suggests and renv.lockGGally::wrapconflicted withpander::wrap— now usingGGally::wrap()explicitly infig-hers-key-varschunkage(fig-hers-scatter(2D) with an interactive 3D plotly scatter (age × BMI × LDL, colored by statin use)regress3d::add_3d_surface()forLDL ~ age + BMIregress3d::add_3d_surface()forLDL ~ age + BMI + age:BMI_sec_hers_lm_stratified.qmd) to match birthweight stratified sectionconflicted,GGally,ggstats,patchworkall restored_sec_hers_lm_parallel.qmdand_sec_hers_lm_interact.qmd