I want to output an extended Proc Means
for my data. The standard is N, Min, Max, Std mean
but I need also Median.
I have a lot of variables so I do not want to specify each individually after the output out= statement like median(var1)=var1_median
etc.
The following does not work and just gives me the standard outputs:
proc means data=have n mean median std;
output out= want_means (drop=_type_ _freq_);
run;
this one also doesnt work:
proc means data=have n mean median std;
var volume price [xyz variables];
output out= want_means (drop=_type_ _freq_);
run;
I now use the following ,which works for me (note that I have to transpose it to have observations and not X variables...
proc means data=have;
output out= want(drop=_type_ _freq_)
n= mean= median= std= /autoname ;
run;
proc transpose data=want
out=want; run;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.