Skip to content

R2 adjustments - documentation and glmmTMB defaults - #929

Merged
strengejacke merged 8 commits into
mainfrom
strengejacke/issue928
Aug 4, 2026
Merged

R2 adjustments - documentation and glmmTMB defaults#929
strengejacke merged 8 commits into
mainfrom
strengejacke/issue928

Conversation

@strengejacke

Copy link
Copy Markdown
Member

Fixes #928

@strengejacke
strengejacke marked this pull request as ready for review August 3, 2026 13:42
@strengejacke
strengejacke requested a review from Copilot August 3, 2026 13:42

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.

Pull request overview

This PR addresses issue #928 by correcting the r2() documentation (“generalized” vs “general” linear models) and revising the r2.glmmTMB() defaults for non-mixed glmmTMB models, with added test coverage for additional glmmTMB families.

Changes:

  • Update r2() documentation to refer to “Generalized linear models” (GLMs) for Nagelkerke’s R2.
  • Refactor r2.glmmTMB() non-mixed handling to select R2 method based on glmmTMB family and default to McFadden’s R2 for otherwise-unhandled families.
  • Extend tests for non-mixed glmmTMB models to include compois and genpois, and bump the development version.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
R/r2.R Refactors r2.glmmTMB() routing logic and updates docs text in roxygen header.
tests/testthat/test-r2.R Adds/adjusts non-mixed glmmTMB test cases (including compois/genpois).
man/r2.Rd Regenerates docs to match the “Generalized linear models” correction.
DESCRIPTION Bumps package version to reflect user-visible behavioral changes.
Files not reviewed (1)
  • man/r2.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/r2.R Outdated
Comment thread R/r2.R Outdated
@strengejacke
strengejacke merged commit 8ad16d9 into main Aug 4, 2026
13 of 21 checks passed
@strengejacke
strengejacke deleted the strengejacke/issue928 branch August 4, 2026 09:44
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.

R2 adjustments - documentation and glmmTMB defaults

2 participants