One of the frequent questions by users of the mixed model function lmer of the lme4 package has been: How can I get p values for the F and t tests for objects returned by lmer? The lmerTest package ...extends the 'lmerMod' class of the lme4 package, by overloading the anova and summary functions by providing p values for tests for fixed effects. We have implemented the Satterthwaite's method for approximating degrees of freedom for the t and F tests. We have also implemented the construction of Type I - III ANOVA tables. Furthermore, one may also obtain the summary as well as the anova table using the Kenward-Roger approximation for denominator degrees of freedom (based on the KRmodcomp function from the pbkrtest package). Some other convenient mixed model analysis tools such as a step method, that performs backward elimination of nonsignificant effects - both random and fixed, calculation of population means and multiple comparison tests together with plot facilities are provided by the package as well.
In public health research an increasing number of studies is conducted in which intensive longitudinal data is collected in an experience sampling or a daily diary design. Typically, the resulting ...data is analyzed with a mixed‐effects model or mixed‐effects location scale model because they allow one to examine a host of interesting longitudinal research questions. Here, we introduce an extension of the mixed‐effects location scale model in which measurement error of the observed variables is considered by a latent factor model and in which—in addition to the mean‐or location‐related effects—the residual variance of the latent factor and the parameters of the autoregressive process of this latent factor can differ between persons. We show how to estimate the parameters of the model with a maximum likelihood approach, whose performance is also compared with a Bayesian approach in a small simulation study. We illustrate the models using a real data example and end with a discussion in which we suggest questions for future research.
Full text
Available for:
BFBNIB, FZAB, GIS, IJS, KILJ, NLZOH, NUK, OILJ, SBCE, SBMB, UL, UM, UPUK
Linear mixed‐effects models are powerful tools for analysing complex datasets with repeated or clustered observations, a common data structure in ecology and evolution. Mixed‐effects models involve ...complex fitting procedures and make several assumptions, in particular about the distribution of residual and random effects. Violations of these assumptions are common in real datasets, yet it is not always clear how much these violations matter to accurate and unbiased estimation.
Here we address the consequences of violations in distributional assumptions and the impact of missing random effect components on model estimates. In particular, we evaluate the effects of skewed, bimodal and heteroscedastic random effect and residual variances, of missing random effect terms and of correlated fixed effect predictors. We focus on bias and prediction error on estimates of fixed and random effects.
Model estimates were usually robust to violations of assumptions, with the exception of slight upward biases in estimates of random effect variance if the generating distribution was bimodal but was modelled by Gaussian error distributions. Further, estimates for (random effect) components that violated distributional assumptions became less precise but remained unbiased. However, this particular problem did not affect other parameters of the model. The same pattern was found for strongly correlated fixed effects, which led to imprecise, but unbiased estimates, with uncertainty estimates reflecting imprecision.
Unmodelled sources of random effect variance had predictable effects on variance component estimates. The pattern is best viewed as a cascade of hierarchical grouping factors. Variances trickle down the hierarchy such that missing higher‐level random effect variances pool at lower levels and missing lower‐level and crossed random effect variances manifest as residual variance.
Overall, our results show remarkable robustness of mixed‐effects models that should allow researchers to use mixed‐effects models even if the distributional assumptions are objectively violated. However, this does not free researchers from careful evaluation of the model. Estimates that are based on data that show clear violations of key assumptions should be treated with caution because individual datasets might give highly imprecise estimates, even if they will be unbiased on average across datasets.
Full text
Available for:
FZAB, GIS, IJS, KILJ, NLZOH, NUK, OILJ, SBCE, SBMB, UL, UM, UPUK
In basic neuroscience research, data are often clustered or collected with repeated measures, hence correlated. The most widely used methods such as t test and ANOVA do not take data dependence into ...account and thus are often misused. This Primer introduces linear and generalized mixed-effects models that consider data dependence and provides clear instruction on how to recognize when they are needed and how to apply them. The appropriate use of mixed-effects models will help researchers improve their experimental design and will lead to data analyses with greater validity and higher reproducibility of the experimental findings.
In this Primer, Yu et al. introduce linear and generalized mixed-effects models for improved statistical analysis in neuroscience research and provide clear instruction on how to recognize when they are needed and how to apply them.
Full text
Available for:
GEOZS, IJS, IMTLJ, KILJ, KISLJ, NLZOH, NUK, OILJ, PNG, SAZU, SBCE, SBJE, UILJ, UL, UM, UPCLJ, UPUK, ZAGLJ, ZRSKP
Buildings are typically equipped with smart meters to measure electricity demand at regular intervals. Smart meter data for a single building have many uses, such as forecasting and assessing overall ...building performance. However, when data are available from multiple buildings, there are additional applications that are rarely explored. For instance, we can explore how different building characteristics influence energy demand. If each building is treated as a random effect and building characteristics are handled as fixed effects, a mixed‐effects model can be used to estimate how characteristics affect energy usage. In this paper, we demonstrate that producing 1‐day‐ahead demand predictions for 123 commercial office buildings using mixed models can improve forecasting accuracy. We experiment with random intercept, random intercept and slope and non‐linear mixed models. The predictive performance of the mixed‐effects models are tested against naive, linear and non‐linear benchmark models fitted to each building separately. This research justifies using mixed models to improve forecasting accuracy and to quantify changes in energy consumption under different building configuration scenarios.
Full text
Available for:
BFBNIB, FZAB, GIS, IJS, KILJ, NLZOH, NUK, OILJ, SBCE, SBMB, UL, UM, UPUK
Catching Up on Multilevel Modeling Hoffman, Lesa; Walters, Ryan W
Annual review of psychology,
01/2022, Volume:
73, Issue:
1
Journal Article
Peer reviewed
Open access
This review focuses on the use of multilevel models in psychology and other social sciences. We target readers who are catching up on current best practices and sources of controversy in the ...specification of multilevel models. We first describe common use cases for clustered, longitudinal, and cross-classified designs, as well as their combinations. Using examples from both clustered and longitudinal designs, we then address issues of centering for observed predictor variables: its use in creating interpretable fixed and random effects of predictors, its relationship to endogeneity problems (correlations between predictors and model error terms), and its translation into multivariate multilevel models (using latent-centering within multilevel structural equation models). Finally, we describe novel extensions-mixed-effects location-scale models-designed for predicting differential amounts of variability.
Full text
Available for:
CMK, FFLJ, NUK, UL, UM, UPUK
Summary
Intra‐class correlations (ICC) and repeatabilities (R) are fundamental statistics for quantifying the reproducibility of measurements and for understanding the structure of biological ...variation. Linear mixed effects models offer a versatile framework for estimating ICC and R. However, while point estimation and significance testing by likelihood ratio tests is straightforward, the quantification of uncertainty is not as easily achieved.
A further complication arises when the analysis is conducted on data with non‐Gaussian distributions because the separation of the mean and the variance is less clear‐cut for non‐Gaussian than for Gaussian models. Nonetheless, there are solutions to approximate repeatability for the most widely used families of generalized linear mixed models (GLMMs).
Here, we introduce the R package rptR for the estimation of ICC and R for Gaussian, binomial and Poisson‐distributed data. Uncertainty in estimators is quantified by parametric bootstrapping and significance testing is implemented by likelihood ratio tests and through permutation of residuals. The package allows control for fixed effects and thus the estimation of adjusted repeatabilities (that remove fixed effect variance from the estimate) and enhanced agreement repeatabilities (that add fixed effect variance to the denominator). Furthermore, repeatability can be estimated from random‐slope models. The package features convenient summary and plotting functions.
Besides repeatabilities, the package also allows the quantification of coefficients of determination R2 as well as of raw variance components. We present an example analysis to demonstrate the core features and discuss some of the limitations of rptR.
Full text
Available for:
FZAB, GIS, IJS, KILJ, NLZOH, NUK, OILJ, SBCE, SBMB, UL, UM, UPUK
This article addresses the analysis of crossover designs with nonignorable dropout. We study nonreplicated crossover designs and replicated designs separately. With a primary objective of comparing ...the treatment mean effects, we jointly model the longitudinal measures and discrete time to dropout. We propose shared‐parameter models and mixed‐effects selection models. We adapt a linear‐mixed effects model as the conditional model for the longitudinal outcomes. We invoke a discrete‐time hazards model with a complementary log‐log link function for the conditional distribution of time to dropout. We apply maximum likelihood for parameter estimation. We perform simulation studies to investigate the robustness of our proposed approaches under various missing data mechanisms. We then apply the approaches to two examples with a continuous outcome and one example with a binary outcome using existing software. We also implement the controlled multiple imputation methods as a sensitivity analysis of the missing data assumption.
Full text
Available for:
BFBNIB, FZAB, GIS, IJS, KILJ, NLZOH, NUK, OILJ, SBCE, SBMB, UL, UM, UPUK
Aim: Higher-elevation areas on islands and continental mountains tend to be separated by longer distances, predicting higher endemism at higher elevations; our study is the first to test the ...generality of the predicted pattern. We also compare it empirically with contrasting expectations from hypotheses invoking higher speciation with area, temperature and species richness. Location: Thirty-two insular and 18 continental elevational gradients from around the world. Methods: We compiled entire floras with elevation-specific occurrence information, and calculated the proportion of native species that are endemic ('percent endemism') in 100-m bands, for each of the 50 elevational gradients. Using generalized linear models, we tested the relationships between percent endemism and elevation, isolation, temperature, area and species richness. Results: Percent endemism consistently increased monotonically with elevation, globally. This was independent of richness—elevation relationships, which had varying shapes but decreased with elevation at high elevations. The endemism—elevation relationships were consistent with isolation-related predictions, but inconsistent with hypotheses related to area, richness and temperature. Main conclusions: Higher per-species speciation rates caused by increasing isolation with elevation are the most plausible and parsimonious explanation for the globally consistent pattern of higher endemism at higher elevations that we identify. We suggest that topography-driven isolation increases speciation rates in mountainous areas, across all elevations and increasingly towards the equator. If so, it represents a mechanism that may contribute to generating latitudinal diversity gradients in a way that is consistent with both present-day and palaeontological evidence.
Full text
Available for:
BFBNIB, FZAB, GIS, IJS, KILJ, NLZOH, NMLJ, NUK, OILJ, PNG, SAZU, SBCE, SBMB, UL, UM, UPUK