06-07-2017 08:41 AM
I am associating a user defined format with a variable and generating a freq report. I want to see all values of proc format in the report, even though they may not be in the dataset. Below is an example.
proc freq data=test;
tables a/list missing sparse;
format a test.;
The resulting report does not show the 11-15 range since it is not in the dataset. I want to show missing for 11-15.
06-07-2017 09:14 AM
PRELOOADFMT is the option your looking for, in combination with PROC TABULATE.
Proc tabulate data = have; Class a / preloadfmt missing; Format a test.; Table a; Run;
06-07-2017 11:45 AM
Tabulate has several percentage calculators available. You might try
Proc tabulate data = have;
Class a / preloadfmt missing;
Format a test.;
06-07-2017 12:39 PM
Try adding the PRINTMISS option after the TABLE statement.
See the example in the docs: