New Resource: Online Guide for Implementing Linear Mixed Model
Linear mixed models (LMMs) are commonly used for analyzing agricultural studies. SAS, R and GUI-based tools (e.g. SPSS) are popular options for implementing LMMs. The documentation for implementing LMMs in SAS is detailed, easy to find and navigate, and provides numerous helpful examples. The documentation for implementation of LMMs in R is dispersed across packages and lacks in a comprehensive set of examples. The CRAN task view for ‘mixed models’ lists over 80 packages implementing mixed models, some with overlapping functionality, different algorithms for solving the equations, and non-standardized package documentation. This documentation can vary widely in (1) the extent of detail for function arguments, (2) technical details of implementation; and (3) examples of implementation and different approaches available for the package functions. Two major packages are used for implementing mixed models in R: ‘nlme’ and its successor, ‘lme4’, each with their strengths and weaknesses. In order to facilitate analysis of common agricultural experimental field designs, an online guide was developed to demonstrate implementation of LMMs using ‘nlme’ and ‘lme4’. Analytical pipelines for 7 experimental designs are demonstrated, in addition to special sections devoted to studies with repeated measures, handling heteroscedasticity, inference on fixed and random effects, and error troubleshooting. This resource is available at https://idahoagstats.github.io/mixed-models-in-R/ and the supporting code is publicly available on GitHub.