04-19-2016 12:53 AM
I want to find the min value.
i found this code
set t end=last;
And it's giving the right solution.I want to ask that initially the value of y is missing and if we using min(y,x) then it should come as missing value as missing value has the lowest priority, then how come it is coming 10 . Please explain.
04-19-2016 01:32 AM
.. the min function only returns a missing value, if all arguments are missing. This is simply how the function works.
04-19-2016 01:45 AM
All those summary functions (max, min, sum, ...) have the advantage that they return a non-missing value as long as one of the arguments is non-missing. If you want a missing value treated as the minimum, you will have to code that manually.
04-19-2016 02:11 AM
Although it works I would highly recommend using proc means instead.
Proc means data=have stackods min max; Var x; ODS output summary=want; Run; Proc print data=want; Run;