14.09.2015 Views

Matvec Users’ Guide

Matvec Users' Guide

Matvec Users' Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

64 CHAPTER 10. LINEAR MODEL ANALYSES<br />

M.fitdata(D);<br />

M.blup();<br />

M.save("mme.out");<br />

10.4 Linear Estimation<br />

M.estimate(Kp) returns BLUE(K’b), M.covmat(Kp) returns Var(K’ˆb-K’b), and M.label(i) returns the label<br />

of model effect i where Kp means K’. For example, the following <strong>Matvec</strong> script is saved in a file called try3.<br />

P = Pedigree();<br />

P.input("try.ped");<br />

D = Data();<br />

D.input("try.dat","animal\$ herd _skip y");<br />

M = Model();<br />

M.equation("y = intercept herd animal");<br />

M.variance("residual",2);<br />

M.variance("animal",P,1);<br />

M.fitdata(D);<br />

Kp=[1 1 0<br />

1 0 1<br />

0 1 ,-1];<br />

herd=M.estimate(Kp);<br />

var=M.covmat(Kp);<br />

for(i=1;i input try3<br />

Effect 1 intercept:1<br />

Effect 2 herd:1<br />

Effect 3 herd:2<br />

Herd 1 7.42 +- 1.19861<br />

Herd 2 9.11 +- 1.12213<br />

Herd 1 - 2 -1.69 +- 1.3997<br />

10.5 Linear Hypothesis Test<br />

M.contrast(Kp,m) is doing a linear hypothesis test that H0: K’b = m. Vector m is optional, the default is<br />

a vector of 0’s. For example, the following <strong>Matvec</strong> script is saved in a file called try4.<br />

P = Pedigree();<br />

P.input("try.ped");

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!