Abstract
This code includes the statistical analysis for my study on “Mediating effects of depressive symptoms and cardiometabolic health on dementia development”. It was created as part of my PhD research on “The role of depressive symptoms and cardiometabolic risk factors in the prediction of dementia: a cross-country comparison in England, the United States and China”. The analysis was performed in Stata version 16 and Mplus version 8 and contains code on mediation analysis using structural-equation modelling (SEM). The code is created using three publicly available population-based databases: the English Longitudinal Study of Ageing (ELSA), Health and Retirement Study (HRS), China Health and Retirement Longitudinal Study (CHARLS).