%newsas(nqpdemo); title 'Normal Quantile plot for various distributions'; data demo; retain seed 157565459; * retain seed 528329871; drop seed z df i j; label x1='NORMAL DATA' x2='NORMAL W/ OUTLIERS' x3='POSITIVE SKEW' x4='LONG TAILED'; do i=1 to 100; x1 = rannor(seed); * normal (0,1); if i < 99 then x2 = rannor(seed); * normal (0,1) with outliers; else x2 = 3 + rannor(seed); x3 = 0; df = 3; do j=1 to df; z = rannor(seed); x3 = x3 + z**2; * chisq (3); end; x4 = sqrt(df) * rannor(seed) / sqrt(x3); * t(3); output; end; run; proc rank normal=blom data=demo out=quantile; var x1-x4; ranks z1-z4; options nodate nonotes; proc plot hpercent=50 vpercent=50 nolegend; plot x1 * z1='*' z1 * z1='.' / overlay ; plot x2 * z2='*' z2 * z2='.' / overlay ; plot x3 * z3='*' z3 * z3='.' / overlay ; plot x4 * z4='*' z4 * z4='.' / overlay ; label z1='Expected Normal Quantile' z2='Expected Normal Quantile' z3='Expected Normal Quantile' z4='Expected Normal Quantile'; run;