options nodate pagesize=54 linesize=80; /* Read in the input file */ /* Then Give qualitative levels for fsmksts and currsts */ data ex0104; * infile '../../../data/biostat/ex0104.dat'; infile 'C:\\biostat\\data\\ex0104.dat'; input smksts; length fsmksts $20.; if smksts=1 then fsmksts='Never Smoke'; else if smksts=2 then fsmksts='Quit>10 Years ago'; else if smksts=3 then fsmksts='Quit<10 Years ago'; else if smksts=4 then fsmksts='Current Cigarette'; else if smksts=5 then fsmksts='Current Other'; length currsts $12.; if smksts <= 3 then currsts='Not Current'; else if smksts > 3 then currsts='Current'; run; /* Get frequency distributions for fsmksts and currsts */ proc freq order=data; tables fsmksts; run; proc freq; tables currsts; run; quit;