03-24-2014 02:55 PM
I have data from a survey and would like the response options which ended up having a 0 count to be shown in the tables I made in proc freq.
Seems like a simple problem to fix, but i have yet to find a solution.
03-24-2014 03:18 PM
If it appears in other fields you can try the sparse option.
proc freq data=have;
If it doesn't appear anywhere in your data you'll need to use proc tabulate or a different proc with the the preloadfmt option.
03-24-2014 05:31 PM
I would recommend using 1) custom formats and 2) Proc Tabulate, Means or Report with the Preloadfmt option
proc format library=work;
do i = 1 to 5; x=1;output;end;
do i = 1 to 3; x=2;output;end;
do i = 1 to 4; x=7;output;end;
proc tabulate data=junk;
class x / preloadfmt missing;
format x yndr.;
table x, n='Count'
The misstext to show the zero for a missing count, otherwise it will display your current default for missing values.