Cargando…

Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables

Biological data are often intrinsically hierarchical (e.g., species from different genera, plants within different mountain regions), which made mixed‐effects models a common analysis tool in ecology and evolution because they can account for the non‐independence. Many questions around their practic...

Descripción completa

Detalles Bibliográficos
Autores principales: Oberpriller, Johannes, de Souza Leite, Melina, Pichler, Maximilian
Formato: Online Artículo Texto
Lenguaje:English
Publicado: John Wiley and Sons Inc. 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9309037/
https://www.ncbi.nlm.nih.gov/pubmed/35898418
http://dx.doi.org/10.1002/ece3.9062
_version_ 1784753070614249472
author Oberpriller, Johannes
de Souza Leite, Melina
Pichler, Maximilian
author_facet Oberpriller, Johannes
de Souza Leite, Melina
Pichler, Maximilian
author_sort Oberpriller, Johannes
collection PubMed
description Biological data are often intrinsically hierarchical (e.g., species from different genera, plants within different mountain regions), which made mixed‐effects models a common analysis tool in ecology and evolution because they can account for the non‐independence. Many questions around their practical applications are solved but one is still debated: Should we treat a grouping variable with a low number of levels as a random or fixed effect? In such situations, the variance estimate of the random effect can be imprecise, but it is unknown if this affects statistical power and type I error rates of the fixed effects of interest. Here, we analyzed the consequences of treating a grouping variable with 2–8 levels as fixed or random effect in correctly specified and alternative models (under‐ or overparametrized models). We calculated type I error rates and statistical power for all‐model specifications and quantified the influences of study design on these quantities. We found no influence of model choice on type I error rate and power on the population‐level effect (slope) for random intercept‐only models. However, with varying intercepts and slopes in the data‐generating process, using a random slope and intercept model, and switching to a fixed‐effects model, in case of a singular fit, avoids overconfidence in the results. Additionally, the number and difference between levels strongly influences power and type I error. We conclude that inferring the correct random‐effect structure is of great importance to obtain correct type I error rates. We encourage to start with a mixed‐effects model independent of the number of levels in the grouping variable and switch to a fixed‐effects model only in case of a singular fit. With these recommendations, we allow for more informative choices about study design and data analysis and make ecological inference with mixed‐effects models more robust for small number of levels.
format Online
Article
Text
id pubmed-9309037
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher John Wiley and Sons Inc.
record_format MEDLINE/PubMed
spelling pubmed-93090372022-07-26 Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables Oberpriller, Johannes de Souza Leite, Melina Pichler, Maximilian Ecol Evol Research Articles Biological data are often intrinsically hierarchical (e.g., species from different genera, plants within different mountain regions), which made mixed‐effects models a common analysis tool in ecology and evolution because they can account for the non‐independence. Many questions around their practical applications are solved but one is still debated: Should we treat a grouping variable with a low number of levels as a random or fixed effect? In such situations, the variance estimate of the random effect can be imprecise, but it is unknown if this affects statistical power and type I error rates of the fixed effects of interest. Here, we analyzed the consequences of treating a grouping variable with 2–8 levels as fixed or random effect in correctly specified and alternative models (under‐ or overparametrized models). We calculated type I error rates and statistical power for all‐model specifications and quantified the influences of study design on these quantities. We found no influence of model choice on type I error rate and power on the population‐level effect (slope) for random intercept‐only models. However, with varying intercepts and slopes in the data‐generating process, using a random slope and intercept model, and switching to a fixed‐effects model, in case of a singular fit, avoids overconfidence in the results. Additionally, the number and difference between levels strongly influences power and type I error. We conclude that inferring the correct random‐effect structure is of great importance to obtain correct type I error rates. We encourage to start with a mixed‐effects model independent of the number of levels in the grouping variable and switch to a fixed‐effects model only in case of a singular fit. With these recommendations, we allow for more informative choices about study design and data analysis and make ecological inference with mixed‐effects models more robust for small number of levels. John Wiley and Sons Inc. 2022-07-24 /pmc/articles/PMC9309037/ /pubmed/35898418 http://dx.doi.org/10.1002/ece3.9062 Text en © 2022 The Authors. Ecology and Evolution published by John Wiley & Sons Ltd. https://creativecommons.org/licenses/by/4.0/This is an open access article under the terms of the http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.
spellingShingle Research Articles
Oberpriller, Johannes
de Souza Leite, Melina
Pichler, Maximilian
Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title_full Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title_fullStr Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title_full_unstemmed Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title_short Fixed or random? On the reliability of mixed‐effects models for a small number of levels in grouping variables
title_sort fixed or random? on the reliability of mixed‐effects models for a small number of levels in grouping variables
topic Research Articles
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9309037/
https://www.ncbi.nlm.nih.gov/pubmed/35898418
http://dx.doi.org/10.1002/ece3.9062
work_keys_str_mv AT oberprillerjohannes fixedorrandomonthereliabilityofmixedeffectsmodelsforasmallnumberoflevelsingroupingvariables
AT desouzaleitemelina fixedorrandomonthereliabilityofmixedeffectsmodelsforasmallnumberoflevelsingroupingvariables
AT pichlermaximilian fixedorrandomonthereliabilityofmixedeffectsmodelsforasmallnumberoflevelsingroupingvariables