Option ps=45 ls=80 nodate nonumber; Data cracker; input sales pre treat store; X=pre-25; if treat=1 then I1=1; else if treat=2 then I1=0; else I1=-1; if treat=2 then I2=1; else if treat=1 then I2=0; else I2=-1; Datalines; 38 21 1 1 39 26 1 2 36 22 1 3 45 28 1 4 33 19 1 5 43 34 2 1 38 26 2 2 38 29 2 3 27 18 2 4 34 25 2 5 24 23 3 1 32 29 3 2 31 30 3 3 21 16 3 4 28 29 3 5 ; Proc plot; plot sales*pre=treat; run; Proc GLM; class treat; model sales=treat X treat*X; run; proc GLM; model sales=I1 I2 X ; output out=cracker P=yhat R=resid; run; Proc plot; plot resid*yhat='R' / vref=0 ; run; proc univariate normal plot; var resid; run; proc rank normal=vw; var resid; ranks nscore; proc plot ; plot resid*nscore='R'; label nscore='Normal Score'; proc corr; var resid nscore; run;