******************************************************************** * File HALCyon wellbeing syntax_HCS.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 Hertfordshire Cohort Study (HCS) * Date Created 25/07/2011 * last modified 14/02/2012 * 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( wwembopti -wwembchrf) ; egen scorepreimp=rsum(wwembopti -wwembchrf) 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 ;