I want to generate the median of a variable, and I understand that PROC SQL is only capable of calc median horizontally and not vertically. Now my question is, if I use proc means, is there a way to output the median to a macro variable? I'm hoping to find a more code-efficient way instead of having to write another datastep to call symput to a macro variable.
my current code:
proc means data=tmp_aaa noprint;
var pvol;
output out=tmp_median_aaa median=tmp_median_aaa;
;
run;
data tmp_median_aaa;
set tmp_median_aaa;
call symput('tmp_median_aaa', tmp_median_aaa);
run;