%newsas(normplt3); title 'Normal probability plot of residuals with REG graphics'; %include data(nations); data nations; set nations; where imr^=.; *-- select non-missing; logimr = log10(imr); loginc = log(income); goptions ftext=swiss htext=3 pct htitle=4 pct; symbol v=dot c=black h=1; proc reg data=nations graphics; title2 'Raw data'; model imr = income; plot r. * nqq. / noline ; run; proc reg data=nations graphics; title2 'Transformed data'; id nation; model logimr =loginc; plot (r. student.) * nqq. / noline ; run; *-- Get residuals in output data set; output out=results /* name of output data set */ r=resid /* Residuals */ student=stdres; /* Standardized residuals, e/sqrt(MSE) */ * Use the NORMPLOT program ; title 'Plots from NORMPLOT'; *include macros(normplot); %normplot(data=results,var=resid); * Use the NQPLOT program ; title 'Plots from NQPLOT'; *include macros(nqplot); %nqplot(data=results,var=resid);