This LaTeX document is available as postscript or asAdobe PDF.
Data on three traits are available on 7 animals as shown below.
| Animal | Sire | Dam | Age Group | Trait 1 | Trait 2 | Trait 3 |
| 6 | 1 | 3 | 3 | 2.5 | - | 162 |
| 7 | 1 | 4 | 2 | 8.4 | 35 | 175 |
| 8 | 1 | 5 | 3 | 8.2 | 41 | - |
| 9 | 2 | 3 | 1 | 9.0 | 27 | 183 |
| 10 | 2 | 4 | 1 | 7.8 | 32 | 156 |
| 11 | 2 | 5 | 2 | 2.8 | - | 168 |
| 12 | 6 | 10 | 3 | 7.4 | 67 | - |
Let the model for trait 3 be
Assume that
Set up the multi-trait MME and solve.
The solution is most easily shown by giving the SAS IML program that would solve the problem, using Bruce Tier's trick. The program is shown below.
options ls=80 nocenter;
proc iml;
/* Assignment 13, Multiple Trait Models */
y={2.5, 0, 162,
8.4, 35, 175,
8.2, 41, 0,
9.0, 27, 183,
7.8, 32, 156,
2.8, 0, 168,
7.4, 67, 0};
R={10 5 30, 5 100 71, 30 71 960};
G={1 2 -6, 2 15 -12, -6 -12 800};
R1=inv(R);
Ri=I(7)@R1;
Gi=inv(G);
X={0 0 1 0 0 0 0 0 0 0 0, 0 0 0 0 0 0 1 0 0 0 0,
0 0 0 0 0 0 0 0 1 0 0,
0 1 0 0 0 0 0 0 0 0 0, 0 0 0 0 1 0 0 0 0 0 0,
0 0 0 0 0 0 0 0 1 0 0,
0 0 1 0 0 0 0 0 0 0 0, 0 0 0 0 0 1 0 0 0 0 0,
0 0 0 0 0 0 0 0 0 1 0,
1 0 0 0 0 0 0 0 0 0 0, 0 0 0 1 0 0 0 0 0 0 0,
0 0 0 0 0 0 0 0 1 0 0,
1 0 0 0 0 0 0 0 0 0 0, 0 0 0 1 0 0 0 0 0 0 0,
0 0 0 0 0 0 0 0 1 0 0,
0 1 0 0 0 0 0 0 0 0 0, 0 0 0 0 0 0 0 1 0 0 0,
0 0 0 0 0 0 0 0 1 0 0,
0 0 1 0 0 0 0 0 0 0 0, 0 0 0 0 0 1 0 0 0 0 0,
0 0 0 0 0 0 0 0 0 0 1};
Z=j(21,15,0)||I(21);
Ai={5 0 1 1 1 -2 -2 -2 0 0 0 0,
0 5 1 1 1 0 0 0 -2 -2 -2 0,
1 1 4 0 0 -2 0 0 -2 0 0 0,
1 1 0 4 0 0 -2 0 0 -2 0 0,
1 1 0 0 4 0 0 -2 0 0 -2 0,
-2 0 -2 0 0 5 0 0 0 1 0 -2,
-2 0 0 -2 0 0 4 0 0 0 0 0,
-2 0 0 0 -2 0 0 4 0 0 0 0,
0 -2 -2 0 0 0 0 0 4 0 0 0,
0 -2 0 -2 0 1 0 0 0 5 0 -2,
0 -2 0 0 -2 0 0 0 0 0 4 0,
0 0 0 0 0 -2 0 0 0 -2 0 4};
Ai=Ai/2;
/* Form the MME */
Hi=Ai@Gi;
W=X||Z;
wrw=W`*Ri*W;
wry=W`*Ri*y;
B=J(11,11,0);
add=block(B,Hi);
MME=wrw+add;
/* Solve and print results */
C=inv(MME);
Bhat=C*wry;
D=vecdiag(C);
print wry Bhat D;
res=y-W*Bhat;
print y res;
end;
This LaTeX document is available as postscript or asAdobe PDF.
Larry Schaeffer