Date: Fri, 20 Jun 1997 08:50:29 -0500
Reply-To: Louis Fox <louis@ETHOS.WUSTL.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Louis Fox <louis@ETHOS.WUSTL.EDU>
Subject: Re: Medians in Proc Tabulate
Joe,
Proc tabulate does have a limited list of summary stats. Since the median isn't on
that limited list, it has to be generated somewhere else. Something like the following
works for me. Actually, any summary statistic can be generated and displayed in this
manner.
proc univariate data=old noprint;
var varname;
output out=new median=mednvar;
run;
data old;
set old;
if _n_=1 then set new;
run;
proc tabulate data=old;
class classvar;
var mednvar;
table classvar,
mednvar*mean='Median';
run;
Hope this helps (or at least doesn't hinder).
Louis Fox
Statistical Data Analyst
Department of Psychiatry
Washington University School of Medicine
St. Louis, MO