Dear experts,  I'm studying with the SAS Certification Prep Guide, and get stuck at the Studentized Residual part.  The formula of the studentized residual includes "standard error of residual" as the denominator, and I thought the standard error of residual from the same sample will be the same.     However, the output(from a simple regression model) shows that the standard error of residual(stderr_residual) varies, and seems that records with same predictor value share the same standard error of residual.  Could someone explain why the standard error of residual varies, and how to calculate it to generate output as shown below? Thank you!     【Code】  libname sasba 'c:\sasba\data';
data Revenue;
set sasba.revenue;
run;
proc reg data=Revenue;
model y = x;
output out=diagnostics predicted=yhat residual=residual
stdr=stderr_residual student=student ;
run;
data res;
set diagnostics;
run;
proc print data=res;
var adexpense revenue yhat residual stderr_residual student;
run;  【Output】           
						
					
					... View more