Chapter Contents

Previous

Next

Special Missing Values


Definition

special missing value
is a type of numeric missing value that enables you to represent different categories of missing data by using the letters A-Z or an underscore.


Tips


Example

The following example uses data from a marketing research company. Five testers were hired to test five different products for ease of use and effectiveness. If a tester was absent, there is no rating to report, and the value is recorded with an X for "absent." If the tester was unable to test the product adequately, there is no rating, and the value is recorded with an I for "incomplete test." The following program reads the data and displays the resulting SAS data set. Note the special missing values in the first and third data lines:

data period_a;
  missing X I;
  input Id $4. Foodpr1 Foodpr2 Foodpr3 Coffeem1 Coffeem2;
  datalines;
1001 115 45 65 I 78
1002 86 27 55 72 86
1004 93 52 X 76 88
1015 73 35 43 112 108
1027 101 127 39 76 79
  ;

proc print data=period_a;
  title 'Results of Test Period A';
  footnote1 'X indicates TESTER ABSENT';
  footnote2 'I indicates TEST WAS INCOMPLETE';
run;

The following output is produced:

Output with Multiple Missing Values
                   Results of Test Period A
 Obs   Id    Foodpr1    Foodpr2    Foodpr3   Coffeem1   Coffeem2

 1    1001     115         45         65          I         78
 2    1002      86         27         55         72         86
 3    1004      93         52          X         76         88
 4    1015      73         35         43        112        108
 5    1027     101        127         39         76         79

                   X indicates TESTER ABSENT
                I indicates TEST WAS INCOMPLETE


Chapter Contents

Previous

Next

Top of Page

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