options linesize=80 pagesize=65 nodate;
title1 'Randomized Complete Block Design - Unbalanced Data';
title2 'Feed Rations Data';
title3 'SAS System for Linear Models 3rd. ed - pg. 162';
data calves;
do ration = 1 to 2;
do sire = 1 to 3;
input nij @;
do rep = 1 to nij;
input wtgain @@;
output;
end;
end;
end;
cards;
2 5 6
5 2 3 5 6 7
1 3
2 2 3
3 8 8 9
5 4 4 6 6 7
;;;;
proc print;
proc glm;
classes ration sire;
model wtgain = ration sire ration*sire;
means ration sire;
lsmeans ration sire / stderr;
contrast 'Ration Effect' ration -1 1;
contrast 'Sire Effect 1 vs 2 & 3' sire -2 1 1;
contrast 'Sire Effect 2 vs 3' sire 0 -1 1;
contrast 'All Sires' sire -2 1 1, sire 0 -1 1;
contrast 'Ration*Sire 2 vs 3' ration*sire 0 1 -1 0 -1 1;
Comments, questions? Please contact
Curt Doetkott
Last Modified: 10:55 Mon, Feb 10, 1997
Published by Information Technology Services