options ls=75 nodate; data one; input x1 x2 x3 y; cards; 19.5 43.1 29.1 11.9 24.7 49.8 28.2 22.8 30.7 51.9 37.0 18.7 29.8 54.3 31.1 20.1 19.1 42.2 30.9 12.9 25.6 53.9 23.7 21.7 31.4 58.5 27.6 27.1 27.9 52.1 30.6 25.4 22.1 49.9 23.2 21.3 25.5 53.5 24.8 19.3 31.1 56.6 30.0 25.4 30.4 56.7 28.3 27.2 18.7 46.5 23.0 11.7 19.7 44.2 28.6 17.8 14.6 42.7 21.3 12.8 29.5 54.4 30.1 23.9 27.7 55.3 25.7 22.6 30.2 58.6 24.6 25.4 22.7 48.2 27.1 14.8 25.2 51.0 27.5 21.1 25 50 29 . ; proc reg; title "Simple model (p=1)"; model y=x1 ; output out=two p=p r=r; run; proc sort data=two; by r; run; proc rank data=two out=ranked_two normal=vw; var r; ranks q; run; /* the VAR statement specifies the variable to be ranked the ranks statement specifies the names of the variables containing the ranks of variables in the VAR statement NORMAL=VW suggests that people who drive volkswagons are approximately normal. Just kidding. NORMAL=VW specifies the (n+1) denominator correction for calculation of normal quantiles that correspond to empirical quantiles for use in a normal qq plot */ proc print data=ranked_two; title "ranked_two"; run; symbol value=dot; proc gplot data=ranked_two; title "Hand-crafted normal qq plot"; plot r*q; run; /* Of course, this functionality is also built in to PROC REG. Try adding this command within PROC REG: plot residual.*nqq.; Also, there is functionality within the INSIGHT facility invoked with the command PROC INSIGHT;RUN; */