This is one of the best procedures for descriptive statistics in SAS. This procedure provides descriptive statistics, histograms that optionally can be fitted with probability density curves, cumulative distribution function plots, quantile-quantile plots (Q-Q plots), probability plots, and probability-probability plots (P-P plots), goodness-of-fit tests for a variety of distributions including the normal.
This procedure is a powerful procedure that has the ability to inset summary statistics on plots, analyze data sets with a frequency variable, and create output data sets containing summary statistics, histogram intervals, and parameters of fitted curves
proc sort data=dataname1; by var2;
proc univariate data=dataname1
noprint
nextrobs=10
freq
plot;
var var10 var4;
histogram / vscale= var10
vaxis=0 to 6000 by 500
vminor=100
midpoints= 0 to 15 by 1
normal
weibull
lognormal
gamma;
inset n
min
max
sum
mean(5.3)
std='Std Dev'(5.3)
skewness(5.3)
/ pos = ne
header = 'Summary Statistics';
by var2;
id var10 var6 var4;
where var3 > 100;
output out=Meansdata mean=nMean aadtMean;
output out=nStats mean=nMean std=nSD min=nMin max=nMax;
run;