Description:
When using summ() with an random intercept multilevel model and setting confint = TRUE, the function fails with an index out of bounds error. This is caused by dropped dimensions when computing the confidence intervals.
Reprex:
library(lme4)
#> Loading required package: Matrix
library(jtools)
model <- lmer(Petal.Length ~ 1 + (1 | Species), data = iris)
summ(model, confint = TRUE)
#> Error in the_cis[, 1]: incorrect number of dimensions
Created on 2025-06-19 with reprex v2.1.1
Proposed solution:
When computing the_cis in summ.merMod(), consider adding the drop = FALSE argument to the subset:
the_cis <- confint(model, parm = "beta_", method = conf.method[1], level = ci.width)
the_cis <- the_cis[rownames(the_sum$coefficients), , drop = FALSE]
This argument will prevent the_cis to be simplified from a matrix to a vector when there is only one row (i.e. the intercept).
Description:
When using
summ()with an random intercept multilevel model and settingconfint = TRUE, the function fails with an index out of bounds error. This is caused by dropped dimensions when computing the confidence intervals.Reprex:
Created on 2025-06-19 with reprex v2.1.1
Proposed solution:
When computing
the_cisinsumm.merMod(), consider adding thedrop = FALSEargument to the subset:This argument will prevent
the_cisto be simplified from a matrix to a vector when there is only one row (i.e. the intercept).