******************************************************************** * File HALCyon wellbeing syntax_Lothian1921.do * BY Rachel Cooper, MRC Unit for Lifelong Health and Ageing at UCL * FOR HALCyon cross-cohort collaboration (funded by the New Dynamics of Ageing (RES-353-25-0001)) * DATASET Lothian Birth Cohort 1921 (LBC1921) * Date Created 28/07/2011 * last modified 21/10/2011 * PURPOSE Derives Warwick Edinburgh Mental Wellbeing Score (WEMWBS) for use in cross-cohort analyses ************************************************************************************* #delimit ; set more off ; /*Generating variable to indicate number of items missing */ egen wemwbsm=rmiss(wefuturew3- wecheerfulw3) ; egen scorepreimp=rsum(wefuturew3- wecheerfulw3) if wemwbsm>=0 & wemwbsm<=3 ; gen wemwbstot= scorepreimp ; replace wemwbstot=(scorepreimp+(scorepreimp/13)) if wemwbsm==1 ; replace wemwbstot=(scorepreimp+((scorepreimp/12)*2)) if wemwbsm==2 ; replace wemwbstot=(scorepreimp+((scorepreimp/11)*3)) if wemwbsm==3 ; label variable wemwbsm "No. of items missing - WEMWBS" ; label variable wemwbstot "Total WEMWBS score" ; drop scorepreimp ;