PROC GLOBAL set explicit; numeric i, imin, imax, itot, itot1, itot2, iage; numeric j, jmax, jtot, jtot1, jtot2, jtot3, jtot4, jmax1, jmax2; numeric rweight, drinks, womelig, xbmi, ybmi, maxhght, maxwght, minhght, minwght; numeric x, cnt, measured, presstake, systolic, diastolic, xline, preg, bfdg; numeric xwaist, whtr, xtemp, consent; alpha(7) codem; array interview(50); crosstab float(0) txxx unweight runday+runmonth+runyear exclude(specval, rowzero, colzero, totals, percents) title( "Tables for chapter adult health, South Africa DHS 2016" ); crosstab float(1) ah1 agead+v131w+v501w+works+v102w+v101w+v106w+v190w+total+tot1549 isex*colt301 exclude(rowzero,colzero,percents,totals,specval) title( "Table AH1 Background characteristics of respondents who completed the adult health module","", "Percent distribution of women and men age 15 and older by selected background", "characteristics, South Africa 2016" ) Stub( " Background characteristic" ); crosstab float(1) ah21 agead1+v131w+hivstat+v102w+v101w+v106w+v190w+total colah2+totnum14 exclude(rowzero,colzero,percents,totals,specval) title( "Table ah2.1 Self-health assessment: Women","", "Percent distribution of women age 15 and older by their self-assessment of their health status,", "according to background characteristics, South Africa DHS 2016" ) Stub( " Background characteristic" ); crosstab float(1) ah21u agead1+v131w+hivstat+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table ah2.1 Self-health assessment: Women (Number of un-weighted cases)" ) Stub( " Background characteristic" ); crosstab float(1) ah22 agead1+v131w+hivstat+v102w+v101w+v106w+v190w+total colah2+totnum14 exclude(rowzero,colzero,percents,totals,specval) title( "Table ah2.2 Self-health assessment: Men","", "Percent distribution of men age 15 and older by their self-assessment of their health status,", "according to background characteristics, South Africa DHS 2016" ) Stub( " Background characteristic" ); crosstab float(1) ah22u agead1+v131w+hivstat+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table ah2.2 Self-health assessment: Men (Number of un-weighted cases)" ) Stub( " Background characteristic" ); crosstab float(1) t309 agead1+v131w+v501w+v102w+v101w+v106w+v190w+total+tot1549 isex*colt309 exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.9 Health insurance coverage","", "Percentage of women and men age 15 and older covered by Medical Aid, a medical benefit scheme,", "a provident scheme or a hospital plan, according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(1) t309u agead1+v131w+v501w+v102w+v101w+v106w+v190w+total+tot1549 isex exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.9.1 Health insurance coverage (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t914 agead+v131w+v218w+v501w2+v741w1+v102w+v101w+v106w+v190w+total+tot1549 colt914 exclude(rowzero,colzero,percents,totals,specval) {+US} title( "Table 9.14 Problems in accessing health care","", "Percentage of women age 15 and older who reported that they have serious problems in accessing", "health care for themselves when they are sick, by type of problem, according to", "background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); {US+} crosstab float(0) t914u agead+v131w+v218w+v501w2+v741w1+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 9.14 Problems in accessing health care (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah3 agead1+v131w+hivstat+insuran+v102w+v101w+v106w+v190w+total isex*colah3 exclude(rowzero,colzero,percents,totals,specval) title( "Table AH3 Outpatient health care services received ","", "Percentage of women and men age 15 and older who have had any visits by a home or community-based", "care giver during the past month, and percentage who have received health, medical, or dental", "care without staying overnight during the past month, according to background characteristics,", "South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah3u agead1+v131w+hivstat+insuran+v102w+v101w+v106w+v190w+total isex exclude(rowzero,colzero,percents,totals,specval) title( "Table AH3 Outpatient health care services received (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah4 agead1+v131w+sex2+insuran+v102w+v101w+v106w+v190w+total colah4a+colah4b+colah4c+numresp exclude(rowzero,colzero,percents,totals,specval) title( "Table AH4 Source of outpatient health care services received","", "Among respondents age 15 and older who have received outpatient health care services during the past month,", "percentage who received care from specific sources, according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah4u agead1+v131w+sex2+insuran+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH4 Source of outpatient health care services received (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah5 agead2+v131w+works+hivstat+insuran+v102w+v101w+v106w+v190w+total colah5+s1408w+s1409w+numwom exclude(rowzero,colzero,percents,totals,specval) title( "Table AH5 Experience with the Pap smear exam","", "Percentage of women age 15 and older who have ever had a Pap smear, and among women who have had a Pap smear,", "the timing of the last Pap smear and percentage who got the results of their last exam, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah5u agead2+v131w+works+hivstat+insuran+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH5 Experience with the Pap smear exam (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah5w v101w+total colah5 exclude(rowzero,colzero,percents,totals,specval) title( "Table AH5 Experience with the Pap smear exam","", "Percentage of women age 30-59 who have ever had a Pap smear,", "according to province, South Africa DHS 2016" ) stub ( "Province" ); crosstab float(1) ah6 rowah6a+rowah6b isex*colah6 exclude(rowzero,colzero,percents,totals,specval) title( "Table AH6 Diagnosis and treatment of various health conditions and diseases","", "Percentage of women and men age 15 and older who have been diagnosed with specific health conditions", "or diseases, and among those diagnosed with each condition, percentage who received treatment at", "the time of diagnosis, South Africa DHS 2016" ) stub ( "Health condition/disease" ); crosstab float(0) ah6u rowah6a+rowah6b isex exclude(rowzero,colzero,percents,totals,specval) title( "Table AH6 Diagnosis and treatment of various health conditions and diseases (Number of un-weighted cases)" ) stub ( "Health condition/disease" ); crosstab float(1) ah8 agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total colah8a+colah8b exclude(rowzero,colzero,percents,totals,specval) title( "Table AH8 Prescribed medications","", "Percentage of respondents age 15 and older who report taking prescribed medications regularly,", "and among women and men who are taking prescribed medications, the number of medications taken,", "according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah8u agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH8 Prescribed medications (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah9 agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total colah9a+colah9b exclude(rowzero,colzero,percents,totals,specval) title( "Table AH9 Payment of prescribed medications","", "Among respondents age 15 and older who use prescribed medications regularly, the source of", "payment for most medications, and among women whose medications are paid for by a public clinic", "or hospital, percentage sent away from the clinic in the past 12 months because a medication was", "not in stock, according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah9u agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH9 Payment of prescribed medications (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah10 agead1+v131w+sex2+insuran+works+v102w+v101w+v106w+v190w+total colah10a+colah10b exclude(rowzero,colzero,percents,totals,specval) title( "Table AH10 Experience with pain","", "Percentage of respondents age 15 and older who experience pain or discomfort all of the time or", "on and off, percentage who have had pain for more than 3 months, and among those who have had pain", "for more than 3 months, percentage who report specific places they experience pain, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah10u agead1+v131w+sex2+insuran+works+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH10 Experience with pain (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah11 agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total colah11a+colah11b+colah11c exclude(rowzero,colzero,percents,totals,specval) title( "Table AH11 Experience with tooth or mouth pain","", "Percentage of respondents age 15 and older whose teeth or mouth caused pain or discomfort in the", "past 12 months, and among those who experienced tooth or mouth pain, percentage who got treatment", "the last time they had the problem; and among those who have had pain or discomfort in their teeth", "and mouth and got treatment, percentage who report specific persons they saw for treatment,", "according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah11u agead1+v131w+sex2+works+insuran+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH11 Experience with tooth or mouth pain (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah11w s1449w+totnum14 isex*colah11w exclude(rowzero,colzero,percents,totals,specval) title( "Table AH11W Main reason treatment for teeth/mouth was not sought [Working table]","", "Among women and men age 15 and older who experienced pain in their teeth or mouth in the past 12 months", "but did not seek treatment, percentage who cited specific reasons for not seeking treatment, South Africa DHS 2016" ) stub ( "Reason treatment not sought" ); crosstab float(1) p331 agead+v131w+v102w+v101w+v106w+v190w+total colp33wa+colp33wb exclude(rowzero,colzero,percents,totals,specval) title( "Table 33.1 Use and abuse of codeine-containing medications: Women","", "Percentage of women age 15 and older who used codeine-containing medications in the past 12 months,", "percentage who used codeine-containing medications in the past 12 months for the experience or feeling", "rather than its medicinal effect, and among women who used codeine-containing medications in the past", "12 months for the experience or feeling rather than its medicinal effect, percentage who received", "treatment for problems related to their use for non-medical purposes, according to background characteristics,", "South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) p331u agead+v131w+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table 33.1 Use and abuse of codeine-containing medications: Women (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) p332 agead+v131w+v102w+v101w+v106w+v190w+total colp33ma+colp33mb exclude(rowzero,colzero,percents,totals,specval) title( "Table 33.2 Use and abuse of codeine-containing medications: Men","", "Percentage of men age 15 and older who used codeine-containing medications in the past 12 months,", "percentage who used codeine-containing medications in the past 12 months for the experience or feeling", "rather than its medicinal effect, and among men who used codeine-containing medications in the past", "12 months for the experience or feeling rather than its medicinal effect, percentage who received", "treatment for problems related to their use for non-medical purposes, according to background characteristics,", "South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) p332u agead+v131w+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table 33.2 Use and abuse of codeine-containing medications: Men (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t3101 agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 tobacco+v463aw+totsmoke+numwom exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.10.1 Tobacco smoking: Women","", "Percentage of women age 15 and older who smoke various tobacco products, percent distribution of women", "by smoking frequency, and percentage who smoke daily or occasionally, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) t3101u agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.10.1 Tobacco smoking: Women (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t3102 agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 tobacco+v463aw+totsmoke+numman exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.10.2 Tobacco smoking: Men","", "Percentage of men age 15 and older who smoke various tobacco products, percent distribution of men", "by smoking frequency, and percentage who smoke daily or occasionally, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) t3102u agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.10.2 Tobacco smoking: Men (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t3111 agead+v131w+v102w+v190w+total+tot1549 v464w1+totnum8 exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.11.1 Average number of cigarettes smoked daily: Women","", "Among women age 15 and older who smoke cigarettes daily, percent distribution by average", "number of cigarettes smoked per day, according to background characteristics,", "South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) t3111u agead+v131w+v102w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.11.1 Average number of cigarettes smoked daily: Men (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t3112 agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 v464w+totnum8 exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.11.2 Average number of cigarettes smoked daily: Men","", "Among men age 15 and older who smoke cigarettes daily, percent distribution by average", "number of cigarettes smoked per day, according to background characteristics,", "South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) t3112u agead+v131w+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.11.2 Average number of cigarettes smoked daily: Men (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t312 rowt312+tnumber isex exclude(rowzero,colzero,percents,totals,specval) title( "Table 3.12 Smokeless tobacco use and any tobacco use","", "Percentage of women and men age 15 and older who currently use smokeless tobacco, according to type", "of tobacco product, and percentage who use any type of tobacco, South Africa DHS 2016" ) crosstab float(1) ah12 age5+s413ew+v102w+v101w+v106w+v190w+tot1549 s1217w+s1219w+numwom exclude(rowzero,colzero,percents,totals,specval) title( "Table AH12 Tobacco use during pregnancy","", "Among women age 15-49 who had a live birth in the past 5 years, percentage who reported that they", "smoked tobacco during their most recent pregnancy, and percentage who reported they used smokeless", "tobacco during their most recent pregnancy, by frequency of use, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah12u age5+s413ew+v102w+v101w+v106w+v190w+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH12 Tobacco use during pregnancy Men (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah14 agead+v131w+v102w+v101w+v106w+v190w+total isex*(s1223w+tnumber) exclude(rowzero,colzero,percents,totals,specval) title( "Table AH14 E-cigarette use","", "Percentage of women and men age 15 and older who use e-cigarettes by frequency of use,", "according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah14u agead+v131w+v102w+v101w+v106w+v190w+total isex exclude(rowzero,colzero,percents,totals,specval) title( "Table AH14 E-cigarette use (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) p321 agead+v131w+works+v102w+v101w+v106w+v190w+total colp32+numwom exclude(rowzero,colzero,percents,totals,specval) title( "Table 32.1 Alcohol consumption and risky drinking: Women","", "Percentage of women age 15 and older who ever drank alcohol, who drank alcohol in the past 12 months,", "who drank alcohol in the past 7 days, who drank 5 or more drinks on at least one occasion in the past", "30 days, and who show signs of problem drinking as assessed by the CAGE test, according to background", "characteristics, South Africa 2016" ) Stub( " Background characteristic" ); crosstab float(0) p321u agead+v131w+works+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table 32.1 Alcohol consumption and risky drinking: Women unweighted)","" ) Stub( " Background characteristic" ); crosstab float(1) p322 agead+v131w+works+v102w+v101w+v106w+v190w+total colp32+numman exclude(rowzero,colzero,percents,totals,specval) title( "Table 32.2 Alcohol consumption and risky drinking: Men","", "Percentage of men age 15 and older who ever drank alcohol, who drank alcohol in the past 12 months,", "who drank alcohol in the past 7 days, who drank 5 or more drinks on at least one occasion in the past", "30 days, and who show signs of problem drinking as assessed by the CAGE test, according to background", "characteristics, South Africa 2016" ) Stub( " Background characteristic" ); crosstab float(0) p322u agead+v131w+works+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table 32.2 Alcohol consumption and risky drinking: Men unweighted)","" ) Stub( " Background characteristic" ); crosstab float(1) ah15 age5+s413dw+v102w+v101w+v106w+v190w+tot1549 s1236w+numwom exclude(rowzero,colzero,percents,totals,specval) title( "Table AH15 Alcohol consumption during pregnancy", "", "Percentage of women age 15-49 who had a live birth in the past 5 years who reported that they drank", "alcohol every day, some days, or not at all during the pregnancy of their last birth,", "according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah15u age5+s413dw+v102w+v101w+v106w+v190w+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH15 Alcohol consumption during pregnancy (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) p35w agead1+v131w+v102w+v101w+v106w+v190w+total isex*colp35w exclude(colzero,rowzero,percents,totals,specval) title( "Table 35W Coverage of blood pressure measurement among women and men (WORKING)","", "Percentage of eligible women and men age 15 and older who were measured for blood", "pressure, according to background characteristics (unweighted), South Africa 2016" ) stub( "Background characteristic" ); crosstab float(1) p351 agead1+v131w+works+v102w+v101w+v106w+v190w+total colp35a+colp35b+colp35c exclude(colzero,rowzero,percents,totals,specval) title( "Table 35.1 Blood pressure status: Women","", "Among women age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, percentage", "with hypertension controlled, and average systolic and diastolic blood pressure,", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) p351u agead1+v131w+works+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table 35.1 Blood pressure status: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) p352 agead1+v131w+works+v102w+v101w+v106w+v190w+total colp35a+colp35b+colp35c exclude(colzero,rowzero,percents,totals,specval) title( "Table 35.2 Blood pressure status: Men","", "Among men age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, percentage", "with hypertension controlled, and average systolic and diastolic blood pressure,", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) p352u agead1+v131w+works+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table 35.2 Blood pressure status: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ahbp21 tobacad+alcohol+s1306w+s223w+bmiad+total colp35a+colp35b+colp35c exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP2.1 Blood pressure status by health status measures: Women","", "Among women age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, and", "percentage with hypertension controlled, according to health status measures, South Africa DHS 2016" ) stub( "Health status measures" ); crosstab float(0) ahbp21u tobacad+alcohol+s1306w+s223w+bmiad+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP2.1 Blood pressure status by health status measures: Women (Number of un-weighted cases)" ) stub( "Health status measures" ); crosstab float(1) ahbp22 tobacad+alcohol+s1306w+s223w+bmiad+total colp35a+colp35b+colp35c exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP2.2 Blood pressure status by health status measures: Men","", "Among men age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, and", "percentage with hypertension controlled, according to health status measures, South Africa DHS 2016" ) stub( "Health status measures" ); crosstab float(0) ahbp22u tobacad+alcohol+s1306w+s223w+bmiad+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP2.2 Blood pressure status by health status measures: Men (Number of un-weighted cases)" ) stub( "Health status measures" ); crosstab float(1) ahbp31 agead1+v131w+v102w+v101w+v106w+v190w+total colhbp31 exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP3.1 Blood pressure status and treatment: Women","", "Among women age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, and average", "systolic and diastolic blood pressure, according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(1) ahbp31u agead1+v131w+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP3.1 Blood pressure status and treatment: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ahbp32 agead1+v131w+v102w+v101w+v106w+v190w+total colhbp31 exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP3.2 Blood pressure status and treatment: Women","", "Among men age 15 and older, prevalence of hypertension, percent distribution of blood", "pressure values, percentage having normal blood pressure and taking medication, and average", "systolic and diastolic blood pressure, according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(1) ahbp32u agead1+v131w+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AHBP3.2 Blood pressure status and treatment: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah16x agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total s1304w+s1305w+s1306w1+s1307w+numresp exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16X Consumption of fried and processed foods","", "Percentage of respondents age 15 and older who consume fried foods, fast-foods, salty snacks, or processed meats", "every day or at least once a week, according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah16xu agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16X Consumption of fried and processed foods (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah16xw agead1+v131w+sex2+v102w+v101w+v106w+v190w+total s1304w2+total+s1305w2+total+s1306w2+total+s1307w2+total+numresp exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16XW Frequency of eating (WORKING)","", "Percentage distribution of respondents age 15 year and older by frequency of eating fried foods,", "fast foods, crisps and salty snacks and processed meat according to background characteristics,", "South Africa 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah16xwu agead1+v131w+sex2+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16XW Frequency of eating (WORKING) (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah16 agead1+v131w+sex2+s1306w2+bloodp+v102w+v101w+v106w+v190w+total s1308w+numresp exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16 Approach to salt consumption","", "Percentage of respondents age 15 and older who are not interested in lowering their salt consumption,", "percentage who are interested in lowering their salt consumption in the next 6 months, percentage who", "are interested in lowering their salt consumption in the next month, percentage who started lowering", "their salt consumption in the last 6 months, and percentage who have already lowered their salt", "consumption for longer than 6 months, according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah16u agead1+v131w+sex2+s1306w2+bloodp+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16 Approach to salt consumption (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah16b agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total colah16b exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16B Consumption of fruit and vegetables ","", "Percentage of respondents age 15 and older by type of foods consumed the day or night before the survey,", "according to background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah16bu agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16B Consumption of fruit and vegetables (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) ah16c agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total s1311w1+s1311w2+s1312w1+s1312w2 exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16C Consumption of sugar-sweetened beverage and fruit juice ","", "Percentage of respondents age 15 and older who drank any sugar-sweetened beverage (SSB) the day", "preceding the survey, and among respondents who drank any SSB, the average quantity consumed;", "and percentage of respondents who drank any fruit juice the day preceding the survey, and among", "respondents who drank fruit juice the average quantity consumed, according to", "background characteristics, South Africa DHS 2016" ) stub ( "Background characteristic" ); crosstab float(0) ah16cu agead+v131w+sex2+works+bmiad+v102w+v101w+v106w+v190w+total coltotu exclude(rowzero,colzero,percents,totals,specval) title( "Table AH16C Consumption of sugar-sweetened beverage and fruit juice (Number of un-weighted cases)" ) stub ( "Background characteristic" ); crosstab float(1) t11121 agead+v131w+s1203w+waistw+v102w+v101w+v106w+v190w+total+tot1549 col1112a+col1112b exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.1 Nutritional status of women","", "Among women age 15 and older, percentage with height under 145 cm, mean ", "Body Mass Index (BMI), and percentage with specific BMI levels, ", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) t11121u agead+v131w+s1203w+waistw+v102w+v101w+v106w+v190w+total+tot1549 coltotu exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.1 Nutritional status of women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t11122 agead+v131w+s1203w+waistm+v102w+v101w+v106w+v190w+total+tot1549 col1112c exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.2 Nutritional status of men","", "Among men age 15 and older, mean Body Mass Index (BMI),", "and the percentage with specific BMI levels, ", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) t11122u agead+v131w+s1203w+waistm+v102w+v101w+v106w+v190w+total+tot1549 total exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.2 Nutritional status of men (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t11123 agead+v131w+s1203w+waistb+v102w+v101w+v106w+v190w+total+tot1549 isex*bmi35 exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.3 Women and men with BMI >= 35","", "Percentage of women and men age 15 and older with a body mass index (BMI) >= 35,", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) t11123u agead+v131w+s1203w+waistb+v102w+v101w+v106w+v190w+total+tot1549 isex exclude(colzero,rowzero,percents,totals,specval) title( "Table 11.12.3 Women and men with BMI >= 35 (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah171 agead1+v131w+s1203w+v102w+v101w+v106w+v190w+total colah17a+colah17b exclude(colzero,rowzero,percents,totals,specval) title( "Table AH17.1 Waist circumference: Women","", "Among women age 15 and older, mean waist circumference, percentage with a waist circumference", "less than 80 centimetres (cm), percentage with waist circumference between 84 cm and 88 cm,", "percentage with waist circumference greater than or equal to 88 cm, mean waist-to-height ratio,", "and precentage with a waist-to-height ratio greater than or equal to 0.50,", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah171u agead1+v131w+s1203w+v102w+v101w+v106w+v190w+total coltotu exclude(colzero,rowzero,percents,totals,specval) title( "Table AH17.1 Waist circumference: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah172 agead1+v131w+s1203w+v102w+v101w+v106w+v190w+total colah17c+colah17b exclude(colzero,rowzero,percents,totals,specval) title( "Table AH17.2 Waist circumference: Men","", "Among men age 15 and older, mean waist circumference, percentage with a waist circumference", "less than 94 centimetres (cm), percentage with waist circumference between 94 cm and 102 cm,", "percentage with waist circumference greater than or equal to 102 cm, mean waist-to-height ratio,", "and percentage with a waist-to-height ratio greater than or equal to 0.50,", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah172u agead1+v131w+s1203w+v102w+v101w+v106w+v190w+total coltotu exclude(colzero,rowzero,percents,totals,specval) title( "Table AH17.2 Waist circumference: Men (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t11131 agead+v131w+parity+pregbf1+smokes+v102w+v101w+v106w+v190w+total+tot1549 anemiaw exclude(rowzero,colzero,percents,totals,specval) title( "Table 11.13.1 Prevalence of anaemia in women"," ", "Percentage of women age 15-49 with anaemia, according to ", "background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) t11131u agead+v131w+parity+pregbf1+smokes+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 11.13.1 Prevalence of anaemia in women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t11132 agead+v131w+smokes+v102w+v101w+v106w+v190w+total+tot1549 anemiam exclude(rowzero,colzero,percents,totals,specval) title( "Table 11.13.2 Prevalence of anaemia in men"," ", "Percentage of men age 15-49 with anaemia, according to ", "background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(1) t11132u agead+v131w+smokes+v102w+v101w+v106w+v190w+total+tot1549 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 11.13.2 Prevalence of anaemia in men (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah18 v131w+v102w+v101w+total hba1cra*hba1crb+totnum1 isex exclude(rowzero,colzero,percents,totals,specval) title( "Table AH.18 Coverage of HbA1c testing by population group, residence, and province"," ", "Percent distribution of women and men age 15 and older eligible for HbA1c by testing status,", "according to population group, residence, and province (unweighted), South Africa DHS 2016" ) stub( "Residence and province" ); crosstab float(1) ah191a agead1+v213w+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total colah19b+numwom exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.1.a: Glycated haemoglobin levels by background characteristics: Women(adjusted)", "", "Percentage of women age 15 and older by glycated haemoglobin level (HbA1c),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah191au agead1+v213w+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.1.a: Glycated haemoglobin levels by background characteristics: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah191b agead1+v213w+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total colah19b+numwom exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.1.a: Glycated haemoglobin levels by background characteristics: Women(un-adjusted)", "", "Percentage of women age 15 and older by glycated haemoglobin level (HbA1c),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(1) ah192a agead1+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total colah19b+numman exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.2.a: Glycated haemoglobin levels by background characteristics: Men (adjusted)", "", "Percentage of men age 15 and older by glycated haemoglobin level (HbA1c),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah192au agead1+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.2.a: Glycated haemoglobin levels by background characteristics: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah192b agead1+hivstat+anemias+bmiad+diabet+diabmed+v131w+v102w+v101w+v106w+v190w+total colah19b+numman exclude(colzero,rowzero,percents,totals,specval) title( "Table AH19.2.a: Glycated haemoglobin levels by background characteristics: Men (un-adjusted)", "", "Percentage of men age 15 and older by glycated haemoglobin level (HbA1c),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(1) ah201 agead1+v131w+v463aw+v102w+v101w+v106w+v190w+total colah20 exclude(colzero,rowzero,percents,totals,specval) title( "Table AH20.1: Asthma and chronic obstructive pulmonary disease symptoms: Women","", "Percentage of women age 15 and older with shortness of breath compared to others their age,", "with wheezing and shortness of breath in the past 12 months, who have woken with breathing difficulties", "and/or coughing in the past 12 months, and who have symptoms of chronic obstructive pulmonary diseases (COPD),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah201u agead1+v131w+v463aw+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AH20.1: Asthma and chronic obstructive pulmonary disease symptoms: Women (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah202 agead1+v131w+v463aw+v102w+v101w+v106w+v190w+total colah20 exclude(colzero,rowzero,percents,totals,specval) title( "Table AH20.2: Asthma and chronic obstructive pulmonary disease symptoms: Men","", "Percentage of men age 15 and older with shortness of breath compared to others their age,", "with wheezing and shortness of breath in the past 12 months, who have woken with breathing difficulties", "and/or coughing in the past 12 months, and who have symptoms of chronic obstructive pulmonary diseases (COPD),", "according to background characteristics, South Africa DHS 2016" ) stub( "Background characteristic" ); crosstab float(0) ah202u agead1+v131w+v463aw+v102w+v101w+v106w+v190w+total total exclude(colzero,rowzero,percents,totals,specval) title( "Table AH20.2: Asthma and chronic obstructive pulmonary disease symptoms: Men (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) ah20w isex+total colah20w exclude(colzero,rowzero,percents,totals,specval) title( "AH20W Mean duration of COPD symptoms","", "Among women and men age 15+ with COPD symptoms, mean duration of symptoms, South Africa DHS 2016" ) stub( "Sex" ); crosstab float(0) ah20wu isex+total total exclude(colzero,rowzero,percents,totals,specval) title( "AH20W Mean duration of COPD symptoms (Number of un-weighted cases)" ) stub( "Sex" ); crosstab float(0) ah21m rowah21 isex*colah21+colah21 exclude(colzero,rowzero,percents,totals,specval) title( "Table AH21 Use of prescribed medication for common chronic conditions","", "The number and percentage of men and women using prescribed medication regularly and the number", "and percentage of all regularly used prescribed medications for tuberculosis, asthma, chronic", "bronchitis, diabetes, hyperlipidaemia, hypertension, atherosclerosis or stroke-related conditions,", "arthritis, osteoporosis and epilepsy using Anatomical Therapeutic Chemical Classification (ATC) codes,", "South Africa DHS 2016" ) stub( "Chronic condition" ); function tallyah6( inrow, condition, treatment ) if condition = 1 then cnt = cnt + 1; rowah6a = inrow; colah6 = 1; xtab( ah6, rweight ); colah6 = 3; xtab( ah6, rweight ); xtab( ah6u ); if treatment = 1 then colah6 = 2; xtab( ah6, rweight ); endif; endif; end; { check if a medicin exists in any of the 12 medication fileds for women } function MedWomen( medneeded ) numeric taken = 0, k; do k = 1 while k <= 12 codem = ""; box k => codem; 1 => SH277A; 2 => SH277B; 3 => SH277C; 4 => SH277D; 5 => SH277E; 6 => SH277F; 7 => SH277G; 8 => SH277H; 9 => SH277I; 10 => SH277J; 11 => SH277K; 12 => SH277L; endbox; if length( strip(codem) ) then MEDICIN = codem; if loadcase( MEDICINES, MEDICIN ) & MCODE = medneeded then taken = 1; break; endif; endif; enddo; MedWomen = taken; end; { check if a medicin exists in any of the 12 medication fileds for women } function MedMen( medneeded ) numeric taken = 0, k; do k = 1 while k <= 12 codem = ""; box k => codem; 1 => SH377A; 2 => SH377B; 3 => SH377C; 4 => SH377D; 5 => SH377E; 6 => SH377F; 7 => SH377G; 8 => SH377H; 9 => SH377I; 10 => SH377J; 11 => SH377K; 12 => SH377L; endbox; if length( strip(codem) ) then MEDICIN = codem; if loadcase( MEDICINES, MEDICIN ) & MCODE = medneeded then taken = 1; break; endif; endif; enddo; MedMen = taken; end; { to define if a type of tobacco was used } function tobaccouse( xvar ) numeric numsmoke = 0; if xvar in 1:888 then numsmoke = xvar; endif; tobaccouse = numsmoke; end; { number of cigarretes smoked daily } function cigaretdaily( xvar ) numeric numsmoke = 0; if xvar in 1:800 then numsmoke = xvar; endif; cigaretdaily = numsmoke; end; { Recodes NA to zero } function NAtoZero( ynvar ); if ynvar = notappl then ynvar = 0 endif; NAtoZero = ynvar end { valid blood pressure } function ValidPressure( syst, diast ); numeric z = 0; if !syst in 994:999,notappl & !diast in 994:999,notappl then z = 1 endif; ValidPressure = z; end { blood pressure classificication } function ClassifyPressure( syst, diast ) numeric z; box syst : diast => z; 0-119 : <80 => 1; 0-119 : 80-84 => 2; 0-119 : 85-89 => 3; 0-119 : 90-99 => 4; 0-119 : 100-109 => 5; 0-119 : => 6; 120-129 : <85 => 2; 120-129 : 85-89 => 3; 120-129 : 90-99 => 4; 120-129 : 100-109 => 5; 120-129 : => 6; 130-139 : <90 => 3; 130-139 : 90-99 => 4; 130-139 : 100-109 => 5; 130-139 : => 6; 140-159 : <100 => 4; 140-159 : 100-109 => 5; 140-159 : => 6; 160-179 : <110 => 5; 160-179 : => 6; >=180 : => 6; : => 7; endbox; ClassifyPressure = z; end PROC RECODE7_FF preproc total = 0; numwom = 1; numman = 1; tnumber = 1; totnum2 = 1; totnum5 = 1; totnum8 = 1; totnum14 = 1; totnum1 = 1; unweight = ( sysparm()[1:1] = "U" ); { 0-Weighted, 1-unweighted } maxhght = 2200; { maximum height 220 cms } maxwght = 2000; { maximum weight 200 Kgs } minhght = 1300; { minimum height 130 cms } minwght = 350; { minimum weight 35 Kgs } postproc { constructs table to determine whether run is weighted/unweighted } txxx(unweight,0) = sysdate( "dd" ); { day } txxx(unweight,1) = sysdate( "mm" ); { month } txxx(unweight,2) = sysdate( "yyyy" ); { year } { Table ah.1 processing } iage = tblrow( ah1, agead = 1 ); ah1[iage,*] = ah1[iage+1,*] + ah1[iage+2,*]; itot1 = tblrow( ah1, total ); jmax1 = tblcol( ah1, isex = 1 colt301 = 1 ); jmax2 = tblcol( ah1, isex = 2 colt301 = 1 ); do i = 0 while i <= itot1 ah1[i,jmax1] = ah1[i,jmax1+1] * 100 / ah1[itot1,jmax1+1]; ah1[i,jmax2] = ah1[i,jmax2+1] * 100 / ah1[itot1,jmax2+1]; enddo; { Table ah.2.1 processing } jtot1 = tblcol( ah21 ); jmax = jtot1 - 2; do j = 0 while j <= jmax ah21[*,j] = ah21[*,j] * 100 / ah21[*,jtot1]; enddo; ah21[*,jmax+1] = tblsum( column ah21[*,0:jmax] ); { check unweighted N's } Col2Dim( "ah21", ah21, 0, jtot1-1, ah21u, 0 ); { Table ah.2.2 processing } jtot1 = tblcol( ah22 ); jmax = jtot1 - 2; do j = 0 while j <= jmax ah22[*,j] = ah22[*,j] * 100 / ah22[*,jtot1]; enddo; ah22[*,jmax+1] = tblsum( column ah22[*,0:jmax] ); { check unweighted N's } Col2Dim( "ah22", ah22, 0, jtot1-1, ah22u, 0 ); { Table 3.9 processing } jtot1 = tblcol( t309, isex = 1 colt309 ); jmax = jtot1 - 1; do j = 0 while j <= jmax t309[*,j] = t309[*,j] * 100 / t309[*,jtot1]; enddo; jtot2 = tblcol( t309 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax t309[*,j] = t309[*,j] * 100 / t309[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "t309", t309, 0, jtot1-1, t309u, 0 ); Col2Dim( "t309", t309, jtot1+1, jtot2-1, t309u, 1 ); { Table 9.14 processing } iage = tblrow( t914, agead = 1 ); t914[iage,*] = t914[iage+1,*] + t914[iage+2,*]; jtot = tblcol( t914 ); jmax = jtot - 1; do j = 0 while j <= jmax t914[*,j] = t914[*,j] * 100 / t914[*,jtot]; enddo; { check unweighted N's } t914u[iage,*] = t914u[iage+1,*] + t914u[iage+2,*]; Col2Dim( "t914", t914, 0, jtot-1, t914u, 0 ); { Table ah.3 processing } jtot1 = tblcol( ah3, isex = 1 colah3 ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah3[*,j] = ah3[*,j] * 100 / ah3[*,jtot1]; enddo; jtot2 = tblcol( ah3 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah3[*,j] = ah3[*,j] * 100 / ah3[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah3", ah3, 0, jtot1-1, ah3u, 0 ); Col2Dim( "ah3", ah3, jtot1+1, jtot2-1, ah3u, 1 ); { Table ah.4 processing } jtot = tblcol( ah4 ); jmax = jtot - 1; do j = 0 while j <= jmax ah4[*,j] = ah4[*,j] * 100 / ah4[*,jtot]; enddo; { check unweighted N's } Col2Dim( "ah4", ah4, 0, jtot-1, ah4u, 0 ); { Table ah.5 processing } jtot1 = tblcol( ah5, colah5 ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah5[*,j] = ah5[*,j] * 100 / ah5[*,jtot1]; enddo; jtot2 = tblcol( ah5 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah5[*,j] = ah5[*,j] * 100 / ah5[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah5", ah5, 0, jtot1-1, ah5u, 0 ); Col2Dim( "ah5", ah5, jtot1+1, jtot2-1, ah5u, 1 ); { Table ah.5.w processing } jtot1 = tblcol( ah5w ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah5w[*,j] = ah5w[*,j] * 100 / ah5w[*,jtot1]; enddo; { Table ah.6 processing } jtot1 = tblcol( ah6, isex = 1 colah6 ); ah6[*,jtot1-1] = ah6[*,jtot1-1] * 100 / ah6[*,jtot1]; jtot2 = tblcol( ah6, isex = 2 colah6 ); ah6[*,jtot2-1] = ah6[*,jtot2-1] * 100 / ah6[*,jtot2]; itot = tblrow( ah6 ); do i = 0 while i < itot ah6[i,0] = ah6[i,0] * 100 / ah6[itot,0]; ah6[i,3] = ah6[i,3] * 100 / ah6[itot,3]; enddo; { check unweighted N's } Col2Dim( "ah6", ah6, 1, jtot1-1, ah6u, 0 ); Col2Dim( "ah6", ah6, jtot1+2, jtot2-1, ah6u, 1 ); { Assigning NA to selected cells } ah6[itot-1:itot,1:2] = NAcells; { for age 18-24 } ah6[itot-1:itot,4:5] = NAcells; { for age 18-24 } { Table ah.8 processing } jtot1 = tblcol( ah8, colah8a ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah8[*,j] = ah8[*,j] * 100 / ah8[*,jtot1]; enddo; jtot2 = tblcol( ah8 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah8[*,j] = ah8[*,j] * 100 / ah8[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah8", ah8, 0, jtot1-1, ah8u, 0 ); Col2Dim( "ah8", ah8, jtot1+1, jtot2-1, ah8u, 1 ); { Table ah.9 processing } jtot1 = tblcol( ah9, colah9a ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah9[*,j] = ah9[*,j] * 100 / ah9[*,jtot1]; enddo; jtot2 = tblcol( ah9 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah9[*,j] = ah9[*,j] * 100 / ah9[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah9", ah9, 0, jtot1-1, ah9u, 0 ); Col2Dim( "ah9", ah9, jtot1+1, jtot2-1, ah9u, 1 ); { Table ah.10 processing } jtot1 = tblcol( ah10, colah10a ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah10[*,j] = ah10[*,j] * 100 / ah10[*,jtot1]; enddo; jtot2 = tblcol( ah10 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah10[*,j] = ah10[*,j] * 100 / ah10[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah10", ah10, 0, jtot1-1, ah10u, 0 ); Col2Dim( "ah10", ah10, jtot1+1, jtot2-1, ah10u, 1 ); { Table ah.11 processing } jtot1 = tblcol( ah11, colah11a ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah11[*,j] = ah11[*,j] * 100 / ah11[*,jtot1]; enddo; jtot2 = tblcol( ah11, colah11b ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah11[*,j] = ah11[*,j] * 100 / ah11[*,jtot2]; enddo; jtot3 = tblcol( ah11 ); jmax = jtot3 - 1; do j = jtot2+1 while j <= jmax ah11[*,j] = ah11[*,j] * 100 / ah11[*,jtot3]; enddo; { check unweighted N's } Col2Dim( "ah11", ah11, 0, jtot1-1, ah11u, 0 ); Col2Dim( "ah11", ah11, jtot1+1, jtot2-1, ah11u, 1 ); Col2Dim( "ah11", ah11, jtot2+1, jtot3-1, ah11u, 2 ); itot = tblrow( ah11w ); imax = itot - 2; do i = 0 while i <= imax ah11w[i,*] = ah11w[i,*] * 100 / ah11w[itot,*]; enddo; ah11w[imax+1,*] = tblsum( row ah11w[0:imax,*] ); { Table p.33.1 processing } iage = tblrow( p331, agead = 1 ); p331[iage,*] = p331[iage+1,*] + p331[iage+2,*]; jtot1 = tblcol( p331, colp33wa ); jmax = jtot1 - 1; do j = 0 while j <= jmax p331[*,j] = p331[*,j] * 100 / p331[*,jtot1]; enddo; jtot2 = tblcol( p331 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax p331[*,j] = p331[*,j] * 100 / p331[*,jtot2]; enddo; { check unweighted N's } p331u[iage,*] = p331u[iage+1,*] + p331u[iage+2,*]; Col2Dim( "p331", p331, 0, jtot1-1, p331u, 0 ); Col2Dim( "p331", p331, jtot1+1, jtot2-1, p331u, 1 ); { Table p.33.2 processing } iage = tblrow( p332, agead = 1 ); p332[iage,*] = p332[iage+1,*] + p332[iage+2,*]; jtot1 = tblcol( p332, colp33ma ); jmax = jtot1 - 1; do j = 0 while j <= jmax p332[*,j] = p332[*,j] * 100 / p332[*,jtot1]; enddo; jtot2 = tblcol( p332 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax p332[*,j] = p332[*,j] * 100 / p332[*,jtot2]; enddo; { check unweighted N's } p332u[iage,*] = p332u[iage+1,*] + p332u[iage+2,*]; Col2Dim( "p332", p332, 0, jtot1-1, p332u, 0 ); Col2Dim( "p332", p332, jtot1+1, jtot2-1, p332u, 1 ); { Table 3.10.1 processing } iage = tblrow( t3101, agead = 1 ); t3101[iage,*] = t3101[iage+1,*] + t3101[iage+2,*]; jtot = tblcol( t3101 ); jmax = jtot - 3; do j = 0 while j <= jmax t3101[*,j] = t3101[*,j] * 100 / t3101[*,jtot]; enddo; jtot1 = tblcol( t3101, tobacco ); t3101[*,jmax+1] = tblsum( column t3101[*,jtot1+1:jmax] ); { smoke daily/occasionally } t3101[*,jmax+2] = t3101[*,jtot1+1] + t3101[*,jtot1+2]; { check unweighted N's } t3101u[iage,*] = t3101u[iage+1,*] + t3101u[iage+2,*]; Col2Dim( "t3101", t3101, 0, jtot-1, t3101u, 0 ); { Table 3.10.2 processing } iage = tblrow( t3102, agead = 1 ); t3102[iage,*] = t3102[iage+1,*] + t3102[iage+2,*]; jtot = tblcol( t3102 ); jmax = jtot - 3; do j = 0 while j <= jmax t3102[*,j] = t3102[*,j] * 100 / t3102[*,jtot]; enddo; jtot1 = tblcol( t3102, tobacco ); t3102[*,jmax+1] = tblsum( column t3102[*,jtot1+1:jmax] ); { smoke daily/occasionally } t3102[*,jmax+2] = t3102[*,jtot1+1] + t3102[*,jtot1+2]; { check unweighted N's } t3102u[iage,*] = t3102u[iage+1,*] + t3102u[iage+2,*]; Col2Dim( "t3102", t3102, 0, jtot-1, t3102u, 0 ); { all men panel } { write out SDG indicators } { note that this SDG comes from tables 3.10.1 & 3.10.2 } itot = tblrow( t3101 ); jtot = tblcol( t3101, tobacco ); x = (t3101(itot,jtot)+t3102(itot,jtot))/2; SDGIndicator( "3.a.1", t3102(itot,jtot), t3101(itot,jtot), x ); { Table 3.11.2 processing } iage = tblrow( t3111, agead = 1 ); t3111[iage,*] = t3111[iage+1,*] + t3111[iage+2,*]; jtot = tblcol( t3111 ); jmax = jtot - 2; do j = 0 while j <= jmax t3111[*,j] = t3111[*,j] * 100 / t3111[*,jtot]; enddo; t3111[*,jmax+1] = tblsum( column t3111[*,0:jmax] ); { check unweighted N's } t3111u[iage,*] = t3111u[iage+1,*] + t3111u[iage+2,*]; Col2Dim( "t3111", t3111, 0, jtot-1, t3111u, 0 ); { all men panel } { Table 3.11.2 processing } iage = tblrow( t3112, agead = 1 ); t3112[iage,*] = t3112[iage+1,*] + t3112[iage+2,*]; jtot = tblcol( t3112 ); jmax = jtot - 2; do j = 0 while j <= jmax t3112[*,j] = t3112[*,j] * 100 / t3112[*,jtot]; enddo; t3112[*,jmax+1] = tblsum( column t3112[*,0:jmax] ); { check unweighted N's } t3112u[iage,*] = t3112u[iage+1,*] + t3112u[iage+2,*]; Col2Dim( "t3112", t3112, 0, jtot-1, t3112u, 0 ); { all men panel } { Table 3.12 processing } itot = tblrow( t312 ); imax = itot - 1; do i = 0 while i <= imax t312[i,*] = t312[i,*] * 100 / t312[itot,*]; enddo; { Table ah.12 processing } jtot = tblcol( ah12 ); jmax = jtot - 1; do j = 0 while j <= jmax ah12[*,j] = ah12[*,j] * 100 / ah12[*,jtot]; enddo; { check unweighted N's } Col2Dim( "ah12", ah12, 0, jtot-1, ah12u, 0 ); { Table ah.14 processing } iage = tblrow( ah14, agead = 1 ); ah14[iage,*] = ah14[iage+1,*] + ah14[iage+2,*]; jtot1 = tblcol( ah14, isex = 1 tnumber ); jmax = jtot1 - 1; do j = 0 while j <= jmax ah14[*,j] = ah14[*,j] * 100 / ah14[*,jtot1]; enddo; jtot2 = tblcol( ah14 ); jmax = jtot2 - 1; do j = jtot1+1 while j <= jmax ah14[*,j] = ah14[*,j] * 100 / ah14[*,jtot2]; enddo; { check unweighted N's } ah14u[iage,*] = ah14u[iage+1,*] + ah14u[iage+2,*]; Col2Dim( "ah14", ah14, 0, jtot1-1, ah14u, 0 ); Col2Dim( "ah14", ah14, jtot1+1, jtot2-1, ah14u, 1 ); { Table 32.1 processing } iage = tblrow( p321, agead = 1 ); p321[iage,*] = p321[iage+1,*] + p321[iage+2,*]; jtot = tblcol( p321 ); do j = 0 while j < jtot p321[*,j] = p321[*,j] * 100 / p321[*,jtot]; enddo; p321u[iage,*] = p321u[iage+1,*] + p321u[iage+2,*]; Col2Dim( "p321", p321, 0, jtot-1, p321u, 0 ); { Table 32.2 processing } iage = tblrow( p322, agead = 1 ); p322[iage,*] = p322[iage+1,*] + p322[iage+2,*]; jtot = tblcol( p322 ); do j = 0 while j < jtot p322[*,j] = p322[*,j] * 100 / p322[*,jtot]; enddo; p322u[iage,*] = p322u[iage+1,*] + p322u[iage+2,*]; Col2Dim( "p322", p322, 0, jtot-1, p322u, 0 ); { Table ah.15 processing } jtot = tblcol( ah15 ); jmax = jtot - 1; do j = 0 while j <= jmax ah15[*,j] = ah15[*,j] * 100 / ah15[*,jtot]; enddo; { check unweighted N's } Col2Dim( "ah15", ah15, 0, jtot-1, ah15u, 0 ); { Table 35w processing } jtot1 = tblcol( p35w, isex = 1 colp35w ); jmax = jtot1 - 1; p35w[*,jmax] = p35w[*,jmax] * 100 / p35w[*,jtot1]; jtot2 = tblcol( p35w ); jmax = jtot2 - 1; p35w[*,jmax] = p35w[*,jmax] * 100 / p35w[*,jtot2]; { Table 35.1 processing } jtot = tblcol( p351 ); jmax = jtot - 4; do j = 0 while j <= jmax p351[*,j] = p351[*,j] * 100 / p351[*,jtot]; enddo; p351[*,jmax-1] = tblsum( column p351[*,1:jmax-2] ); { hypertension controlled } p351[*,jmax+1] = p351[*,jmax] * 100 / p351[*,0]; { means } p351[*,jmax+2] = p351[*,jmax+2] / p351[*,jtot]; p351[*,jmax+3] = p351[*,jmax+3] / p351[*,jtot]; { check unweighted N's } Col2Dim( "p351", p351, 0, jtot-1, p351u, 0 ); { Table 35.2 processing } jtot = tblcol( p352 ); jmax = jtot - 4; do j = 0 while j <= jmax p352[*,j] = p352[*,j] * 100 / p352[*,jtot]; enddo; p352[*,jmax-1] = tblsum( column p352[*,1:jmax-2] ); { hypertension controlled } p352[*,jmax+1] = p352[*,jmax] * 100 / p352[*,0]; { means } p352[*,jmax+2] = p352[*,jmax+2] / p352[*,jtot]; p352[*,jmax+3] = p352[*,jmax+3] / p352[*,jtot]; { check unweighted N's } Col2Dim( "p352", p352, 0, jtot-1, p352u, 0 ); { Table ah.bp.21 processing } imax = tblrow( ahbp21, alcohol = 1 ); ahbp21[imax,*] = ahbp21[imax+1,*] + ahbp21[imax+2,*]; jtot = tblcol( ahbp21 ); jmax = jtot - 4; do j = 0 while j <= jmax ahbp21[*,j] = ahbp21[*,j] * 100 / ahbp21[*,jtot]; enddo; ahbp21[*,jmax-1] = tblsum( column ahbp21[*,1:jmax-2] ); { hypertension controlled } ahbp21[*,jmax+1] = ahbp21[*,jmax] * 100 / ahbp21[*,0]; { check unweighted N's } ahbp21u[imax,*] = ahbp21u[imax+1,*] + ahbp21u[imax,*]; Col2Dim( "ahbp21", ahbp21, 0, jtot-1, ahbp21u, 0 ); { Table ah.bp.22 processing } imax = tblrow( ahbp22, alcohol = 1 ); ahbp22[imax,*] = ahbp22[imax+1,*] + ahbp22[imax+2,*]; jtot = tblcol( ahbp22 ); jmax = jtot - 4; do j = 0 while j <= jmax ahbp22[*,j] = ahbp22[*,j] * 100 / ahbp22[*,jtot]; enddo; ahbp22[*,jmax-1] = tblsum( column ahbp22[*,1:jmax-2] ); { hypertension controlled } ahbp22[*,jmax+1] = ahbp22[*,jmax] * 100 / ahbp22[*,0]; { check unweighted N's } ahbp22u[imax,*] = ahbp22u[imax+1,*] + ahbp22u[imax,*]; Col2Dim( "ahbp22", ahbp22, 0, jtot-1, ahbp22u, 0 ); { Table ah.bp.31 processing } jtot = tblcol( ahbp31 ); jmax = jtot - 2; do j = 0 while j <= jmax ahbp31[*,j] = ahbp31[*,j] * 100 / ahbp31[*,jtot]; enddo; { hypertension controlled } ahbp31[*,jmax+1] = ahbp31[*,1] * 100 / ahbp31[*,0]; { check unweighted N's } Col2Dim( "ahbp31", ahbp31, 0, jtot-1, ahbp31u, 0 ); { Table ah.bp.32 processing } jtot = tblcol( ahbp32 ); jmax = jtot - 2; do j = 0 while j <= jmax ahbp32[*,j] = ahbp32[*,j] * 100 / ahbp32[*,jtot]; enddo; { hypertension controlled } ahbp32[*,jmax+1] = ahbp32[*,1] * 100 / ahbp32[*,0]; { check unweighted N's } Col2Dim( "ahbp32", ahbp32, 0, jtot-1, ahbp32u, 0 ); { Table ah.16x processing } iage = tblrow( ah16x, agead = 1 ); ah16x[iage,*] = ah16x[iage+1,*] + ah16x[iage+2,*]; jtot = tblcol( ah16x ); jmax = jtot - 1; do j = 0 while j <= jmax ah16x[*,j] = ah16x[*,j] * 100 / ah16x[*,jtot]; enddo; { check unweighted N's } ah16xu[iage,*] = ah16xu[iage+1,*] + ah16xu[iage+2,*]; Col2Dim( "ah16x", ah16x, 0, jtot-1, ah16xu, 0 ); { Table ah.16xw processing } jtot = tblcol( ah16xw ); jmax = jtot - 1; do j = 0 while j <= jmax ah16xw[*,j] = ah16xw[*,j] * 100 / ah16xw[*,jtot]; enddo; { check unweighted N's } ah16xwu[iage,*] = ah16xwu[iage+1,*] + ah16xwu[iage+2,*]; Col2Dim( "ah16xw", ah16xw, 0, jtot-1, ah16xwu, 0 ); { Table ah.16 processing } jtot = tblcol( ah16 ); jmax = jtot - 1; do j = 0 while j <= jmax ah16[*,j] = ah16[*,j] * 100 / ah16[*,jtot]; enddo; { check unweighted N's } ah16u[iage,*] = ah16u[iage+1,*] + ah16u[iage+2,*]; Col2Dim( "ah16", ah16, 0, jtot-1, ah16u, 0 ); { Table ah.16b processing } iage = tblrow( ah16b, agead = 1 ); ah16b[iage,*] = ah16b[iage+1,*] + ah16b[iage+2,*]; jtot = tblcol( ah16b ); jmax = jtot - 1; do j = 0 while j <= jmax ah16b[*,j] = ah16b[*,j] * 100 / ah16b[*,jtot]; enddo; { check unweighted N's } ah16bu[iage,*] = ah16bu[iage+1,*] + ah16bu[iage+2,*]; Col2Dim( "ah16b", ah16b, 0, jtot-1, ah16bu, 0 ); { Table ah.16c processing } iage = tblrow( ah16c, agead = 1 ); ah16c[iage,*] = ah16c[iage+1,*] + ah16c[iage+2,*]; ah16c[*,0] = ah16c[*,0] * 100 / ah16c[*,1]; ah16c[*,2] = ah16c[*,2] / ah16c[*,3]; ah16c[*,4] = ah16c[*,4] * 100 / ah16c[*,5]; ah16c[*,6] = ah16c[*,6] / ah16c[*,7]; { check unweighted N's } ah16cu[iage,*] = ah16cu[iage+1,*] + ah16cu[iage+2,*]; Col2Dim( "ah16c", ah16c, 0, 0, ah16cu, 0 ); Col2Dim( "ah16c", ah16c, 2, 2, ah16cu, 1 ); Col2Dim( "ah16c", ah16c, 4, 4, ah16cu, 2 ); Col2Dim( "ah16c", ah16c, 6, 6, ah16cu, 3 ); { Table 11.12.1 processing } iage = tblrow( t11121, agead = 1 ); t11121[iage,*] = t11121[iage+1,*] + t11121[iage+2,*]; jtot1 = tblcol( t11121, col1112a ); t11121[*,0] = t11121[*,0] * 100 / t11121[*,jtot1]; { Percent < 145 cms } jtot2 = tblcol( t11121 ); jmax = jtot2 - 1; j = jtot1 + 1; t11121[*,j] = t11121[*,j] / t11121[*,jtot2]; { mean bmi } do j = j + 1 while j <= jmax t11121[*,j] = t11121[*,j] * 100 / t11121[*,jtot2]; enddo; jtot = tblcol( t11121, col1112b = 3 ); { calculate below 18.5 } t11121[*,jtot] = t11121[*,jtot+1] + t11121[*,jtot+2]; jtot = tblcol( t11121, col1112b = 6 ); { calculate >= 25.0 } t11121[*,jtot] = t11121[*,jtot+1] + t11121[*,jtot+2]; { check unweighted N's } t11121u[iage,*] = t11121u[iage+1,*] + t11121u[iage+2,*]; Col2Dim( "t11121", t11121, 0, jtot1-1, t11121u, 0 ); { women measured } Col2Dim( "t11121", t11121, jtot1+1, jtot2-1, t11121u, 1 ); { women measured and weighted } { Table 11.12.2 processing } iage = tblrow( t11122, agead = 1 ); t11122[iage,*] = t11122[iage+1,*] + t11122[iage+2,*]; jtot1 = tblcol( t11122 ); jmax = jtot1 - 1; t11122[*,0] = t11122[*,0] / t11122[*,jtot1]; { mean bmi } do j = 1 while j <= jmax t11122[*,j] = t11122[*,j] * 100 / t11122[*,jtot1]; enddo; jtot = tblcol( t11122, col1112c = 3 ); { calculate below 18.5 } t11122[*,jtot] = t11122[*,jtot+1] + t11122[*,jtot+2]; jtot = tblcol( t11122, col1112c = 6 ); { calculate >= 25.0 } t11122[*,jtot] = t11122[*,jtot+1] + t11122[*,jtot+2]; { check unweighted N's } t11122u[iage,*] = t11122u[iage+1,*] + t11122u[iage+2,*]; Col2Dim( "t11122", t11122, 0, jtot1-1, t11122u, 0 ); { Table 11.12.3 processing } iage = tblrow( t11123, agead = 1 ); t11123[iage,*] = t11123[iage+1,*] + t11123[iage+2,*]; jtot1 = tblcol( t11123, isex = 1 bmi35 ); jmax = jtot1 - 1; do j = 0 while j <= jmax t11123[*,j] = t11123[*,j] * 100 / t11123[*,jtot1]; enddo; jtot2 = tblcol( t11123 ); jmax = jtot2 - 1; do j = jtot1 + 1 while j <= jmax t11123[*,j] = t11123[*,j] * 100 / t11123[*,jtot2]; enddo; { check unweighted N's } t11123u[iage,*] = t11123u[iage+1,*] + t11123u[iage+2,*]; Col2Dim( "t11123", t11123, 0, jtot1-1, t11123u, 0 ); Col2Dim( "t11123", t11123, jtot1+1, jtot2-1, t11123u, 1 ); { Table ah.17.1 processing } jtot1 = tblcol( ah171, colah17a ); jmax = jtot1 - 1; ah171[*,0] = ah171[*,0] / ah171[*,jtot1]; do j = 1 while j <= jmax ah171[*,j] = ah171[*,j] * 100 / ah171[*,jtot1]; enddo; jtot2 = tblcol( ah171 ); jmax = jtot2 - 1; ah171[*,jtot1+1] = ah171[*,jtot1+1] / ah171[*,jtot2]; do j = jtot1+2 while j <= jmax ah171[*,j] = ah171[*,j] * 100 / ah171[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah171", ah171, 0, jtot1-1, ah171u, 0 ); Col2Dim( "ah171", ah171, jtot1+1, jtot2-1, ah171u, 1 ); { Table ah.17.2 processing } jtot1 = tblcol( ah172, colah17c ); jmax = jtot1 - 1; ah172[*,0] = ah172[*,0] / ah172[*,jtot1]; do j = 1 while j <= jmax ah172[*,j] = ah172[*,j] * 100 / ah172[*,jtot1]; enddo; jtot2 = tblcol( ah172 ); jmax = jtot2 - 1; ah172[*,jtot1+1] = ah172[*,jtot1+1] / ah172[*,jtot2]; do j = jtot1+2 while j <= jmax ah172[*,j] = ah172[*,j] * 100 / ah172[*,jtot2]; enddo; { check unweighted N's } Col2Dim( "ah172", ah172, 0, jtot1-1, ah172u, 0 ); Col2Dim( "ah172", ah172, jtot1+1, jtot2-1, ah172u, 1 ); { Table 11.13.1 processing } iage = tblrow( t11131, agead = 1 ); t11131[iage,*] = t11131[iage+1,*] + t11131[iage+2,*]; jtot = tblcol( t11131 ); jmax = jtot - 1; do j = 0 while j <= jmax t11131[*,j] = 100 * t11131[*,j] / t11131[*,jtot]; enddo; { check unweighted N's } t11131u[iage,*] = t11131u[iage+1,*] + t11131u[iage+2,*]; Col2Dim( "t11131", t11131, 0, jtot-1, t11131u, 0 ); { Table 11.13.2 processing } iage = tblrow( t11132, agead = 1 ); t11132[iage,*] = t11132[iage+1,*] + t11132[iage+2,*]; jtot = tblcol( t11132 ); jmax = jtot - 1; do j = 0 while j <= jmax t11132[*,j] = 100 * t11132[*,j] / t11132[*,jtot]; enddo; { check unweighted N's } t11132u[iage,*] = t11132u[iage+1,*] + t11132u[iage+2,*]; Col2Dim( "t11132", t11132, 0, jtot-1, t11132u, 0 ); { Table ah.18 } jtot = tblcol( ah18 ); jmax = jtot - 2; do j = 0 while j <= jmax ah18[*,j,*] = ah18[*,j,*] * 100 / ah18[*,jtot,*]; enddo; ah18[*,jmax+1,*] = tblsum( column ah18[*,0:jmax,*] ); { Table ah.19.1.a } imax = tblrow( ah191a, diabet = 4 ); ah191a[imax-3,*] = tblsum( row ah191a[imax-2:imax,*] ); jtot = tblcol( ah191a ); jmax = jtot - 1; do j = 0 while j <= jmax ah191a[*,j] = ah191a[*,j] * 100 / ah191a[*,jtot]; enddo; ah191au[imax-3,*] = tblsum( row ah191au[imax-2:imax,*] ); Col2Dim( "ah191a", ah191a, 0, jtot-1, ah191au, 0 ); { Table ah.19.1.b } imax = tblrow( ah191b, diabet = 4 ); ah191b[imax-3,*] = tblsum( row ah191b[imax-2:imax,*] ); jtot = tblcol( ah191b ); jmax = jtot - 1; do j = 0 while j <= jmax ah191b[*,j] = ah191b[*,j] * 100 / ah191b[*,jtot]; enddo; Col2Dim( "ah191b", ah191b, 0, jtot-1, ah191au, 0 ); { Table ah.19.2.a } imax = tblrow( ah192a, diabet = 4 ); ah192a[imax-3,*] = tblsum( row ah192a[imax-2:imax,*] ); jtot = tblcol( ah192a ); jmax = jtot - 1; do j = 0 while j <= jmax ah192a[*,j] = ah192a[*,j] * 100 / ah192a[*,jtot]; enddo; ah192au[imax-3,*] = tblsum( row ah192au[imax-2:imax,*] ); Col2Dim( "ah192a", ah192a, 0, jtot-1, ah192au, 0 ); { Table ah.19.2.b } imax = tblrow( ah192b, diabet = 4 ); ah192b[imax-3,*] = tblsum( row ah192b[imax-2:imax,*] ); jtot = tblcol( ah192b ); jmax = jtot - 1; do j = 0 while j <= jmax ah192b[*,j] = ah192b[*,j] * 100 / ah192b[*,jtot]; enddo; Col2Dim( "ah192b", ah192b, 0, jtot-1, ah192au, 0 ); { Table ah.20.1 } jtot = tblcol( ah201 ); jmax = jtot - 1; do j = 0 while j <= jmax ah201[*,j] = ah201[*,j] * 100 / ah201[*,jtot]; enddo; Col2Dim( "ah201", ah201, 0, jtot-1, ah201u, 0 ); { Table ah.20.2 } jtot = tblcol( ah202 ); jmax = jtot - 1; do j = 0 while j <= jmax ah202[*,j] = ah202[*,j] * 100 / ah202[*,jtot]; enddo; Col2Dim( "ah202", ah202, 0, jtot-1, ah202u, 0 ); { Table ah.20.w } ah20w[*,0] = ah20w[*,0] / ah20w[*,1]; Col2Dim( "ah20w", ah20w, 0, 0, ah20wu, 0 ); { Table ah.20.2 } itot = tblrow( ah21m ); imax = itot - 1; do i = 0 while i <= imax ah21m(i,1) = ah21m(i,0) * 100 / ah21m(itot,0); ah21m(i,3) = ah21m(i,2) * 100 / ah21m(itot,2); ah21m(i,5) = ah21m(i,4) * 100 / ah21m(itot,4); enddo; ah21m(itot,1) = default; ah21m(itot,3) = default; ah21m(itot,5) = default; PROC HOUSEHOLD preproc if HV015 <> 1 | HV027 <> 1 then skip case endif; do i = 1 while i <= 50 interview(i) = 0 enddo; v102w = HV025; v101w = HV024; postproc { tabulate women & men for table ah.18 } isex = 1; for i in RECH8_EDT do if SHWHBA1C <> notappl then hba1cra = 1 { blood taken } elseif SH274 = "99995" then hba1cra = 2; { refused } elseif SH274 = "99994" then hba1cra = 3; { not present } else hba1cra = 4; { 4-not tested/5-inconclusive/6-other/missing } endif; if HV103(IDXH8) = 1 then { de-facto population } box interview(IDXH8) => hba1crb; { result of individual interview } 1 => 1; { complete } => 2; { other } endbox; xtab( ah18 ); endif; { end de-facto population } enddo; isex = 2; for i in RECH9_EDT do if SHMHBA1C <> notappl then hba1cra = 1 { blood taken } elseif SH374 = "99995" then hba1cra = 2; { refused } elseif SH374 = "99994" then hba1cra = 3; { not present } else hba1cra = 4; { 4-not tested/5-inconclusive/6-other/missing } endif; if HV103(IDXH9) = 1 then { de-facto population } MCASEID = concat( HHID, edit("ZZ9", IDXH9) ); if loadcase( MRECODE7, MCASEID ) & MV015 = 1 then { found & complete questionnaire } hba1crb = 1 { result of individual interview } else hba1crb = 2; { other } endif; xtab( ah18 ); endif; { end de-facto population } enddo; {-----------------------------------------------------------------------------------------------} { male tables } sex2 = 1; { men } isex = 2; { men } for i in RECH1_EDT do if SH10(i) = 1 then { if eligible for male interview } MCASEID = concat( HHID, edit("ZZ9", HVIDX) ); if loadcase( MRECODE7, MCASEID ) & MV015 = 1 then { found & complete questionnaire } if unweight then rweight = 1; else rweight = SMWEIGHT/1000000; endif; { general variables } v102w = MV102; v101w = MV101; v106w = MV149; if MV149 in 8,missing then v106w = 9 endif; v190w = MV190; box MV012 => agead; 15-19 => 2; 20-24 => 3; 25-34 => 4; 35-44 => 5; 45-54 => 6; 55-64 => 7; => 8; endbox; box MV012 => agead1; 15-24 => 1; 25-34 => 2; 35-44 => 3; 45-54 => 4; 55-64 => 5; => 6; endbox; tot1549 = ( !MV012 in 15:49 ); { ethnicity } v131w = MV131; if MV131 = 996 then v131w = 6 endif; { marital status } box MV501 => v501w; 0-2 => MV501; 4-5 => 3; 3 => 4; => 9; endbox; box MV501 => v501w2; 0 => 0; 1-2 => 1; 3-5 => 2; => 9; endbox; insuran = SM1101; s1203w = SM902; { BMI } xline = 0; for i in RECHMA_EDT do if MV003 = HB0 then xline = i; break; endif; enddo; bmiad = 6; if xline then { if respondent measured } if HB40(xline) in 0:9990 then ybmi = HB40(xline) / 100; xbmi = int( ybmi*10 ); else xbmi = missing; endif; box xbmi => bmiad; 0-184 => 1; 185-249 => 2; 250-299 => 3; 300-600 => 4; => 6; endbox; endif; { employment last 12 months } if MV731 = missing then works = 9 elseif !MV731 in 1,2,3 then { not employed last 12 months } works = 1 elseif MV741 = missing then works = 9 elseif MV741 in 1,2 then works = 2 { employed for cash } else works = 3 { employed, not for cash } endif; { load test data for women and modify hivres1 accordingly } HIVCLUST = HV001; HIVNUMB = HV002; HIVLINE = MV003; hivstat = 9; if loadcase( HIVTESTDAT, HIVCLUST, HIVNUMB, HIVLINE ) then box HIV03 => hivstat; 1 => 1; 0,9 => 2; => 9; endbox; endif; { -------------------------------------------------------------------- } { table ah.1 } colt301 = 2; xtab( ah1, rweight ); colt301 = 3; xtab( ah1 ); { -------------------------------------------------------------------- } { table ah.2.2 } colah2 = SM901; xtab( ah22, rweight ); xtab( ah22u ); { --------------------------------------------------------------------------- } { Table 3.9 } colt309 = 2; xtab( t309, rweight ); xtab( t309u ); if SM1101 = 1 then colt309 = 1; xtab( t309, rweight ); endif; { -------------------------------------------------------------------- } { table ah.3 } colah3 = 3; xtab( ah3, rweight ); xtab( ah3u ); if SM1104 = 1 then colah3 = 1; xtab( ah3, rweight ); endif; if SM1102 = 1 then colah3 = 2; xtab( ah3, rweight ); endif; { -------------------------------------------------------------------- } { table ah.4 } colah4a = notappl; colah4b = notappl; colah4c = notappl; numresp = 1; if SM1102 = 1 then xtab( ah4, rweight ); xtab( ah4u ); numresp = notappl; if SM1103A = 1 then colah4a = 1; xtab( ah4, rweight ); endif; if SM1103B = 1 then colah4a = 2; xtab( ah4, rweight ); endif; if SM1103C = 1 then colah4a = 3; xtab( ah4, rweight ); endif; colah4a = notappl; if SM1103D = 1 then colah4b = 1; xtab( ah4, rweight ); endif; if SM1103E = 1 then colah4b = 2; xtab( ah4, rweight ); endif; if SM1103F = 1 then colah4b = 3; xtab( ah4, rweight ); endif; if SM1103G = 1 then colah4b = 4; xtab( ah4, rweight ); endif; colah4b = notappl; if 1 in SM1103H,SM1103I,SM1103J,SM1103K,SM1103X then colah4c = 1; xtab( ah4, rweight ); endif; colah4c = notappl; endif; { -------------------------------------------------------------------- } { table ah.6 } rowah6b = notappl; cnt = 0; tallyah6( 1, SM1105, SM1107 ); tallyah6( 2, SM1108A, SM1111 ); tallyah6( 3, SM1108B, SM1113 ); tallyah6( 4, SM1108C, SM1115 ); tallyah6( 5, SM1108D, SM1117 ); tallyah6( 6, SM1108E, SM1119 ); tallyah6( 7, SM1108F, SM1121 ); tallyah6( 8, SM1108G, SM1123 ); tallyah6( 9, SM1108H, SM1125 ); rowah6a = notappl; colah6 = 1; rowah6b = 2; xtab( ah6, rweight ); if cnt > 1 then rowah6b = 1; xtab( ah6, rweight ); endif; { -------------------------------------------------------------------- } { table ah.8 } colah8b = notappl; colah8a = 2; xtab( ah8, rweight ); coltotu = 1; xtab( ah8u ); if SM1145 = 1 then colah8a = 1; xtab( ah8, rweight ); endif; colah8a = notappl; if SM1145 = 1 then colah8b = 4; xtab( ah8, rweight ); coltotu = 2; xtab( ah8u ); box SM1146 => colah8b; 1 => 1; 2-3 => 2; 4-30 => 3; => notappl; endbox; xtab( ah8, rweight ); endif; { -------------------------------------------------------------------- } { table ah.9 } colah9b = notappl; if SM1145 = 1 then colah9a = 7; xtab( ah9, rweight ); coltotu = 1; xtab( ah9u ); colah9a = SM1147; if SM1147 = 4 then colah9a = 6 endif; xtab( ah9, rweight ); colah9a = notappl; if SM1147 = 5 then colah9b = 2; xtab( ah9, rweight ); coltotu = 2; xtab( ah9u ); if SM1148 = 1 then colah9b = 1; xtab( ah9, rweight ); endif; endif; endif; { -------------------------------------------------------------------- } { table ah.10 } colah10b = notappl; colah10a = 3; xtab( ah10, rweight ); coltotu = 1; xtab( ah10u ); if SM1138 = 1 then colah10a = 1; xtab( ah10, rweight ); if SM1139 = 1 then colah10a = 2; xtab( ah10, rweight ); endif; endif; colah10a = notappl; if SM1139 = 1 then colah10b = 8; xtab( ah10, rweight ); coltotu = 2; xtab( ah10u ); if SM1140A = 1 then colah10b = 1; xtab( ah10, rweight ); endif; if SM1140B = 1 then colah10b = 2; xtab( ah10, rweight ); endif; if SM1140C = 1 then colah10b = 3; xtab( ah10, rweight ); endif; if SM1140D = 1 then colah10b = 4; xtab( ah10, rweight ); endif; if SM1140E = 1 then colah10b = 5; xtab( ah10, rweight ); endif; if SM1140F = 1 then colah10b = 6; xtab( ah10, rweight ); endif; if SM1140X = 1 then colah10b = 7; xtab( ah10, rweight ); endif; endif; { -------------------------------------------------------------------- } { table ah.11 } colah11b = notappl; colah11c = notappl; colah11a = 2; xtab( ah11, rweight ); coltotu = 1; xtab( ah11u ); if SM1141 = 1 then colah11a = 1; xtab( ah11, rweight ); endif; colah11a = notappl; if SM1141 = 1 then colah11b = 2; xtab( ah11, rweight ); coltotu = 2; xtab( ah11u ); if SM1142 = 1 then colah11b = 1; xtab( ah11, rweight ); endif; endif; colah11b = notappl; if SM1142 = 1 then colah11c = 7; xtab( ah11, rweight ); coltotu = 3; xtab( ah11u ); if SM1143A = 1 then colah11c = 1; xtab( ah11, rweight ); endif; if SM1143B = 1 then colah11c = 2; xtab( ah11, rweight ); endif; if SM1143C = 1 then colah11c = 3; xtab( ah11, rweight ); endif; if SM1143D = 1 then colah11c = 4; xtab( ah11, rweight ); endif; if SM1143E = 1 then colah11c = 5; xtab( ah11, rweight ); endif; if SM1143X = 1 then colah11c = 6; xtab( ah11, rweight ); endif; endif; { -------------------------------------------------------------------- } { table ah.11.w } colah11w = 1; if SM1142 = 0 then s1449w = SM1144; xtab( ah11w, rweight ); endif; { -------------------------------------------------------------------- } { table 33.2 } colp33mb = notappl; colp33ma = 3; xtab( p332, rweight ); coltotu = 1; xtab( p332u ); if SM1150 = 1 then colp33ma = 1; xtab( p332, rweight ); if SM1152 = 1 then colp33ma = 2; xtab( p332, rweight ); endif; endif; colp33ma = notappl; if SM1152 = 1 then colp33mb = 2; xtab( p332, rweight ); coltotu = 2; xtab( p332u ); if SM1154 = 1 then colp33mb = 1; xtab( p332, rweight ); endif; endif; { --------------------------------------------------------------------------- } { Table 3.10.2 } tobacco = notappl; numman = notappl; v463aw = notappl; { cigarettes } if tobaccouse( MV464A ) | tobaccouse( MV464B ) | tobaccouse( MV464C ) | tobaccouse( MV484A ) | tobaccouse( MV484B ) | tobaccouse( MV484C ) then tobacco = 1; xtab( t3102, rweight ); endif; { other type of tobacco } if tobaccouse( MV464D ) | tobaccouse( MV464E ) | tobaccouse( MV464F ) | tobaccouse( MV464G ) | tobaccouse( MV484D ) | tobaccouse( MV484E ) | tobaccouse( MV484F ) | tobaccouse( MV484G ) then tobacco = 2; xtab( t3102, rweight ); endif; { any tobacco } if tobacco in 1,2 then tobacco = 3; xtab( t3102, rweight ); endif; tobacco = notappl; box MV463AA => v463aw; 1-2 => MV463AA; 0 => 3; missing => 9; endbox; box MV463AA : MV463AD => v463aw; 1-2 : => MV463AA; 0 : 1-2 => 3; 0 : 0 => 4; : => 9; endbox; numman = 1; xtab( t3102, rweight ); xtab( t3102u ); { --------------------------------------------------------------------------- } { Table 3.11.2 } { smokes cigarettes } x = cigaretdaily( MV464A ) + cigaretdaily( MV464B ) + cigaretdaily( MV464C ); if x then box x => v464w; 0-4 => 0; 5-9 => 1; 10-14 => 2; 15-24 => 3; 25-800 => 4; => 9; endbox; xtab( t3112, rweight ); xtab( t3112u ); endif; { --------------------------------------------------------------------------- } { Table 3.12 } rowt312 = notappl; { total number } tnumber = 1; xtab( t312, rweight ); tnumber = notappl; { snuff, by mouth } if tobaccouse( MV464H ) | tobaccouse( MV484H ) then rowt312 = 1; xtab( t312, rweight ); endif; { snuff, by nose } if tobaccouse( MV464I ) | tobaccouse( MV484I ) then rowt312 = 2; xtab( t312, rweight ); endif; { Chewing tobacco } if tobaccouse( MV464J ) | tobaccouse( MV484J ) then rowt312 = 3; xtab( t312, rweight ); endif; { Betel quid with tobacco } if tobaccouse( MV464K ) | tobaccouse( MV484K ) then rowt312 = 4; xtab( t312, rweight ); endif; { other type of smokeless tobacco } if tobaccouse( MV464L ) | tobaccouse( MV484L ) then rowt312 = 5; xtab( t312, rweight ); endif; { any type of smokeless tobacco } if rowt312 in 1:5 then rowt312 = 6; xtab( t312, rweight ); endif; { any type of tobacco } if MV463AA in 1,2 | MV463AB in 1,2 then rowt312 = 7; xtab( t312, rweight ); endif; { --------------------------------------------------------------------------- } { Table ah.14 } tnumber = 1; s1223w = SM915; xtab( ah14, rweight ); xtab( ah14u ); { -------------------------------------------------------------------- } { table 32.2 } drinks = NaToZero(SM919A) + NaToZero(SM919B) + NaToZero(SM919C) + NaToZero(SM919D) + NaToZero(SM919E) + NaToZero(SM919F) + NaToZero(SM919G) + NaToZero(SM919H); colp32 = notappl; numman = notappl; if SM916 = 1 then colp32 = 1; xtab( p322, rweight ); if SM917 = 1 then colp32 = 2; xtab( p322, rweight ); if drinks then colp32 = 3; xtab( p322, rweight ); endif; if SM919A in 5:90 | SM919B in 5:90 | SM919C in 5:90 | SM919D in 5:90 | SM919E in 5:90 | SM919F in 5:90 | SM919G in 5:90 | SM919H in 5:90 | SM924 = 1 then colp32 = 4; xtab( p322, rweight ); endif; x = ( SM920 = 1 ) + ( SM921 = 1 ) + ( SM922 = 1 ) + ( SM923 = 1 ); if x >= 2 then colp32 = 5; xtab( p322, rweight ); endif; endif; endif; colp32 = notappl; numman = 1; xtab( p322, rweight ); xtab( p322u ); { ---------------------------------------------------------------------------- } { tables 35.w & 35.2, ah.bp.22 } box SM916 : SM917 : drinks => alcohol; 0 : : => 5; : 1 : 0 => 3; : 1 : => 2; : 0 : => 4; : : => notappl; endbox; box MV463AA : MV463AB => tobacad; 1 : => 1; : 1 => 1; : => 2; endbox; measured = 0; measm = notappl; for i in RECH9_EDT do if MV003 = IDXH9 then if ValidPressure( SH321A, SH321B ) then measured = 1; presstake = 0; systolic = 0; diastolic = 0; if ValidPressure( SH328A, SH328B ) then systolic = systolic + SH328A; diastolic = diastolic + SH328B; presstake = presstake + 1; endif; if ValidPressure( SH332A, SH332B ) then systolic = systolic + SH332A; diastolic = diastolic + SH332B; presstake = presstake + 1; endif; if presstake in 1,2 then systolic = int( systolic / presstake ); diastolic = int( diastolic / presstake ); else systolic = SH321A; diastolic = SH321B; endif; measm = presstake; endif; xline = i; break; endif; enddo; colp35w = 2; xtab( p35w ); if measured then colp35w = 1; xtab( p35w ); { tables 35.2, AH.BP22 } colp35a = notappl; colp35b = notappl; colp35c = 5; xtab( p352, rweight ); xtab( p352u ); freq include( measm ); s1306w = SM1006; s223w = SH323(xline); xtab( ahbp22, rweight ); xtab( ahbp22u ); { numerators for means } colp35c = 3; xtab( p352, systolic*rweight ); colp35c = 4; xtab( p352, diastolic*rweight ); colp35a = ( systolic >= 140 | diastolic >= 90 | SH324(xline) = 1 ); colp35b = ClassifyPressure( systolic, diastolic ); colp35c = ( colp35b in 1:3 & SH324(xline) = 1 ); xtab( p352, rweight ); xtab( ahbp22, rweight ); { table ah.bp32 } colhbp31 = 7; xtab( ahbp32, rweight ); xtab( ahbp32u ); if colp35a then colhbp31 = 1; xtab( ahbp32, rweight ); endif; if colp35b in 4:6 then colhbp31 = 2; xtab( ahbp32, rweight ); endif; if SH324(xline) = 1 then colhbp31 = 3; xtab( ahbp32, rweight ); endif; if colp35b in 1:3 & SH324(xline) = 1 then colhbp31 = 4; xtab( ahbp32, rweight ); endif; if colp35b in 4:6 & SH324(xline) = 1 then colhbp31 = 5; xtab( ahbp32, rweight ); endif; endif; { ---------------------------------------------------------------------------- } { tables ah.16x } numresp = 1; s1304w = SM1004; s1305w = SM1005; s1306w1 = SM1006; s1307w = SM1007; xtab( ah16x, rweight ); xtab( ah16xu ); { ---------------------------------------------------------------------------- } { tables ah.16xw } numresp = 1; s1304w2 = SM1004; s1305w2 = SM1005; s1306w2 = SM1006; s1307w2 = SM1007; xtab( ah16xw, rweight ); xtab( ah16xwu ); { ---------------------------------------------------------------------------- } { tables ah.16 } numresp = 1; box measured : colp35b => bloodp; 1 : 1 => 1; 1 : 2-3 => 2; 1 : 4-6 => 3; : => 9; endbox; s1306w2 = SM1006; s1308w = SM1008; xtab( ah16, rweight ); xtab( ah16u ); { ---------------------------------------------------------------------------- } { tables ah.16b } colah16b = 5; xtab( ah16b, rweight ); xtab( ah16bu ); if SM1009 > 0 then colah16b = 1; xtab( ah16b, rweight ); endif; if SM1010 > 0 then colah16b = 2; xtab( ah16b, rweight ); endif; if SM1012 = 1 then colah16b = 4; xtab( ah16b, rweight ); endif; { ---------------------------------------------------------------------------- } { tables ah.16c } s1311w2 = notappl; s1312w1 = notappl; s1312w2 = notappl; s1311w1 = 2; xtab( ah16c, rweight ); coltotu = 1; xtab( ah16cu ); if SM1011 = 1 then s1311w1 = 1; s1311w2 = 2; xtab( ah16c, rweight ); coltotu = 2; xtab( ah16cu ); s1311w1 = notappl; xtemp = 200*NAToZero(SM1011A1) + 330*NAToZero(SM1011A2) + 500*NAToZero(SM1011A3) + 1000*NAToZero(SM1011A4) + 2000*NAToZero(SM1011A5); s1311w2 = 1; xtab( ah16c, xtemp*rweight ); endif; s1311w1 = notappl; s1311w2 = notappl; s1312w1 = 2; xtab( ah16c, rweight ); coltotu = 3; xtab( ah16cu ); if SM1012 = 1 then s1312w1 = 1; s1312w2 = 2; xtab( ah16c, rweight ); coltotu = 4; xtab( ah16cu ); s1312w1 = notappl; xtemp = 200*NAToZero(SM1012A1) + 200*NAToZero(SM1012A2); s1312w2 = 1; xtab( ah16c, xtemp*rweight ); endif; { ---------------------------------------------------------------------- } { Table 11.12.2, 11.12.3, 11.13.2 } { smokes cigarettes } if MV464A = notappl & MV464B = notappl & MV464C = notappl & MV484A = notappl & MV484B = notappl & MV484C = notappl then smokes = notappl; elseif MV464A = missing & MV464B = missing & MV464C = missing & MV484A = missing & MV484B = missing & MV484C = missing then smokes = 9 else smokes = ( MV464A in 1:888 | MV464B in 1:888 | MV464C in 1:888 | MV484A in 1:888 | MV484B in 1:888 | MV484C in 1:888 ); if !smokes then smokes = 2 endif; endif; waistm = 4; for i in RECH9_EDT do if MV003 = IDXH9 then box SH306A => waistm; 9994-9996 => 4; 0-939 => 1; 940-1019 => 2; => 3; endbox; break; endif; enddo; waistb = waistm; { find man in HH record with hemoglobin data } do j = 1 while j <= soccurs( RECHMA ) if MV003 = HB0(j) then { man found } { Table 11.12.2 } if HB40(j) in 0:9990 then ybmi = HB40(j) / 100; xbmi = int( ybmi*10 ); col1112c = 1; xtab( t11122, ybmi*rweight ); box xbmi => col1112c; <170 => 5; 170-184 => 4; 185-249 => 2; 250-299 => 7; 300-600 => 8; => notappl; endbox; xtab( t11122, rweight ); col1112c = 9; xtab( t11122, rweight ); xtab( t11122u ); { Table 11.12.3 } bmi35 = 2; xtab( t11123, rweight ); xtab( t11123u ); if xbmi >= 350 then bmi35 = 1; xtab( t11123, rweight ); endif; endif; { ---------------------------------------------------------------------- } { Table 11.13.2 } if HB55(j) = 0 then { man tested for hemoglobin } anemiam = 2; { all men } xtab( t11132, rweight ); xtab( t11132u ); if HB56(j) in 0:129 then { any anemia level of anemia } anemiam = 1; xtab( t11132, rweight ); endif; endif; { end man tested for hemoglobin } break; endif; { end man found } enddo; { end loop to locate a man } { ---------------------------------------------------------------------------- } { tables ah.17.2 } colah17c = notappl; colah17b = notappl; xwaist = notappl; for i in RECH9_EDT do if MV003 = IDXH9 then if SH306A in 500:2000 then xwaist = SH306A / 10; colah17c = 1; xtab( ah172, xwaist*rweight ); colah17c = 5; xtab( ah172, rweight ); coltotu = 1; xtab( ah172u ); if waistm in 1:3 then colah17c = waistm + 1; xtab( ah172, rweight ); endif; endif; colah17c = notappl; if SH306A in 500:2000 & HB3(i) in 1000:2500 then whtr = SH306A/HB3(i); colah17b = 1; xtab( ah172, whtr*rweight ); colah17b = 3; xtab( ah172, rweight ); coltotu = 2; xtab( ah172u ); if whtr >= 0.50 then colah17b = 2; xtab( ah172, rweight ); endif; endif; { end respondent eligible } break; endif; enddo; { ---------------------------------------------------------------------------- } { Table ah.19.2, ah.19.2.a } box SM1108F : SM1121 => diabet; 1 : 1 => 2; 1 : 0 => 3; 1 : 8 => 4; 0 : => 5; 8 : => 8; endbox; for i in RECH9_EDT do if MV003 = IDXH9 then x = loadcase( TESTDURATION, SH374 ); if SHMHBA1C <> notappl & x & TDAYS <= 60 then box HB57(i) => anemias; 1-3 => 1; 4 => 2; => 9; endbox; if SH377 = 1 then if MedMen( 6 ) then // diabetes diabmed = 1 else diabmed = 2 endif; else diabmed = 3 endif; xtemp = int( (SHMHBA1C-228)/0.9866 + 0.5 ); box xtemp => colah19b; 0-5699 => 1; 5700-6499 => 2; 6500-25000 => 3; => notappl; endbox; xtab( ah192a, rweight ); xtab( ah192au ); box SHMHBA1C => colah19b; 0-5699 => 1; 5700-6499 => 2; 6500-25000 => 3; => notappl; endbox; xtab( ah192b, rweight ); endif; break; endif; enddo; { ---------------------------------------------------------------------------- } { Table ah.20.2, ah.20w } colah20 = 5; xtab( ah202, rweight ); xtab( ah202u ); if SM1127 = 1 then colah20 = 1; xtab( ah202, rweight ); endif; if SM1128 = 1 & SM1129 = 1 & SM1130 = 1 then colah20 = 2; xtab( ah202, rweight ); endif; if SM1131 = 1 | SM1132 = 1 | SM1133 = 1 then colah20 = 3; xtab( ah202, rweight ); endif; if SM1134 = 1 & SM1135 = 1 & SM1136 = 1 then colah20 = 4; xtab( ah202, rweight ); colah20w = 2; xtab( ah20wu ); xtab( ah20w, rweight ); colah20w = 1; xtab( ah20w, SM1137*rweight ); endif; { ---------------------------------------------------------------------------- } { Table ah.21 } colah21 = 1; for i in RECH9_EDT do consent = ( SH302D = 1 | SH311 = 1 | SH350 = 1 | HB52(i) = 1 | HB61(i) = 1 | HB64(i) = 1 ); if consent & MV003 = IDXH9 then rowah21 = 0; if SH377 = 1 then if MedMen( 2 ) then // tuberculosis rowah21 = 2; xtab( ah21m, rweight ); endif; if MedMen( 8 ) then // asthma and chronic bronchitis rowah21 = 8; xtab( ah21m, rweight ); endif; if MedMen( 6 ) then // diabetes rowah21 = 6; xtab( ah21m, rweight ); endif; if MedMen( 5 ) then // high cholesterol rowah21 = 5; xtab( ah21m, rweight ); endif; if MedMen( 3 ) then // hypertension rowah21 = 3; xtab( ah21m, rweight ); endif; if MedMen( 4 ) then // heart and stroke-related rowah21 = 4; xtab( ah21m, rweight ); endif; if MedMen( 9 ) then // arthritis rowah21 = 9; xtab( ah21m, rweight ); endif; if MedMen( 10 ) then // osteoporosis rowah21 = 10; xtab( ah21m, rweight ); endif; if MedMen( 11 ) then // epilepsy rowah21 = 11; xtab( ah21m, rweight ); endif; if MedMen( 1 ) then // HIV rowah21 = 1; xtab( ah21m, rweight ); endif; if MedMen( 12 ) then // pain rowah21 = 12; xtab( ah21m, rweight ); endif; if MedMen( 13 ) then // Psychiatric rowah21 = 13; xtab( ah21m, rweight ); endif; if MedMen( 98 ) then // other chronic rowah21 = 98; xtab( ah21m, rweight ); endif; elseif SH377 = 4 then // refused rowah21 = 14; xtab( ah21m, rweight ); endif; if !rowah21 in 0,14 then // any condition rowah21 = 15; xtab( ah21m, rweight ); endif; rowah21 = 16; // number of respondents xtab( ah21m, rweight ); break; endif; enddo; endif { end loadcase & complete interview } endif; { end eligible for men interview } enddo; PROC WOMAN preproc interview(V003) = V015; if V015 <> 1 | !SQTYPE in 2,3 then skip case endif; postproc sex2 = 2; { women } isex = 1; if unweight then rweight = 1; else rweight = SWEIGHT / 1000000; endif; { general variables } v102w = V102; v101w = V101; v106w = V149; if V149 in 8,missing then v106w = 9 endif; v190w = V190; box V012 => agead; 15-19 => 2; 20-24 => 3; 25-34 => 4; 35-44 => 5; 45-54 => 6; 55-64 => 7; => 8; endbox; box V012 => agead1; 15-24 => 1; 25-34 => 2; 35-44 => 3; 45-54 => 4; 55-64 => 5; => 6; endbox; box V012 => age5; 15-19 => 1; 20-34 => 2; 25-49 => 3; => 4; endbox; box V012 => agead2; 15-29 => 1; 30-59 => 2; => 3; endbox; tot1549 = ( !V012 in 15:49 ); { ethnicity } v131w = V131; if V131 = 996 then v131w = 6 endif; { marital status } box V501 => v501w; 0-2 => V501; 4-5 => 3; 3 => 4; => 9; endbox; { marital status } box V501 => v501w2; 0 => 0; 1-2 => 1; 3-5 => 2; => 9; endbox; { living children } box V218 => v218w; 0 => 0; 1-2 => 1; 3-4 => 2; 5-20 => 3; => notappl; endbox; { employed last 12 months } box V741 => v741w1; notappl => 0; 1-2 => 1; 0,3 => 2; => 9; endbox; box V213 => v213w; 0 => 2; 1 => 1; => V213; endbox; box V457 => anemias; 1-3 => 1; 4 => 2; => 9; endbox; insuran = S1402; s1203w = S1203; womelig = 0; if V012 >= 50 then womelig = 1 elseif v201 > 0 then womelig = ( V213 <> 1 & B19(1) > 1 ); else womelig = ( V213 <> 1 ); endif; { BMI } bmiad = 6; if V437 <> notappl then { if respondent measured } bmiad = 5; if womelig then { if respondent eligible } if V445 in 0:9990 then ybmi = V445 / 100; xbmi = int( ybmi*10 ); else xbmi = missing; endif; box xbmi => bmiad; 0-184 => 1; 185-249 => 2; 250-299 => 3; 300-600 => 4; => 6; endbox; endif; endif; waistb = 4; waistw = 4; for i in RECH8_EDT do if V003 = IDXH8 then box SH206A => waistw; 9994-9996 => 4; 0-799 => 1; 800-879 => 2; => 3; endbox; waistb = waistw; break; endif; enddo; if !womelig then waistw = 4; waistm = 4 endif; { employment last 12 months } if V731 = missing then works = 9 elseif !V731 in 1,2,3 then { not employed last 12 months } works = 1 elseif V741 = missing then works = 9 elseif V741 in 1,2 then works = 2 { employed for cash } else works = 3 { employed, not for cash } endif; { load test data for women and modify hivres1 accordingly } HIVCLUST = HV001; HIVNUMB = HV002; HIVLINE = V003; hivstat = 9; if loadcase( HIVTESTDAT, HIVCLUST, HIVNUMB, HIVLINE ) then box HIV03 => hivstat; 1 => 1; 0,9 => 2; => 9; endbox; endif; { -------------------------------------------------------------------- } { table ah.1 } colt301 = 2; xtab( ah1, rweight ); colt301 = 3; xtab( ah1 ); { -------------------------------------------------------------------- } { table ah.2.1 } colah2 = S1202; xtab( ah21, rweight ); xtab( ah21u ); { --------------------------------------------------------------------------- } { Table 3.9 } colt309 = 2; xtab( t309, rweight ); xtab( t309u ); if S1402 = 1 then colt309 = 1; xtab( t309, rweight ); endif; { --------------------------------------------------------------------------- } { Table 9.14 } cnt = 0; { permission to go } if V467B = 1 then colt914 = 1; xtab( t914, rweight ); cnt = cnt + 1; endif; { getting money } if V467C = 1 then colt914 = 2; xtab( t914, rweight ); cnt = cnt + 1; endif; { distance to health facility } if V467D = 1 then colt914 = 3; xtab( t914, rweight ); cnt = cnt + 1; endif; { go alone } if V467F = 1 then colt914 = 4; xtab( t914, rweight ); cnt = cnt + 1; endif; { at least one problem } if cnt then colt914 = 9; xtab( t914, rweight ); endif; { all women } colt914 = 10; xtab( t914, rweight ); xtab( t914u ); { -------------------------------------------------------------------- } { table ah.3 } colah3 = 3; xtab( ah3, rweight ); xtab( ah3u ); if S1406 = 1 then colah3 = 1; xtab( ah3, rweight ); endif; if S1404 = 1 then colah3 = 2; xtab( ah3, rweight ); endif; { -------------------------------------------------------------------- } { table ah.4 } colah4a = notappl; colah4b = notappl; colah4c = notappl; numresp = 1; if S1404 = 1 then xtab( ah4, rweight ); xtab( ah4u ); numresp = notappl; if S1405A = 1 then colah4a = 1; xtab( ah4, rweight ); endif; if S1405B = 1 then colah4a = 2; xtab( ah4, rweight ); endif; if S1405C = 1 then colah4a = 3; xtab( ah4, rweight ); endif; colah4a = notappl; if S1405D = 1 then colah4b = 1; xtab( ah4, rweight ); endif; if S1405E = 1 then colah4b = 2; xtab( ah4, rweight ); endif; if S1405F = 1 then colah4b = 3; xtab( ah4, rweight ); endif; if S1405G = 1 then colah4b = 4; xtab( ah4, rweight ); endif; colah4b = notappl; if 1 in S1405H,S1405I,S1405J,S1405K,S1405X then colah4c = 1; xtab( ah4, rweight ); endif; colah4c = notappl; endif; { -------------------------------------------------------------------- } { table ah.5, ah.5.w } s1408w = notappl; s1409w = notappl; numwom = notappl; colah5 = 2; xtab( ah5, rweight ); if V012 in 30:59 then xtab( ah5w, rweight ); endif; coltotu = 1; xtab( ah5u ); if S1407 = 1 then colah5 = 1; xtab( ah5, rweight ); if V012 in 30:59 then xtab( ah5w, rweight ); endif; endif; colah5 = notappl; if S1407 = 1 then numwom = 1; s1408w = S1408; s1409w = ( S1409 = 1 ); xtab( ah5, rweight ); coltotu = 2; xtab( ah5u ); endif; { -------------------------------------------------------------------- } { table ah.6 } rowah6b = notappl; cnt = 0; tallyah6( 1, S1410, S1412 ); tallyah6( 2, S1413A, S1416 ); tallyah6( 3, S1413B, S1418 ); tallyah6( 4, S1413C, S1420 ); tallyah6( 5, S1413D, S1422 ); tallyah6( 6, S1413E, S1424 ); tallyah6( 7, S1413F, S1426 ); tallyah6( 8, S1413G, S1428 ); tallyah6( 9, S1413H, S1430 ); rowah6a = notappl; colah6 = 1; rowah6b = 2; xtab( ah6, rweight ); if cnt > 1 then rowah6b = 1; xtab( ah6, rweight ); endif; { -------------------------------------------------------------------- } { table ah.8 } colah8b = notappl; colah8a = 2; xtab( ah8, rweight ); coltotu = 1; xtab( ah8u ); if S1450 = 1 then colah8a = 1; xtab( ah8, rweight ); endif; colah8a = notappl; if S1450 = 1 then colah8b = 4; xtab( ah8, rweight ); coltotu = 2; xtab( ah8u ); box S1451 => colah8b; 1 => 1; 2-3 => 2; 4-30 => 3; => notappl; endbox; xtab( ah8, rweight ); endif; { -------------------------------------------------------------------- } { table ah.9 } colah9b = notappl; if S1450 = 1 then colah9a = 7; xtab( ah9, rweight ); coltotu = 1; xtab( ah9u ); colah9a = S1452; if S1452 = 4 then colah9a = 6 endif; xtab( ah9, rweight ); colah9a = notappl; if S1452 = 5 then colah9b = 2; xtab( ah9, rweight ); coltotu = 2; xtab( ah9u ); if S1453 = 1 then colah9b = 1; xtab( ah9, rweight ); endif; endif; endif; { -------------------------------------------------------------------- } { table ah.10 } colah10b = notappl; colah10a = 3; xtab( ah10, rweight ); coltotu = 1; xtab( ah10u ); if S1443 = 1 then colah10a = 1; xtab( ah10, rweight ); if S1444 = 1 then colah10a = 2; xtab( ah10, rweight ); endif; endif; colah10a = notappl; if S1444 = 1 then colah10b = 8; xtab( ah10, rweight ); coltotu = 2; xtab( ah10u ); if S1445A = 1 then colah10b = 1; xtab( ah10, rweight ); endif; if S1445B = 1 then colah10b = 2; xtab( ah10, rweight ); endif; if S1445C = 1 then colah10b = 3; xtab( ah10, rweight ); endif; if S1445D = 1 then colah10b = 4; xtab( ah10, rweight ); endif; if S1445E = 1 then colah10b = 5; xtab( ah10, rweight ); endif; if S1445F = 1 then colah10b = 6; xtab( ah10, rweight ); endif; if S1445X = 1 then colah10b = 7; xtab( ah10, rweight ); endif; endif; { -------------------------------------------------------------------- } { table ah.11 } colah11b = notappl; colah11c = notappl; colah11a = 2; xtab( ah11, rweight ); coltotu = 1; xtab( ah11u ); if S1446 = 1 then colah11a = 1; xtab( ah11, rweight ); endif; colah11a = notappl; if S1446 = 1 then colah11b = 2; xtab( ah11, rweight ); coltotu = 2; xtab( ah11u ); if S1447 = 1 then colah11b = 1; xtab( ah11, rweight ); endif; endif; colah11b = notappl; if S1447 = 1 then colah11c = 7; xtab( ah11, rweight ); coltotu = 3; xtab( ah11u ); if S1448A = 1 then colah11c = 1; xtab( ah11, rweight ); endif; if S1448B = 1 then colah11c = 2; xtab( ah11, rweight ); endif; if S1448C = 1 then colah11c = 3; xtab( ah11, rweight ); endif; if S1448D = 1 then colah11c = 4; xtab( ah11, rweight ); endif; if S1448E = 1 then colah11c = 5; xtab( ah11, rweight ); endif; if S1448X = 1 then colah11c = 6; xtab( ah11, rweight ); endif; endif; { -------------------------------------------------------------------- } { table ah.11.w } colah11w = 1; if S1447 = 0 then s1449w = S1449; xtab( ah11w, rweight ); endif; { -------------------------------------------------------------------- } { table 33.1 } colp33wb = notappl; colp33wa = 3; xtab( p331, rweight ); coltotu = 1; xtab( p331u ); if S1455 = 1 then colp33wa = 1; xtab( p331, rweight ); if S1457 = 1 then colp33wa = 2; xtab( p331, rweight ); endif; endif; colp33wa = notappl; if S1457 = 1 then colp33wb = 2; xtab( p331, rweight ); coltotu = 2; xtab( p331u ); if S1459 = 1 then colp33wb = 1; xtab( p331, rweight ); endif; endif; { --------------------------------------------------------------------------- } { Table 3.10.1 } tobacco = notappl; numwom = notappl; v463aw = notappl; { cigarettes } if tobaccouse( V464A ) | tobaccouse( V464B ) | tobaccouse( V484A ) | tobaccouse( V484B ) then tobacco = 1; xtab( t3101, rweight ); endif; { other type of tobacco } if tobaccouse( V464D ) | tobaccouse( V464E ) | tobaccouse( V464F ) | tobaccouse( V464G ) | tobaccouse( V484D ) | tobaccouse( V484E ) | tobaccouse( V484F ) | tobaccouse( V484G ) then tobacco = 2; xtab( t3101, rweight ); endif; { any tobacco } if tobacco in 1,2 then tobacco = 3; xtab( t3101, rweight ); endif; tobacco = notappl; box V463AA : V463AD => v463aw; 1-2 : => V463AA; 0 : 1-2 => 3; 0 : 0 => 4; : => 9; endbox; numwom = 1; xtab( t3101, rweight ); xtab( t3101u ); { --------------------------------------------------------------------------- } { Table 3.11.1 } { smokes cigarettes } x = cigaretdaily( V464A ) + cigaretdaily( V464B ); if x then box x => v464w1; 0-4 => 0; 5-9 => 1; 10-14 => 2; 15-800 => 3; => 9; endbox; xtab( t3111, rweight ); xtab( t3111u ); endif; { --------------------------------------------------------------------------- } { Table 3.12 } rowt312 = notappl; { total number } tnumber = 1; xtab( t312, rweight ); tnumber = notappl; { snuff, by mouth } if tobaccouse( V464H ) | tobaccouse( V484H ) then rowt312 = 1; xtab( t312, rweight ); endif; { snuff, by nose } if tobaccouse( V464I ) | tobaccouse( V484I ) then rowt312 = 2; xtab( t312, rweight ); endif; { Chewing tobacco } if tobaccouse( V464J ) | tobaccouse( V484J ) then rowt312 = 3; xtab( t312, rweight ); endif; { other type of smokeless tobacco } if tobaccouse( V464L ) | tobaccouse( V484L ) then rowt312 = 5; xtab( t312, rweight ); endif; { any type of smokeless tobacco } if rowt312 in 1:5 then rowt312 = 6; xtab( t312, rweight ); endif; { any type of tobacco } if V463AA in 1,2 | V463AB in 1,2 then rowt312 = 7; xtab( t312, rweight ); endif; { ---------------------------------------------------------------------------- } { tables ah.12 } if V012 in 15:49 & V208 then s1217w = S1217; if S1217 = notappl then s1217w = 0 endif; s1219w = S1219; if S1219 = notappl then s1219w = 0 endif; box S413E(1) => s413ew; 0 => 2; => S413E(1); endbox; xtab( ah12, rweight ); xtab( ah12u ); endif; { --------------------------------------------------------------------------- } { Table ah.14 } tnumber = 1; s1223w = S1223; xtab( ah14, rweight ); xtab( ah14u ); { -------------------------------------------------------------------- } { table 32.1 } drinks = NaToZero(S1227A) + NaToZero(S1227B) + NaToZero(S1227C) + NaToZero(S1227D) + NaToZero(S1227E) + NaToZero(S1227F) + NaToZero(S1227G) + NaToZero(S1227H); colp32 = notappl; numwom = notappl; if S1224 = 1 then colp32 = 1; xtab( p321, rweight ); if S1225 = 1 then colp32 = 2; xtab( p321, rweight ); if drinks then colp32 = 3; xtab( p321, rweight ); endif; if S1227A in 5:90 | S1227B in 5:90 | S1227C in 5:90 | S1227D in 5:90 | S1227E in 5:90 | S1227F in 5:90 | S1227G in 5:90 | S1227H in 5:90 | S1232 = 1 then colp32 = 4; xtab( p321, rweight ); endif; x = ( S1228 = 1 ) + ( S1229 = 1 ) + ( S1230 = 1 ) + ( S1231 = 1 ); if x >= 2 then colp32 = 5; xtab( p321, rweight ); endif; endif; endif; colp32 = notappl; numwom = 1; xtab( p321, rweight ); xtab( p321u ); { ---------------------------------------------------------------------------- } { tables ah.15 } if V012 in 15:49 & V208 then s1236w = S1236; if S1236 = notappl then s1236w = 0 endif; box S413D(1) => s413dw; 0 => 2; => S413D(1); endbox; xtab( ah15, rweight ); xtab( ah15u ); endif; { ---------------------------------------------------------------------------- } { tables 35.w & 35.1, ah.bp21, ah.bp31 } box S1224 : S1225 : drinks => alcohol; 0 : : => 5; : 1 : 0 => 3; : 1 : => 2; : 0 : => 4; : : => notappl; endbox; box V463AA : V463AB => tobacad; 1 : => 1; : 1 => 1; : => 2; endbox; measw = notappl; measured = 0; for i in RECH8_EDT do if V003 = IDXH8 then if ValidPressure( SH221A, SH221B ) then measured = 1 ; presstake = 0; systolic = 0; diastolic = 0; if ValidPressure( SH228A, SH228B ) then systolic = systolic + SH228A; diastolic = diastolic + SH228B; presstake = presstake + 1; endif; if ValidPressure( SH232A, SH232B ) then systolic = systolic + SH232A; diastolic = diastolic + SH232B; presstake = presstake + 1; endif; if presstake in 1,2 then systolic = int( systolic / presstake ); diastolic = int( diastolic / presstake ); else systolic = SH221A; diastolic = SH221B; endif; measw = presstake; endif; xline = i; break; endif; enddo; colp35w = 2; xtab( p35w ); if measured then colp35w = 1; xtab( p35w ); { tables 35.1, ah.bp21 } colp35a = notappl; colp35b = notappl; colp35c = 5; xtab( p351, rweight ); xtab( p351u ); freq include( measw ); s1306w = S1306; s223w = SH223(xline); xtab( ahbp21, rweight ); xtab( ahbp21u ); { numerators for means } colp35c = 3; xtab( p351, systolic*rweight ); colp35c = 4; xtab( p351, diastolic*rweight ); colp35a = ( systolic >= 140 | diastolic >= 90 | SH224(xline) = 1 ); colp35b = ClassifyPressure( systolic, diastolic ); colp35c = ( colp35b in 1:3 & SH224(xline) = 1 ); xtab( p351, rweight ); xtab( ahbp21, rweight ); { tables ah.bp31 } colhbp31 = 7; xtab( ahbp31, rweight ); xtab( ahbp31u ); if colp35a then colhbp31 = 1; xtab( ahbp31, rweight ); endif; if colp35b in 4:6 then colhbp31 = 2; xtab( ahbp31, rweight ); endif; if SH224(xline) = 1 then colhbp31 = 3; xtab( ahbp31, rweight ); endif; if colp35b in 1:3 & SH224(xline) = 1 then colhbp31 = 4; xtab( ahbp31, rweight ); endif; if colp35b in 4:6 & SH224(xline) = 1 then colhbp31 = 5; xtab( ahbp31, rweight ); endif; endif; { ---------------------------------------------------------------------------- } { tables ah.16x } numresp = 1; s1304w = S1304; s1305w = S1305; s1306w1 = S1306; s1307w = S1307; xtab( ah16x, rweight ); xtab( ah16xu ); { ---------------------------------------------------------------------------- } { tables ah.16xw } numresp = 1; s1304w2 = S1304; s1305w2 = S1305; s1306w2 = S1306; s1307w2 = S1307; xtab( ah16xw, rweight ); xtab( ah16xwu ); { ---------------------------------------------------------------------------- } { tables ah.16 } numresp = 1; box measured : colp35b => bloodp; 1 : 1 => 1; 1 : 2-3 => 2; 1 : 4-6 => 3; : => 9; endbox; s1306w2 = S1306; s1308w = S1308; xtab( ah16, rweight ); xtab( ah16u ); { ---------------------------------------------------------------------------- } { tables ah.16b } colah16b = 5; xtab( ah16b, rweight ); xtab( ah16bu ); if S1309 > 0 then colah16b = 1; xtab( ah16b, rweight ); endif; if S1310 > 0 then colah16b = 2; xtab( ah16b, rweight ); endif; if S1312 = 1 then colah16b = 4; xtab( ah16b, rweight ); endif; { ---------------------------------------------------------------------------- } { tables ah.16c } s1311w2 = notappl; s1312w1 = notappl; s1312w2 = notappl; s1311w1 = 2; xtab( ah16c, rweight ); coltotu = 1; xtab( ah16cu ); if S1311 = 1 then s1311w1 = 1; s1311w2 = 2; xtab( ah16c, rweight ); coltotu = 2; xtab( ah16cu ); s1311w1 = notappl; xtemp = 200*NAToZero(S1311A1) + 330*NAToZero(S1311A2) + 500*NAToZero(S1311A3) + 1000*NAToZero(S1311A4) + 2000*NAToZero(S1311A5); s1311w2 = 1; xtab( ah16c, xtemp*rweight ); endif; s1311w1 = notappl; s1311w2 = notappl; s1312w1 = 2; xtab( ah16c, rweight ); coltotu = 3; xtab( ah16cu ); if S1312 = 1 then s1312w1 = 1; s1312w2 = 2; xtab( ah16c, rweight ); coltotu = 4; xtab( ah16cu ); s1312w1 = notappl; xtemp = 200*NAToZero(S1312A1) + 200*NAToZero(S1312A2); s1312w2 = 1; xtab( ah16c, xtemp*rweight ); endif; { ---------------------------------------------------------------------------- } { tables 11.12.1, 11.12.3 } if womelig then { if respondent eligible } if V445 in 0:9990 then ybmi = V445 / 100; xbmi = int( ybmi*10 ); else xbmi = missing; endif; endif; { end respondent eligible } col1112b = notappl; if !V437 in 9994:9999 & !V438 in 9994:9999 then if V438 < 1450 then col1112a = 1; xtab( t11121, rweight ); endif; col1112a = 2; xtab( t11121, rweight ); coltotu = 1; xtab( t11121u ); col1112a = notappl; if womelig & V445 in 0:9990 then { Table 11.12.1 } col1112b = 1; xtab( t11121, ybmi*rweight ); box xbmi => col1112b; <170 => 5; 170-184 => 4; 185-249 => 2; 250-299 => 7; 300-600 => 8; => notappl; endbox; xtab( t11121, rweight ); col1112b = 9; xtab( t11121, rweight ); coltotu = 2; xtab( t11121u ); { Table 11.12.3 } bmi35 = 2; xtab( t11123, rweight ); xtab( t11123u ); if xbmi >= 350 then bmi35 = 1; xtab( t11123, rweight ); endif; endif; endif; { end respondent measured } { ---------------------------------------------------------------------------- } { tables ah.17.1 } if womelig then colah17a = notappl; colah17b = notappl; xwaist = notappl; for i in RECH8_EDT do if V003 = IDXH8 then if SH206A in 500:2000 then xwaist = SH206A / 10; colah17a = 1; xtab( ah171, xwaist*rweight ); colah17a = 5; xtab( ah171, rweight ); coltotu = 1; xtab( ah171u ); if waistw in 1:3 then colah17a = waistw + 1; xtab( ah171, rweight ); endif; endif; break; endif; enddo; colah17a = notappl; if xwaist <> notappl & V438 in 1000:2500 then whtr = xwaist*10 / V438; colah17b = 1; xtab( ah171, whtr*rweight ); colah17b = 3; xtab( ah171, rweight ); coltotu = 2; xtab( ah171u ); if whtr >= 0.50 then colah17b = 2; xtab( ah171, rweight ); endif; endif; { end respondent eligible } endif; { ---------------------------------------------------------------------------- } { Table 11.13.1 } { HH selected for hemoglobin (anemia) and test was given to the respondent } if V042 = 1 & V455 = 0 then box V201 => parity; 0 => 0; 1 => 1; 2,3 => 2; 4,5 => 3; => 4; endbox; if V012 >= 50 then parity = notappl endif; preg = ( V213 = 1 ); bfdg = ( V404 = 1 ); box preg : bfdg => pregbf1; 1 : => 1; : 1 => 2; : => 3; endbox; if V012 >= 50 then pregbf1 = notappl endif; box V312 => useiud; 2 => 1; => 2; endbox; { smokes cigarettes } if V464A = notappl & V464B = notappl & V484A = notappl & V484B = notappl then smokes = notappl; elseif V464A = missing & V464B = missing & V484A = missing & V484B = missing then smokes = 9 else smokes = ( V464A in 1:888 | V464B in 1:888 | V484A in 1:888 | V484B in 1:888 ); if !smokes then smokes = 2 endif; endif; anemiaw = 5; { all women } xtab( t11131, rweight ); xtab( t11131u ); if V457 in 1:3 then { any anemia } anemiaw = 1; xtab( t11131, rweight ); endif; box V457 => anemiaw; { adjusted level of anemia } 3 => 2; { any } 2 => 3; { mild } 1 => 4; { sever } => notappl; endbox; xtab( t11131, rweight ); endif; { ---------------------------------------------------------------------------- } { Table ah.19.1, ah.19.1.a } box S1413F : S1426 => diabet; 1 : 1 => 2; 1 : 0 => 3; 1 : 8 => 4; 0 : => 5; 8 : => 8; endbox; for i in RECH8_EDT do if V003 = IDXH8 then x = loadcase( TESTDURATION, SH274 ); if SHWHBA1C <> notappl & x & TDAYS <= 60 then if SH277 = 1 then if MedWomen( 6 ) then // diabetes diabmed = 1 else diabmed = 2 endif; else diabmed = 3 endif; xtemp = int( (SHWHBA1C-228)/0.9866 + 0.5 ); box xtemp => colah19b; 0-5699 => 1; 5700-6499 => 2; 6500-25000 => 3; => notappl; endbox; xtab( ah191a, rweight ); xtab( ah191au ); box SHWHBA1C => colah19b; 0-5699 => 1; 5700-6499 => 2; 6500-25000 => 3; => notappl; endbox; xtab( ah191b, rweight ); endif; break; endif; enddo; { ---------------------------------------------------------------------------- } { Table ah.20.1, ah.20w } colah20 = 5; xtab( ah201, rweight ); xtab( ah201u ); if S1432 = 1 then colah20 = 1; xtab( ah201, rweight ); endif; if S1433 = 1 & S1434 = 1 & S1435 = 1 then colah20 = 2; xtab( ah201, rweight ); endif; if S1436 = 1 | S1437 = 1 | S1438 = 1 then colah20 = 3; xtab( ah201, rweight ); endif; if S1439 = 1 & S1440 = 1 & S1441 = 1 then colah20 = 4; xtab( ah201, rweight ); colah20w = 2; xtab( ah20wu ); xtab( ah20w, rweight ); colah20w = 1; xtab( ah20w, S1442*rweight ); endif; { ---------------------------------------------------------------------------- } { Table ah.21 } colah21 = 1; for i in RECH8_EDT do consent = ( SH202D = 1 | SH211 = 1 | SH250 = 1 | HA52(i) = 1 | HA61(i) = 1 | HA64(i) = 1 ); if consent & V003 = IDXH8 then rowah21 = 0; if SH277 = 1 then if MedWomen( 2 ) then // tuberculosis rowah21 = 2; xtab( ah21m, rweight ); endif; if MedWomen( 8 ) then // asthma and chronic bronchitis rowah21 = 8; xtab( ah21m, rweight ); endif; if MedWomen( 6 ) then // diabetes rowah21 = 6; xtab( ah21m, rweight ); endif; if MedWomen( 5 ) then // high cholesterol rowah21 = 5; xtab( ah21m, rweight ); endif; if MedWomen( 3 ) then // hypertension rowah21 = 3; xtab( ah21m, rweight ); endif; if MedWomen( 4 ) then // heart and stroke-related rowah21 = 4; xtab( ah21m, rweight ); endif; if MedWomen( 9 ) then // arthritis rowah21 = 9; xtab( ah21m, rweight ); endif; if MedWomen( 10 ) then // osteoporosis rowah21 = 10; xtab( ah21m, rweight ); endif; if MedWomen( 11 ) then // epilepsy rowah21 = 11; xtab( ah21m, rweight ); endif; if MedWomen( 1 ) then // HIV rowah21 = 1; xtab( ah21m, rweight ); endif; if MedWomen( 12 ) then // pain rowah21 = 12; xtab( ah21m, rweight ); endif; if MedWomen( 13 ) then // Psychiatric rowah21 = 13; xtab( ah21m, rweight ); endif; if MedWomen( 98 ) then // other chronic rowah21 = 98; xtab( ah21m, rweight ); endif; elseif SH277 = 4 then // refused rowah21 = 14; xtab( ah21m, rweight ); endif; if !rowah21 in 0,14 then // any condition rowah21 = 15; xtab( ah21m, rweight ); endif; rowah21 = 16; // number of respondents xtab( ah21m, rweight ); break; endif; enddo;