SURVEY contains data from a questionnaire about diet and exercise habits.
SAS enables you to use a special notation for missing values. In the EDUC
column, the
.x
notation indicates that the respondent gave an answer that is not
valid, and
.n
indicates that the respondent did not answer the question. A period
as a missing value indicates a data entry error.
data survey;
input id $ diet $ exer $ hours xwk educ;
datalines;
1001 yes yes 1 3 1
1002 no yes 1 4 2
1003 no no . . .n
1004 yes yes 2 3 .x
1005 no yes 2 3 .x
1006 yes yes 2 4 .x
1007 no yes .5 3 .
1008 no no . . .
;