Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 May 1;15(5):dmm048025.
doi: 10.1242/dmm.048025. Epub 2022 May 6.

Accessible analysis of longitudinal data with linear mixed effects models

Affiliations

Accessible analysis of longitudinal data with linear mixed effects models

Jessica I Murphy et al. Dis Model Mech. .

Abstract

Longitudinal studies are commonly used to examine possible causal factors associated with human health and disease. However, the statistical models, such as two-way ANOVA, often applied in these studies do not appropriately model the experimental design, resulting in biased and imprecise results. Here, we describe the linear mixed effects (LME) model and how to use it for longitudinal studies. We re-analyze a dataset published by Blanton et al. in 2016 that modeled growth trajectories in mice after microbiome implantation from nourished or malnourished children. We compare the fit and stability of different parameterizations of ANOVA and LME models; most models found that the nourished versus malnourished growth trajectories differed significantly. We show through simulation that the results from the two-way ANOVA and LME models are not always consistent. Incorrectly modeling correlated data can result in increased rates of false positives or false negatives, supporting the need to model correlated data correctly. We provide an interactive Shiny App to enable accessible and appropriate analysis of longitudinal data using LME models.

Keywords: ANOVA; Linear mixed effects; Longitudinal; Microbiome; Mouse; Shiny app.

PubMed Disclaimer

Conflict of interest statement

Competing interests The authors declare no competing or financial interests.

Figures

Fig. 1.
Fig. 1.
EasyLME Shiny app user interface featuring the ‘Fitted Lines’ tab. (A) Default variables for the Blanton et al. demo data. (B) Main tabs of the app. (C) Drop-down menu to select a specific model to visualize the fitted lines. (D) Plot of the original data and fitted lines for the higher-level random effect variable in the maximal model (Donor Intercept/Slope+Mouse Intercept/Slope).
Fig. 2.
Fig. 2.
Study design for the Blanton et al. dataset. Fecal samples from children aged 6-18 months were orally transferred to five germ-free mice (M). The analysis was restricted to the three healthy (H) and five undernourished (U) donor samples that produced >50% transplantation efficiency. The percentage weight change of each mouse was recorded at 12 time points (t1-12): 0, 1, 3, 4, 7, 11, 14, 18, 21, 25, 28 and 32 days.

References

    1. Ahlin, Č., Stupica, D., Strle, F. and Lusa, L. (2015). medplot: a web application for dynamic summary and analysis of longitudinal medical data based on R. PLoS One 10, e0121760. 10.1371/journal.pone.0121760 - DOI - PMC - PubMed
    1. Alamed, J., Wilcock, D. M., Diamond, D. M., Gordon, M. N. and Morgan, D. (2006). Two-day radial-arm water maze learning and memory task; robust resolution of amyloid-related memory deficits in transgenic mice. Nat. Protoc. 1, 1671. 10.1038/nprot.2006.275 - DOI - PubMed
    1. Barr, D. J., Levy, R., Scheepers, C. and Tily, H. J. (2013). Random effects structure for confirmatory hypothesis testing: Keep it maximal. J. Mem. Lang. 68, 255-278. 10.1016/j.jml.2012.11.001 - DOI - PMC - PubMed
    1. Bates, D., Mächler, M., Bolker, B. and Walker, S. (2015). Fitting linear mixed-effects models using lme4. J. Stat. Softw. 67, 1-48. 10.18637/jss.v067.i01 - DOI
    1. Blanton, L. V., Charbonneau, M. R., Salih, T., Barratt, M. J., Venkatesh, S., Ilkaveya, O., Subramanian, S., Manary, M. J., Trehan, I., Jorgensen, J. M.et al. (2016). Gut bacteria that prevent growth impairments transmitted by microbiota from malnourished children. Science 351, aad3311. 10.1126/science.aad3311 - DOI - PMC - PubMed