Skip to content

Test the glmer() refits without projpred's own Laplace fit - #659

Merged
avehtari merged 1 commit into
masterfrom
fitter-retries-no-laplace
Nov 18, 2026
Merged

avehtari merged 1 commit into
masterfrom
fitter-retries-no-laplace

Conversation

@avehtari

Copy link
Copy Markdown
Member

The tests in test_fitter_retries.R (#633) mock lme4::glmer() to give fit errors, and check the refits of fit_glmer_callback(). Most of them use binomial submodels whose group-level terms are all (1 | <group>). Since #644, fit_glmer_callback() fits these submodels with projpred's own Laplace fit, so it does not call the mock. On master, all six R CMD check jobs fail with the same 15 failures in test_fitter_retries.R (run https://github.com/stan-dev/projpred/actions/runs/44304319966 on 1d983fe, the merge of #644). #645 inherits these failures from master. The macOS job also has failures in test_loo_fold_projection.R and test_methods_vsel.R, which this PR does not change.

This PR passes mlvl_laplace = FALSE in the test helper fit_glmer_retry(), so the tests use lme4::glmer() again. Only the test file changes.

Tests: on ad65ce7, test_fitter_retries.R with setup.R and NOT_CRAN=true gives 66 expectations, 0 failures and 0 warnings (R 4.6.1, testthat 3.3.2, lme4 2.0.6).

This PR was assisted by Claude

@avehtari avehtari added the tests testthat tests label Nov 18, 2026
@avehtari
avehtari merged commit b9b2096 into master Nov 18, 2026
5 of 6 checks passed
@avehtari
avehtari deleted the fitter-retries-no-laplace branch November 18, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests testthat tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant