how do you use PROC FREQ to produce frequencies without percentages in SAS?

The PROC FREQ procedure in SAS can be used to create a frequency table of the values in a given dataset without percentages. This can be done by specifying the TABLES statement with only the variables of interest, while omitting the WEIGHT statement from the PROC FREQ syntax. Additionally, the option NOPRINT can be added to the PROC FREQ syntax to suppress the default output table.


You can use the following methods with PROC FREQ in SAS to create frequency tables and suppress any percentage values in the resulting tables:

Method 1: Suppress Percentages in One-Way Frequency Table

proc freq data=my_data order=freq;
    tables my_variable / nopercent nocum;
run;

Method 2: Suppress Percentages in Two-Way Frequency Table

proc freq data=my_data order=freq;
    tables my_variable1*my_variable2 / norow nocol nopercent nocum;
run;

The following examples shows how to use each method in practice with the SAS built-in dataset called , which contains various characteristics for 100,000 mothers that recently gave birth.

We can use PROC PRINT to view the first 10 observations from this dataset:

/*view first 10 observations from BirthWgt dataset*/
proc print data=sashelp.BirthWgt (obs=10);

run;

Example 1: Suppress Percentages in One-Way Frequency Table

We can use the following code to create a frequency table for the Race variable:

/*create frequency table for Race variable*/
proc freq data=sashelp.BirthWgt;
	tables Race;
run;

frequency table in SAS

By default, SAS displays percentages in the frequency table.

To suppress the percentages, we can use the nopercent and nocum statements:

/*create frequency table for Race variable and suppress percentages*/ 
proc freq data=sashelp.BirthWgt;
    tables Race / nopercent nocum;
run;

SAS PROC FREQ with no percentages

Example 2: Suppress Percentages in Two-Way Frequency Table

We can use the following code to create a two-way frequency table for the Race and Married variables:

/*create frequency table for Race and Married variables*/
proc freq data=sashelp.BirthWgt;
	tables Race*Married;
run;

By default, SAS displays percentages for overall percent, row percent, and column percent for each cell in the frequency table.

To suppress the percentages, we can use the norow, nocol and nopercent statements:

/*create frequency table for Race and Married variables and suppress percentages*/ 
proc freq data=sashelp.BirthWgt;
    tables Race*Married / norow nocol nopercent;
run;

SAS frequency table with no row and no column percentages

Notice that the frequency table only shows frequency values and no percentage values for each cell in the table.

The following tutorials explain how to perform other common tasks in SAS:

x