Skip to content

Post-#118 follow-up: merge gompertz scripts + update bias-figure TODO#176

Merged
RaphaelS1 merged 1 commit into
mainfrom
post-118-cleanup
May 8, 2026
Merged

Post-#118 follow-up: merge gompertz scripts + update bias-figure TODO#176
RaphaelS1 merged 1 commit into
mainfrom
post-118-cleanup

Conversation

@adibender

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to PR #118 (intro restructure, merged 2026-05-01) that picks up two small post-merge cleanups stranded on the intro-draft3 branch.

Changes

  • Merge intro_gompertz_human.R into code.R: The Swedish-mortality Gompertz fit (a = 2.88e-4, b = 0.097 on 2019 ages 30-100, fitted via population-weighted log-linear regression on eha::swedeaths / eha::swepop) replaces the older synthetic dstr("Gompertz", shape = 2) block at the top of code.R. Both scripts wrote to the same output path book/Figures/introduction/gompertz.png so the duplication was a stale-output hazard. Tested locally — produces a clean four-panel figure (density, hazard, CDF, survival, ages 30–110).
  • Delete the standalone book/experiments/intro_gompertz_human.R since its content is now in code.R.
  • Add library(eha) to the top-level package loads in code.R (needed by the new section).
  • Update bias-figure TODO in book/P0C1_intro.qmd:136 from 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

Test plan

  • Render the relevant section by sourcing the Gompertz block of code.R standalone — done locally, no warnings.
  • Render book/P0C1_intro.qmd to verify TODO comment doesn't break anything (it's just a comment).

@RaphaelS1
RaphaelS1 merged commit d91a272 into main May 8, 2026
1 check failed
@RaphaelS1
RaphaelS1 deleted the post-118-cleanup branch June 17, 2026 15:43
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.

2 participants