Some very basic examples intended to provide an introduction to hypothesis tests, linear modelling (ANOVA), linear mixed-effects modelling, generalised mixed-effects modelling, and non-linear (generalised) mixed-effect modelling in R
.
LMMs and GLMMs use the package lme4
, NLGMMs use brms
to write Bayesian models in Stan
, using R
as the main interface.
Models are run on simulated data, generated using a very basic model similar (but not identical) to the one that is fitted.
For more information about (G)LMMs, see https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html
For common problems and sources of confusion see: https://stats.stackexchange.com/questions/tagged/lme4-nlme?tab=Votes and https://stats.stackexchange.com/questions/tagged/mixed-model?tab=Votes
For more info about fitting non-linear models with brms
see https://paul-buerkner.github.io/brms/articles/brms_nonlinear.html
For an applied example of an NLGMM see https://github.com/JohnKirwan/Olsson_colour_discrimination
As of 13/06/2023 the LMM, GLMM and NLGMM scripts are mostly complete. Markdowns of each script will be added in future versions.