Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The FREQ Procedure

Missing Values

By default, PROC FREQ excludes missing values before it constructs the frequency and crosstabulation tables. PROC FREQ also excludes missing values before computing statistics. However, the total frequency of observations with missing values is displayed below each table. The following options change the way in which PROC FREQ handles missing values:

MISSPRINT
includes missing value frequencies in frequency or crosstabulation tables.

MISSING
includes missing values in percentage and statistical calculations.

The OUT= option in the TABLES statement includes an observation in the output data set that contains the frequency of missing values. The NMISS option in the OUTPUT statement creates a variable in the output data set that contains the number of missing values.

Figure 28.7 shows three ways in which PROC FREQ handles missing values. The first table uses the default method; the second table uses the MISSPRINT option; and the third table uses the MISSING option.

 

*** Default ***
The FREQ Procedure
A Frequency Percent Cumulative
Frequency
Cumulative
Percent
1 2 50.00 2 50.00
2 2 50.00 4 100.00
Frequency Missing = 2

 

 


*** MISSPRINT Option ***
The FREQ Procedure
A Frequency Percent Cumulative
Frequency
Cumulative
Percent
. 2 . . .
1 2 50.00 2 50.00
2 2 50.00 4 100.00
Frequency Missing = 2

 

 


*** MISSING Option ***
The FREQ Procedure
A Frequency Percent Cumulative
Frequency
Cumulative
Percent
. 2 33.33 2 33.33
1 2 33.33 4 66.67
2 2 33.33 6 100.00

Figure 28.7: Missing Values in Frequency Tables

When a combination of variable values for a crosstabulation is missing, PROC FREQ assigns zero to the frequency count for the table cell. By default, PROC FREQ omits missing combinations in list format and in the output data set that is created in a TABLES statement. To include the missing combinations, use the SPARSE option with the LIST or OUT= option in the TABLES statement.

PROC FREQ treats missing BY variable values like any other BY variable value. The missing values form a separate BY group. When the value of a WEIGHT variable is missing, PROC FREQ excludes the observation from the analysis.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.