Skip to content

Fix course mismatches found in a full re-audit - #59

Merged
PeterSlijkhuis merged 2 commits into
mainfrom
course-reaudit
Oct 12, 2026
Merged

PeterSlijkhuis merged 2 commits into
mainfrom
course-reaudit

Conversation

@PeterSlijkhuis

@PeterSlijkhuis PeterSlijkhuis commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Before: a few exercise checks rejected a correct answer or misread a common one, a handful of explanations did not match what the exercise or data shows, and the normal-distribution simulation could show an area for a cut-off the slider no longer displayed.

After: every lesson code block (298) and every exercise solution, alternate and wrong answer (89 exercises) was re-run in native R against the current CSVs, including lme4, lmerTest, emmeans, BayesFactor, brms and lavaan. No quoted number was wrong. These are the fixes:

  • m4-3-a: also accepts ggplot2 versions where theme_classic() blanks panel.grid.major/.minor.
  • m10-3-b: uses numeric_columns(), so a correct aggregate() answer is no longer rejected.
  • m12-3-a: no longer claims every non-Tukey adjustment is more conservative (Holm is not, always).
  • m14-3-a: an ML fit (REML = FALSE, which the book recommends) now gets an explanation instead of a bare number mismatch.
  • 12-1 quiz: lm() makes the same assumptions as the pooled t-test; Welch assumes less.
  • 15-2: introduces exp() as an odds ratio before the exercise that asks for one.
  • 16-3: the BayesFactor default prior can change the evidence label (remote: 3.28 vs 1.62).
  • 17-1: fixed.x = FALSE so lavaan does not silently drop about a quarter of its bootstrap draws.
  • 17-2: the pressure/support example now has the positive sign the data have.
  • 08-3: "about a tenth of a point apart" (the gap is 0.103). m7-2-a: check comment numbers updated.
  • Distribution sim: the cut-off is clamped to the slider range when the SD changes, with a test.

How: native R 4.3 from the Ubuntu archive, a harness that runs each check through the same wrapCheck preamble as src/r/checker.ts. Type check, static validation and all unit tests pass locally; the webR suite runs in CI. (A first attempt at an m3-1-b branch for range() inside summarise() was dropped: the site's dplyr already stops with an error there.)

Every lesson code block and exercise was re-run in native R against the
current data. No quoted number was wrong; these fix places where an
explanation, check or simulation did not match what students see:

- m3-1-b, m4-3-a, m10-3-b, m14-3-a: checks that missed the lesson's own
  trap or rejected a correct answer (range() rows, older ggplot2 themes,
  aggregate() matrix columns, ML instead of REML)
- m12-3-a: drop the claim that any non-Tukey method is more conservative
- 12-1 quiz: lm() matches the pooled t-test, Welch assumes less
- 15-2: introduce exp() as an odds ratio before the exercise that uses it
- 16-3: the BayesFactor default prior can change the evidence label
- 17-1: fixed.x = FALSE so lavaan does not drop bootstrap draws
- 17-2: the pressure/support example now has the data's positive sign
- Distribution sim: keep the cut-off inside the slider range
@PeterSlijkhuis
PeterSlijkhuis marked this pull request as ready for review October 12, 2026 08:32
@PeterSlijkhuis
PeterSlijkhuis merged commit b28439e into main Oct 12, 2026
4 checks passed
@PeterSlijkhuis
PeterSlijkhuis deleted the course-reaudit branch October 12, 2026 09:25
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.

1 participant