You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two problems when using the get_predicted() function on a model containing nested random effect terms.
First, the function gives an error if a fixed effect term is also included in the random effects, for instance as a grouping level (see the reg term in this model). This might not make scientific sense in this particular case, but might be useful for other real-world models.
Second, the terms describing lower groupings (for instance the reg:popu term in this model) are not recognized as individual terms, so the function (silently, if include_random is "default") drops the random effects from the predictions.
model2= lmer(total.fruits~amd+ (1|reg:popu), data=Arabidopsis)
pred2= get_predicted(model2, include_random=TRUE)
#> Warning: `include_random` was set to `TRUE`, but not all random effects were#> found in `data`.#> Setting `include_random = FALSE` now.
packageVersion("lme4")
#> [1] '1.1.35.5'
packageVersion("insight")
#> [1] '0.20.4'
There are two problems when using the
get_predicted()
function on a model containing nested random effect terms.First, the function gives an error if a fixed effect term is also included in the random effects, for instance as a grouping level (see the
reg
term in this model). This might not make scientific sense in this particular case, but might be useful for other real-world models.Second, the terms describing lower groupings (for instance the
reg:popu
term in this model) are not recognized as individual terms, so the function (silently, if include_random is "default") drops the random effects from the predictions.Created on 2024-12-16 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: