*NKNW364, Regression diagnostics; data a1; infile 'U:\.www\datasets512\Ch09ta01.dat'; input income risk insur; *Contains the new options partial influence and tol (tolerance). The partial command creates line printer plots in the output window. These are difficult to read and not that pretty. Also included is a plot statement within proc reg. This is another way to generate residual plots. Here the residuals (called r.) are plotted against each explanatory variable; proc reg data=a1; model insur=income risk/r partial influence tol; id income risk; plot r.*(income risk); run; Title1 'Partial residual plot for risk'; proc reg data=a1; model insur risk = income; output out=a2 r=resins resris; symbol1 v=circle i=sm70; proc sort data=a2; by resris; proc gplot data=a2; plot resins*resris; run; Title1 'Partial residual plot for income'; proc reg data=a1; model insur income = risk; output out=a2 r=resins resinc; proc sort data=a2; by resinc; proc gplot data=a2; plot resins*resinc; run; proc reg data=a1; model insur= risk income; output out=a2 r=resins; symbol1 v=circle i=sm70; Title1 'Plot of residuals versus risk'; proc sort data=a2; by risk; proc gplot data=a2; plot resins*risk; run; Title1 'Plot of residuals versus income'; proc sort data=a2; by income; proc gplot data=a2; plot resins*income; run; /* The following code helps explain the partial regression residual plot with the intercept; data b1; set a1; x0=1; proc reg data=b1; model x0=income risk/r noint; output out=c1 r=intresid; run; proc reg data=b1; model insur=income risk/r noint; output out=c2 r=insresid; run; symbol v=circle; data c3; merge c1 c2; proc gplot data=c3; plot insresid*intresid/frame; run; */