When plotting random effects from a merMod object with plot_model, an error pops up if 1 is not included in the ri.nr numerical vector.
See example below:
library(lme4)
data("iris")
fit = lmer(Sepal.Length~Species + (1|Sepal.Width) + (1|Petal.Length),data=iris)
# 1 is there, no issue
plot_model(fit, type = "re", ri.nr = c(1,2))
# 1 is absent: "Error in rand.ef[[lcnt]] : subscript out of bounds
plot_model(fit, type = "re", ri.nr = 2)
When plotting random effects from a merMod object with plot_model, an error pops up if 1 is not included in the ri.nr numerical vector.
See example below: