Hi,
I ran the following program
proc format lib=formtlib;
value $answer
'0'='No'
'1'='Yes'
other='Did not answer';
data cody.Taxes;
informat SSN $11. Gender $1. Question_1 - Question_4 $1.;
input SSN Gender Question_1 - Question_5;
datalines;
101-23-1928 M 1 3 C 4 23000
919-67-7800 F 9 2 D 2 17000
202-22-3848 M 0 5 A 5 57000
344-87-8737 M 1 1 B 2 34123
444-38-2837 F . 4 A 1 17233
763-01-0123 F 0 4 A 4 .
;
title 'Frequencies for the Taxes Data Set';
proc freq data=cody.taxes;
format Question_1 $answer.;
tables Question_1;
run;
So from the datalines, you can see that the six observations to question 1 is 1, 9, 0, 1, . , 0.
So I have two "1", two "0", one "9" and one "."
the freq print out is
and since I have defined my format as
proc format lib=formtlib;
value $answer
'0'='No'
'1'='Yes'
other='Did not answer';
so I don't understand is that why are both the "9" and "." classified as missing value and not as "other" ?
"9" is pretty obvious should be other right? It is not "0" or "1" and it is not missing.
"." is also not missing because in the informat, I specified it to be character value, so it should be not missing since only " " is considered missing for character variable.
... View more