*********************Meets/Exceeds Guideline 1************************************************** ************************************************************************************************ *****Please note: in this calculation, the analysis excludes anyone with any missing data on the *parameters used to collect compliance: days drinking, number of drinks per week, etc. *Also, please make sure your variables are lower case in Stata. If not run the following syntax: * change variables from upper to lowercase quietly foreach oldname of varlist * { local newname=lower("`oldname'") rename `oldname' `newname' } *************Those who exceed Guideline 1****************
*Number of days of the week they drank recode alw_2a1 0=0 996=0 1/99=1 997/999=., gen(Sunday) recode alw_2a2 0=0 996=0 1/99=1 997/999=., gen(Monday) recode alw_2a3 0=0 996=0 1/99=1 997/999=., gen(Tuesday) recode alw_2a4 0=0 996=0 1/99=1 997/999=., gen(Wednesday) recode alw_2a5 0=0 996=0 1/99=1 997/999=., gen(Thursday) recode alw_2a6 0=0 996=0 1/99=1 997/999=., gen(Friday) recode alw_2a7 0=0 996=0 1/99=1 997/999=., gen(Saturday) gen drinkingdays = Sunday+Monday+Tuesday+Wednesday+Thursday+Friday+Saturday *Create Guideline1 variable gen Guideline1 = . **Those who exceed weekly limits replace Guideline1=2 if dhh_sex==1 & (alwdwky >15 & alwdwky<693) replace Guideline1=2 if dhh_sex==2 & (alwdwky >10 & alwdwky<693) **Those who exceed daily limits local daily alw_2a1 alw_2a2 alw_2a3 alw_2a4 alw_2a5 alw_2a6 alw_2a7 foreach lev of loc daily{ replace Guideline1 = 2 if (dhh_sex == 1 & (`lev'>3 & `lev'<996)) replace Guideline1 = 2 if (dhh_sex == 2 & (`lev'>2 & `lev'<996)) } **Those who exceed # of drinking days replace Guideline1 = 2 if (drinkingdays >5) *************Those in compliance with Guideline 1**************** **Those who comply with weekly limits gen intermediate1=0 replace intermediate1=1 if dhh_sex==1 & (alwdwky <=15) replace intermediate1=1 if dhh_sex==2 & (alwdwky <=10) **Those who comply with daily limits gen intermediate2=0 replace intermediate2 = 1 if (dhh_sex == 1 & (alw_2a1<=3 & alw_2a2<=3 & alw_2a3<=3 & alw_2a4<=3 & alw_2a5<=3 & alw_2a6<=3 & alw_2a7<=3 ) ) replace intermediate2 = 1 if (dhh_sex == 2 & (alw_2a1<=2 & alw_2a2<=2 & alw_2a3<=2 & alw_2a4<=2 & alw_2a5<=2 & alw_2a6<=2 & alw_2a7<=2 ) ) **Those in compliance with Guideline #1 - with weekly, daily and drinking day limits replace Guideline1=1 if intermediate1==1 & intermediate2==1 & drinkingdays<=5 replace Guideline1=1 if alc_1==2 /*no drink in past year*/ replace Guideline1=1 if alw_1==2 /* not in past week */ *************Exclusions****************
**Those under 19 years of age replace Guideline1 = 98 if dhh_age<19 **Those pregnant or breastfeeding replace Guideline1 = 98 if mam_037 == 1 | mex_05 == 1 replace Guideline1 = 99 if (mam_037 == 7 | mam_037 == 8 | mam_037==9 | mex_05==9) **Those who answered DK/Ref/Not Stated for alc_1 replace Guideline1 = 99 if (alc_1 == 7 | alc_1 ==8 | alc_1 ==9) **Those who do not have a weekly total replace Guideline1 = 99 if alwdwky == 999 format Guideline1 %1.0f lab var Guideline1 "2011 Canada's LRADG Guideline 1" lab define Guideline1 1 "Complies" 2 "Exceeds" 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" lab values Guideline1 Guideline1 *For those wishing to exclude 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" gen Guideline1_ver2= Guideline1 recode Guideline1_ver2 98/99=. generate k = (geodhr4==3541) /* replace varname and geodhr4 with your own health unit info */ svyset [pweight=fwgt], brrweight(bsw*) vce(brr) mse svy, subpop(k): tab Guideline1, per cv ci svy, subpop(k): tab Guideline1_ver2, per cv ci
*********************Meets/Exceeds Guideline 2************************************************** ************************************************************************************************
gen Guideline2 = 99999 replace Guideline2 = 1 if alc_3==1 | alc_1==2 replace Guideline2 = 2 if alc_3>=2 & alc_3<=6 replace Guideline2 = 98 if mam_037 == 1 | mex_05 == 1 replace Guideline2 = 98 if dhh_age<19 replace Guideline2 = 99 if (mam_037 == 7 | mam_037 == 8 | mam_037==9 | mex_05==9) replace Guideline2 = 99 if (alc_3 == 97 | alc_3 == 98 | alc_3==99 )
format Guideline2 %1.0f lab var Guideline2 "2011 Canada's LRADG Guideline 2" lab define Guideline2 1 "Complies" 2 "Exceeds" 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" lab values Guideline2 Guideline2 *For those wishing to exclude 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" gen Guideline2_ver2= Guideline2 recode Guideline2_ver2 98/99=. generate k = (geodhr4==3541) /* replace varname and geodhr4 with your own health unit info */ svyset [pweight=fwgt], brrweight(bsw*) vce(brr) mse svy, subpop(k): tab Guideline2, per cv ci svy, subpop(k): tab Guideline2_ver2, per cv ci
*********************Meets both Guideline 1 and 2 OR Exceeds Guideline 1 or 2******************* ************************************************************************************************
*Please note: the above code needs to be run in order to the run the code below. *Create Guidelineboth variable gen Guidelineboth = . replace Guidelineboth = 1 if dhh_sex == 1 & alwdwky <= 15 & alw_2a1 <=3 & alw_2a2 <=3 & alw_2a3 <=3 & alw_2a4 <=3 & alw_2a5 <=3 & alw_2a6 <=3 & alw_2a7 <=3 & drinkingdays<=5 & alc_3==1 replace Guidelineboth = 1 if dhh_sex == 2 & alwdwky <= 10 & alw_2a1 <=2 & alw_2a2 <=2 & alw_2a3 <=2 & alw_2a4 <=2 & alw_2a5 <=2 & alw_2a6 <=2 & alw_2a7 <=2 & drinkingdays<=5 & alc_3==1 replace Guidelineboth = 2 if (dhh_sex == 1 & ((alwdwky > 15 & alwdwky<996) | (alw_2a1 >3 & alw_2a1<996) | (alw_2a2 >3 & alw_2a2<996)| (alw_2a3 >3 & alw_2a3<996) | (alw_2a4 >3 & alw_2a4<996) | (alw_2a5 >3 & alw_2a5<996) | (alw_2a6 >3 & alw_2a6<996) | (alw_2a7 >3 & alw_2a7<996) | drinkingdays==6 | drinkingdays==7 | (alc_3>=2 & alc_3<=6) )) replace Guidelineboth = 2 if (dhh_sex == 2 & ((alwdwky > 10 & alwdwky<996) | (alw_2a1 >2 & alw_2a1<996) | (alw_2a2 >2 & alw_2a2<996)| (alw_2a3 >2 & alw_2a3<996) | (alw_2a4 >2 & alw_2a4<996) | (alw_2a5 >2 & alw_2a5<996) | (alw_2a6 >2 & alw_2a6<996) | (alw_2a7 >2 & alw_2a7<996) | drinkingdays==6 | drinkingdays==7 | (alc_3>=2 & alc_3<=6) )) replace Guidelineboth = 1 if alc_1==2 /* not in past year */ replace Guidelineboth = 1 if alw_1==2 & alc_3==1 /* not in past week and no 5+ drinking occasions in the past year*/ replace Guidelineboth = 98 if mam_037 == 1 | mex_05 == 1 replace Guidelineboth = 98 if dhh_age<19 replace Guidelineboth = 99 if (mam_037 == 7 | mam_037 == 8 | mam_037==9 | mex_05==9 | alwdwky == 999 ) replace Guidelineboth = 99 if (alc_1 == 7 | alc_1 ==8 | alc_1 ==9) replace Guidelineboth = 99 if (alw_1 == 7 | alw_1 ==8 | alw_1 ==9) replace Guidelineboth = 99 if (alc_3 == 97 | alc_3 == 98 | alc_3==99 )
format Guidelineboth %1.0f lab var Guidelineboth "2011 Canada's LRADG Guideline- Both" lab define Guidelineboth 1 "Complies with both" 2 "Exceeds at least one guideline" 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" lab values Guidelineboth Guidelineboth *For those wishing to exclude 98 "Not Applicable" 99 "Not Stated, Don't Know or Refusal" gen Guidelineboth_ver2= Guidelineboth recode Guidelineboth_ver2 98/99=. generate k = (geodhr4==3541) /* replace varname and geodhr4 with your own health unit info */ svyset [pweight=fwgt], brrweight(BSW*) vce(brr) mse svy, subpop(k): tab Guidelineboth, per cv ci svy, subpop(k): tab Guidelineboth_ver2, per cv ci |