Post-#118 follow-up: merge gompertz scripts + update bias-figure TODO#176
Merged
Conversation
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.
Summary
Follow-up to PR #118 (intro restructure, merged 2026-05-01) that picks up two small post-merge cleanups stranded on the
intro-draft3branch.Changes
intro_gompertz_human.Rintocode.R: The Swedish-mortality Gompertz fit (a = 2.88e-4,b = 0.097on 2019 ages 30-100, fitted via population-weighted log-linear regression oneha::swedeaths/eha::swepop) replaces the older syntheticdstr("Gompertz", shape = 2)block at the top ofcode.R. Both scripts wrote to the same output pathbook/Figures/introduction/gompertz.pngso the duplication was a stale-output hazard. Tested locally — produces a clean four-panel figure (density, hazard, CDF, survival, ages 30–110).book/experiments/intro_gompertz_human.Rsince its content is now incode.R.library(eha)to the top-level package loads incode.R(needed by the new section).book/P0C1_intro.qmd:136from a content-suggestion ("remove left-truncation, delayed entry and immortal time") to a hand-off note:<!-- TODO (Raphael): restyle figure for visual consistency; keep all 5 rows -->. This reflects the agreed direction in the Mainly chapters 1-3, with some other reviewer comments thrown in sorry #118 review thread (Raphael preferred keeping all 5 rows but restyling).Notes
3867da0from the dormantintro-draft3branch.a63a1b3onintro-draft3) was deliberately not cherry-picked: PR Add P1C7: Start-to-finish ML survival analysis chapter #175 (p1c7-start-to-finish) introduces the new chapter that uses theml-sa-pipeline.pngfigure, but that PR doesn't currently re-add the figure (it was already tracked from Mainly chapters 1-3, with some other reviewer comments thrown in sorry #118). Removing it on main here would leave PR Add P1C7: Start-to-finish ML survival analysis chapter #175's chapter referencing a missing figure. The figures stay on main as orphan-but-harmless until Add P1C7: Start-to-finish ML survival analysis chapter #175 lands.Test plan
code.Rstandalone — done locally, no warnings.book/P0C1_intro.qmdto verify TODO comment doesn't break anything (it's just a comment).