Suppressing Table Information

Another way to control the format of crosstabulations is to limit the output of the FREQ procedure to a few specific statistics. Remember that when crosstabulations are run, PROC FREQ produces tables with cells that contain:

  • cell frequency
  • cell percentage of total frequency
  • cell percentage of row frequency
  • cell percentage of column frequency.

You can use options to suppress any of these statistics. To control the depth of crosstabulation results, add any combination of the following options to the TABLES statement:

  • NOFREQ suppresses cell frequencies
  • NOPERCENT suppresses cell percentages
  • NOROW supresses row percentages
  • NOCOL suppresses column percentages.


Example

Suppose you want to use only the percentages of Sex and Weight combinations in the data set Clinic.Diabetes. To block frequency counts and row and column percentages, add the NOFREQ, NOROW, and NOCOL options to your program's TABLES statement.

     proc format;
        value wtfmt low-139='< 140'
                    140-180='140-180'
                    181-high='> 180';
     run;
     proc freq data=clinic.diabetes;
        tables sex*weight / nofreq norow nocol;
        format weight wtfmt.;
     run;

Percent
Table of Sex by Weight
Sex Weight Total
< 140 140-180 > 180
F 10.00 45.00 0.00 55.00
M 0.00 5.00 40.00 45.00
Total 2
10.00
10
50.00
8
40.00
20
100.00


Notice that Percent is the only statistic that remains in the table's legend box.