plot_models: Wrong labeling of dependent variables when nr of models > 9
fladd opened this issue · comments
When plotting more than 9 models, plot_models
mixes up the labels of the dependent variable.
Tthis issue makes plot_models currently only valid for up to 9 models.
Here is an example with 9 models and correct labels:
plot_models(results_m[1:10], colors="Set3", vline.color="gray", spacing=1.0, show.values=TRUE, show.p=TRUE, p.adjust="fdr", rm.terms=c("age", "gender",))
And here is an example with one more model added, leading to incorrect labels:
plot_models(results_m[1:10], colors="Set3", vline.color="gray", spacing=1.0, show.values=TRUE, show.p=TRUE, p.adjust="fdr", rm.terms=c("age", "gender",))
Plotted models are from lmerTest.
Some additional information:
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /opt/R/4.1.0/lib64/R/lib/libRblas.so
LAPACK: /opt/R/4.1.0/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] corrplot_0.92 pals_1.7 sjPlot_2.8.14 afex_1.3-0 lmerTest_3.1-3 lme4_1.1-33 Matrix_1.5-3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 mvtnorm_1.1-3 lattice_0.20-44 tidyr_1.3.0 digest_0.6.31 utf8_1.2.3 R6_2.5.1 plyr_1.8.8 backports_1.4.1
[10] evaluate_0.20 ggplot2_3.4.1 pillar_1.8.1 rlang_1.0.6 rstudioapi_0.14 minqa_1.2.5 performance_0.10.3 car_3.1-1 nloptr_2.0.3
[19] effectsize_0.8.3 rmarkdown_2.20 ggeffects_1.2.2 splines_4.1.0 stringr_1.5.0 munsell_0.5.0 broom_1.0.4 modelr_0.1.10 compiler_4.1.0
[28] numDeriv_2016.8-1.1 xfun_0.37 parameters_0.21.0 pkgconfig_2.0.3 htmltools_0.5.4 insight_0.19.1 tidyselect_1.2.0 tibble_3.2.0 fansi_1.0.4
[37] withr_2.5.0 dplyr_1.1.0 MASS_7.3-54 sjmisc_2.8.9 grid_4.1.0 nlme_3.1-152 gtable_0.3.1 lifecycle_1.0.3 magrittr_2.0.3
[46] bayestestR_0.13.1 scales_1.2.1 datawizard_0.7.1 estimability_1.4.1 cli_3.6.0 stringi_1.7.12 carData_3.0-5 mapproj_1.2.11 farver_2.1.1
[55] renv_0.17.0 reshape2_1.4.4 generics_0.1.3 vctrs_0.5.2 boot_1.3-28 sjlabelled_1.2.0 RColorBrewer_1.1-3 tools_4.1.0 dichromat_2.0-0.1
[64] glue_1.6.2 purrr_1.0.1 maps_3.4.1 sjstats_0.18.2 emmeans_1.8.6 abind_1.4-5 parallel_4.1.0 fastmap_1.1.1 yaml_2.3.7