* Smoke3 Example Display some of the data in the mcic-smoke dataset using the hbar option of proc sgplot; options ls=64 nodate pageno=1; proc format; value SMOKE 1='Yes' 2='No' 7='Refused'; value GENDER 1='Male' 2='Female' 7='Refused'; value EDUC 1='< 4th Grade' 2='5th - 8th Grade' 3='9th - 12th Grade, No Diploma' 4='High School Degree' 5='Trade School' 6='Some College' 7='College Degree' 8='Some Graduate Study' 9='Graduate Degree' 10="Hs Grad, Non Spec."; data smoke; infile 'c:/datasets/mcic-smoke.txt' dlm='09'x dsd firstobs=2; input idnum smoke sex01 ag raceth inc4gp rel1 resped; label smoke='Does subject smoke?' sex01='Sex of subject' resped='Education level'; format smoke SMOKE. sex01 GENDER. resped EDUC.; if resped=97 or resped=98 then delete; proc sgplot data=smoke; title 'Smoking status of subjects'; hbar smoke / stat=freq; proc sgplot data=smoke; title 'Education level of subjects'; hbar resped / stat=freq; proc sgplot data=smoke; title 'Smoking status by education level'; hbar resped / stat=freq group=smoke; run; quit;