Skip to content

Only warn about simulated residuals when the Q-Q plot is requested - #1004

Merged
strengejacke merged 1 commit into
mainfrom
hotfix-check-model-simulate-alert
Nov 6, 2026
Merged

strengejacke merged 1 commit into
mainfrom
hotfix-check-model-simulate-alert

Conversation

@jmgirard

@jmgirard jmgirard commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

check_model() printed "Cannot simulate residuals for models of class glm" whenever check left out the Q-Q plot, for example check_model(m, check = "homogeneity") for a binomial glm. Residuals are only simulated for the Q-Q plot, so the message now shows only when that plot was requested and the simulation failed.

Part of #1003. This PR fixes the message only. It does not change the subtitle of the homogeneity panel, the other point in that issue.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the narrowly scoped warning-behavior change.

No open issues 🎉

What changed in this PR

This pull request updates check_model() so simulated-residual warnings appear only when the Q-Q plot is requested, avoiding misleading messages for checks such as homogeneity alone.

Changes:

  • Restrict residual-simulation warnings to check values containing "qq" or "all".
  • Add regression coverage for homogeneity-only checks on binomial GLMs.
  • Document the fix and increment the development package version.
File Description
tests/​testthat/​test-check_model.R Verifies that homogeneity-only checks remain silent.
R/​check_model.R Restricts the simulated-residual alert to Q-Q plot requests.
NEWS.md Documents the corrected alert behavior.
DESCRIPTION Increments the development package version.

Review effort: Lite

@strengejacke
strengejacke merged commit 81e8aa3 into main Nov 6, 2026
12 of 23 checks passed
@strengejacke
strengejacke deleted the hotfix-check-model-simulate-alert branch November 6, 2026 19:50
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.

3 participants