貌似timeseries也可以解决,例如:
proc sort data=sashelp.stocks out=stocks;
by date;run;
ods graphics on;
proc timeseries data=stocks out=nstock plot=(series);
id date interval=day accumulate=median;
var open high low close;
run;
ods graphics off;
See the example below . It plots 4 graphs together.
data test;
do x=-4 to 4 by 0.1;
pdf1=pdf('normal',x);
pdf2=pdf('normal',x, 0.2, 1.2);
cdf1=cdf('normal',x);
cdf2=cdf('normal',x, 0.2, 1.2);
output;
end;
run;
data test;
do x=-4 to 4 by 0.1;
pdf1=pdf('normal',x);
pdf2=pdf('normal',x, 0.2, 1.2);
cdf1=cdf('normal',x);
cdf2=cdf('normal',x, 0.2, 1.2);
output;
end;
run;
title "normal pdf and cdf";
proc sgplot data=test ;
series x=x y=pdf1;
series x=x y=pdf2;
series x=x y=cdf1/y2axis;
series x=x y=cdf2/y2axis;
yaxis values=(0 to 0.5 by 0.05) grid;
xaxis values=(-4 to 4 by 0.5) grid;