After a decade on CRAN, merTools 1.0.0 is the 1.0 long-term-support release.
It resolves the remaining open issues, fixes a correctness bug in
predictInterval() for nested random effects, repairs and extends the
shinyMer() explorer, adds a new plotREimpact() visualization, refreshes the
documentation, and tidies the test suite for low-maintenance, long-term use. The
public API is unchanged and existing results are preserved.
📖 Full changelog: NEWS.md · 📦 CRAN · 🌐 Package site
Highlights
- Validated against brms. A new
Validating predictInterval() against brms
vignette showspredictInterval()reproducing full-Bayesian posterior
prediction intervals almost exactly (point estimates correlate 0.9998,
matching 90% intervals and out-of-sample coverage) at a small fraction of the
computational cost — the lme4 +predictInterval()path runs in about a second
versus several minutes for a single brms fit. - Correctness fix for nested random effects (#124).
predictInterval()no
longer returns seed-dependent point estimates when a prediction frame mixes
observed and unobserved levels of an interaction grouping factor (e.g.
(1 | a/b)). Observed-level predictions are bit-for-bit unchanged. - New
new.levels = "draw". For a group the model never saw,"draw"
samples its effect from the estimated random-effect covariance — the analogue
ofbrms::posterior_predict(allow_new_levels = TRUE). The default
("zero") is unchanged. - New
plotREimpact(), andplotFEsim()now highlights significant terms.
Pass a named list ofREimpact()results to overlay grouping factors on
shared axes. shinyMer()revived and extended — a Model Summary tab and subset-based
Random/Average draws.- Refreshed docs — a new Exploring Contextual Effects vignette, a corrected
Prediction Intervals vignette, and a propercitation("merTools").
New Features
predictInterval()gains anew.levelsargument ("zero"default,"draw")
for unobserved groups, reflecting between-group uncertainty fromVarCorr.plotREimpact()visualizesREimpact()output; named lists overlay grouping
factors for direct comparison.plotFEsim()highlights fixed effects whose interval excludes the null.shinyMer()Model Summary tab (#78) and subset-restricted draws (#32).
Bug Fixes
- Reproducible
predictInterval()for partially-observed nested / interaction
random effects (#124). - Restored a single RNG stream in
predictInterval()(helper refactor had reset
the seed mid-call); verified bit-for-bit against prior CRAN output. - Correct handling of multiple random-effect term blocks per grouping factor —
(x + y || g),(1|g) + (0 + x|g)(#118). averageObs()/findFormFuns()on matrix-LHS (cbind binomial) models (#83).- Several
shinyMer()"Substantive Effect" tab defects; migrated to
DT::renderDT(). - Replaced bare
subbars()withreformulas::subbars()for the lme4
deprecation.
Documentation, tests & CI
- New Contextual Effects vignette (#136); rebuilt Prediction Intervals
vignette and fixed its figure (#116); improvedinst/CITATION(#137). - Cross-version numeric regression harness
(tests/comparisons/predictInterval-regression.R); pinned RNG version;
disabled testthat parallelism for deterministic seeds. - Bumped
actions/checkout@v5; addressed the GitHub Actions Node.js 20
deprecation.
1.0 marks the start of a long-term-support phase: stable API, with future
1.0.x releases focused on bug fixes, CRAN/dependency compatibility, and docs.
Thanks to Carl Frederick, Alex Whitworth, Ben Bolker, Davis Vaughan, and the
issue reporters — including @dotPiano, whose report led to the #124 fix.