Hi, I have a SAS program that is reading in death(mortality) data by age and I created the following code for five age groups: IF AGE GE 0 AND AGE lt 17 THEN AGEGP1="0-17"; ELSE IF 18<=AGE<=29 THEN AGEGP1="18-29"; ELSE IF 30<=AGE<=44 THEN AGEGP1="30-44"; ELSE IF 45<=AGE<=64 THEN AGEGP1="45-64"; ELSE IF AGE ge 65 THEN AGEGP1="65+"; ELSE AGEGP1=" "; Next, I run the following Proc Freq: proc freq data=deaths_&year. noprint; tables RACEGP*AGEGP1*SEXGP/out=TEST_totall; run; I know I wouldn't see any deaths for example in "Alzheimers Disease" in the younger age groups(0-17, 18-29, 30-44), therefore they wouldn't show in the output dataset. However, I want to keep all of the age groups in the output dataset and assign 0 to the age groups that don't have any observations for a given cause of death. My final output dataset should display all 5 of the age groups. Can anyone please advise or suggest how to code for this? Thanks.
... View more