LT-AoP: Data & Analyses

Data and R code for the LT-AoP project and paper

Behavioral, immunohistochemistry and RT-qPCR data for the LT-AoP project were analysed in R, hosted on GitHub, and archived through Zenodo.

Marc-Aurèle Rivière


May 1, 2022


The LT-AoP project included behavioral, immunohistochemistry and RT-qPCR data, which were analysed in R, hosted on GitHub, and archived with Zenodo. Data were modeled through the Generalized Linear Mixed Model (GLMM) framework, using the glmmTMB package (Brooks et al., 2017). Random intercepts were added to account for the correlation between pseudo-replicates. Temporally-dependent repeated measures were modeled using auto-regressive (AR1) terms.

The optimal likelihood families were selected based on our theoretical understanding of the variable’s properties, and to minimize Aikake’s Information Criterion (AIC). Count data (e.g., cell counts, number of maze entries, …) were modeled using a Generalized Poisson likelihood, measures bound at 0 (e.g., cell density, volumes, weights, …) were modeled using a Gamma likelihood, and proportions (e.g., ratios of areas) with a Beta likelihood.

Model diagnostics were done using the DHARMa (Hartig, 2022) & performance (Lüdecke et al., 2021) packages, and estimated marginal means/contrasts were computed with the emmeans package (Lenth, 2022).

A website documenting the analyses and their results was generated using Quarto, to allow interested readers to explore our data & models’ outputs without having to run the code themselves.

Back to top


Brooks, M. E., Kristensen, K., van Benthem, K. J., Magnusson, A., Berg, C. W., Nielsen, A., Skaug, H. J., Maechler, M., & Bolker, B. M. (2017). glmmTMB balances speed and flexibility among packages for zero-inflated generalized linear mixed modeling. The R Journal, 9(2), 378–400.
Hartig, F. (2022). DHARMa: Residual diagnostics for hierarchical (multi-level / mixed) regression models.
Lenth, R. V. (2022). Emmeans: Estimated marginal means, aka least-squares means.
Lüdecke, D., Ben-Shachar, M. S., Patil, I., Waggoner, P., & Makowski, D. (2021). performance: An R package for assessment, comparison and testing of statistical models. Journal of Open Source Software, 6(60), 3139.
Posterior predictive checks for a Gamma autoregressive model on mouse weight evolution through time