/* Appendix I                        */

    /* Code for Set-to-Zero Restrictions */

 proc glm;class square trt cow period resid;
 model milk=square cow(square) period(square) trt resid/ss3;

 estimate 'Direct 1' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 18 0 0
          resid 6 4 4 4/divisor=18;

 estimate 'Direct 2' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 0 18 0
          resid 6 4 4 4/divisor=18;

 estimate 'Direct 3' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 0 0 18
          resid 6 4 4 4/divisor=18;

 estimate 'Residu (1+Mean)'intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 6 6 6
          resid 6 12 0 0/divisor=18;

 estimate 'Residu (2+Mean)'intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 6 6 6
          resid 6 0 12 0/divisor=18;

 estimate 'Residu (3+Mean)'intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 6 6 6
          resid 6 0 0 12/divisor=18;

 estimate 'Overall Mean' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 6 6 6
          resid 6 4 4 4/divisor=18;

 estimate 'Residu 1 alone' resid  0 12 -6  -6/divisor=18;
 estimate 'Residu 2 alone' resid  0 -6  12 -6/divisor=18;
 estimate 'Residu 3 alone' resid  0 -6 -6  12/divisor=18;

 estimate 'Permanent 1' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 18 0 0
          resid 6 16 -2 -2/divisor=18;

 estimate 'Permanent 2' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 0 18 0
          resid 6 -2 16 -2/divisor=18;

 estimate 'Permanent 3' intercept 18 square 9 9
          cow(square) 3 3 3 3 3 3
          period(square) 3 3 3 3 3 3 trt 0 0 18
          resid 6 -2 -2 16/divisor=18;

 estimate 'Perm. 1-2' trt 18 -18 0 resid 0 18 -18 0
          /divisor=18;