filename class206 '0206.dat';
options center linesize=76 nodate;
data;
infile class206;
input @3 row col y;
if row=1 and col=1 then d11=1; else d11=0;
if row=1 and col=2 then d12=1; else d12=0;
if row=2 and col=1 then d21=1; else d21=0;
if row=2 and col=2 then d22=1; else d22=0;
ct1=d11+d12-d21-d22;
ct2=d11-d12+d21-d22;
ct3=d11-d12-d21+d22;
e1=d11-d12;
e2=d11+d12-2*d21;
e3=d11+d12+d21-3*d22;
/* Vectors for restrictions on dummy coded model */
  r1=d11+d21;
  r2=d12+d21;
  c1=d11+d12;
  c2=d12+d21;
  rc1=d11+d12;
  rc2=d11+d21;
proc print;
proc reg;
  /* "Full Models" */
  model y=d11 d12 d21/corrb;
  model y=ct1 ct2 ct3/corrb;
  model y=e1 e2 e3/corrb;
  /* Models with Rows Restricted */
  model y=r1 r2;
  model y=ct2 ct3;
  /* Models with Cols Restricted */
  model y=c1 c2;
  model y=ct1 ct3;
  /* Models with R x C Restricted */
  model y=rc1 rc2;
  model y=ct1 ct2;
proc anova;
  class row col;
  model y=row col row*col;
run;
quit;