I know that there is the NOMISSING option to ignore missing values entirely, but I just want to be able to treat nulls in numeric fields as equal to a zero, but not equal to any non-zero value. Is this possible?
@Martin_Bryant wrote:
I know that there is the NOMISSING option to ignore missing values entirely, but I just want to be able to treat nulls in numeric fields as equal to a zero, but not equal to any non-zero value. Is this possible?
I don't see an option to tread missing values as zeros. Attaching a format to the variable does not work as expected, same for using the missing-option.
Nope. You could make versions of your data that replace missing with zero and then compare those versions.
proc stdize data=A out=A_zero missing=0 reponly;
var _numeric_;
run;
proc stdize data=B out=B_zero missing=0 reponly;
var _numeric_;
run;
proc compare data=A_zero compare=B_zero ;
run;
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.