Abstract
This collection contains the R and Stan code supporting Chapters 4–7 of the PhD thesis “Bayesian Methods for Modelling Longitudinal Data With Applications to Childhood BMI”. It covers longitudinal growth modelling, estimation and analysis of body mass index (BMI) milestones, relationships between growth milestones and later BMI, and simulation and applied analyses of time-varying genetic effects.
The code is organised by thesis chapter, with a separate directory for growth-data cleaning, model fitting and diagnostics. Scripts include data preparation, statistical modelling, simulation, and generation of figures and tables. A README describes the directory structure.