%newsas(sampleg); %include goptions; *include macros(density); %let maxf=20; goptions ftext=duplex htitle=1.6 htext=1.5 vsize=7.5in ; data stat1 stat2; set stats; if nullhyp=' TRUE' then output stat1; else output stat2; run; %density(data=stat1, var=F, out=dens1, xfirst=0, xlast=&maxf); %density(data=stat2, var=F, out=dens2, xfirst=0, xlast=&maxf); data density; set dens1(in=in1) dens2(in=in2); if in1 then nullhyp=' TRUE'; else nullhyp='FALSE'; *proc print; proc gplot data=density; plot density * F = nullhyp / legend=legend1 vaxis=axis1 haxis=axis2 hm=4 vm=1 href=3.36 lhref=33 chref=blue; symbol1 i=sm20 v=none c=black l=1; symbol2 i=sm20 v=none c=red l=2; axis1 order=(0 to .5 by .1) label=(a=90) ; axis2 order=(0 to &maxf by 10) label=('Observed F value'); legend1 label=('Null hypothesis:'); run; %gfinish;