07-16-2013 02:15 PM
I tried to format a numeric variable into two categories. But when I ran the frequencies for it, the program treated 'OTHER' missing. Here is my syntax:
format var_process $process.;
format general_outcome outcome.;
For general_outcome, only 'Done' was tabulated. When missing values were included, 'Not participating' was tabulated
Has anyone experienced this?
07-16-2013 03:41 PM
By default, missing values are tallied separately by PROC FREQ. If you want them as part of the table, add the MISSING option:
tables general_outcome * var_process / missing;
The addition of a FORMAT statement doesn't affect the process.
07-16-2013 04:16 PM
But since I set 'OTHER' values as 'Not participating', there is no missing values in my data. Only two values include 'Done' and 'Not participating' (value outcome 1-2='Done' OTHER='Not participating';). The problem is SAS treated 'OTHER' values as missing while it should treat other values as 'Not participating'.
07-16-2013 04:53 PM
No, that's not quite right. Adding a format does not change what is in your data. Not in any way. You still have missing values in your data.
Adding a format changes what characters print, instead of printing the actual values in your data.