
R code for the analyses of low back pain prevalence and risk factors across four populations (Orang Asli, Turkana, Tsimané, Rarámuri). Descriptive prevalence estimation uses binomial GAMs with sex-specific penalised splines of age and marginal standardisation. Causal effect estimation uses covariate balancing weights (optimisation-based balancing weights and energy balancing via WeightIt) with G-computation to produce average exposure-response functions (AERFs) and average marginal effect functions (AMEFs), and parametric simulation (clarify) for between-population contrasts. Version 2.0 reorganises the code, fixes three run-time defects present in v1.0 (none affecting published estimates), corrects method descriptions in comments, and adds an renv lockfile pinning the software versions stated in the paper.
