filename class 'class2.dat';
options center linesize=75 nodate;
data;
infile class;
input @3 row col y;
if row=1 and col=1 then d1=1; else d1=0;
if row=1 and col=2 then d2=1; else d2=0;
if row=2 and col=1 then d3=1; else d3=0;
if row=2 and col=2 then d4=1; else d4=0;
c1=d1+d2-d3-d4;
c2=d1-d2+d3-d4;
c3=d1-d2-d3+d4;
proc print;
proc reg;
  model y=d1 d2 d3 / corrb;
  model y=c1 c2 c3 / corrb;
proc anova;
  class row col;
  model y=row col row*col;
run;
quit;