******************************************************************** * File HALCyon wellbeing syntax_Aberdeen1936.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 Aberdeen Birth Cohort 1936 (ABC1936) * Date Created 28/07/2011 * last modified 20/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(WEMWBS1-WEMWBS14) ; egen scorepreimp=rsum(WEMWBS1-WEMWBS14) 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 ;