Re: question to specify R structure.

From: <arthur.gilmour_at_DPI.NSW.GOV.AU>
Date: Wed, 5 Dec 2007 10:11:58 +1100

Dear Jiqiu Cheng

You wrote
   A dataset include Animal and Pen effect. Pm1, Pm2 and Pm3 are three
penmates of the current animal. There are 2500 pens total, 4 animals
each pen. I want to fit an R structure for which, animals within one
pen are correlated and independent among different pens. The pen
effects are independent.

I tried to code the R structure as below:

1 2 0
2500 Pen ID
CORU

But it doesn't work. Could anyone give me any suggestions?

Data set:
Animal Sire Dam Sex Genation Pen Ai Pm1 Pm2 Pm3 adg
20751 10957 13673 2 3 1491 20751 23621 25420 27847 19.22
20752 10957 13673 2 3 1036 20752 23635 28874 29512 19.96
20753 10957 13673 2 3 2327 20753 22409 25602 26703 19.36
20754 10957 13673 2 3 2326 20754 21148 23208 30172 19.57
20755 10957 13673 2 3 2401 20755 22852 28577 29107 19.17
20756 10957 13673 1 3 782 20756 23266 23270 25910 -20.61
20757 10957 13673 1 3 983 20757 20815 21163 29738 -19.87
20758 10957 13673 1 3 1676 20758 21985 22899 23182 -19.31
20759 10957 13673 2 3 421 20759 27356 28702 29785 20.12
20760 10957 13673 2 3 308 20760 23035 29144 29441 18.84

Assuming your data file has 10000 records so that the pen number say 1491
appears 4 times in the file
associated with the four animals 20751 23621 25420 27847

Then you just need to fit Pen as a random factor

Animals in Pens
 Animal !P Sire !P Dam !P
 Sex 2
 Genation
 Pen *
 Ai Pm1 Pm2 Pm3
 adg
datafile.txt !skip 1 # read pedigree from data file
datafile.txt !skip 1 # read data from data file

adg ~ mu Sex !r Animal Pen

This will give 3 variance components
  Pen
  Animal
  Residual

The error correlation between pen-mates is given as
the PenComponent/(PenComponent+Residual)

May Jesus Christ be gracious to you,

Arthur Gilmour, His servant .

Mixed model regression mapping for QTL detection in experimental crosses.
Computational Statistics and Data Analysis 51:3749-3764 now available at
http://dx.doi.org/10.1016/j.csda.2006.12.031

Profile: http://www.dpi.nsw.gov.au/reader/17263
Personal website: http://www.cargovale.com.au/

mailto:Arthur.Gilmour_at_dpi.nsw.gov.au, arthur_at_cargovale.com.au
Principal Research Scientist (Biometrics)
NSW Department of Primary Industries
Orange Agricultural Institute, Forest Rd, ORANGE, 2800, AUSTRALIA

fax: 02 6391 3899; 02 6391 3922 Australia +61
telephone work: 02 6391 3815; home: 02 6364 3288; mobile: 0438 251 426

ASREML 2 is now available from http://www.VSNi.co.uk/products/asreml
The ASReml discussion group is at ASREML-L_at_dpi.nsw.gov.au
To join it, mailto:arthur.gilmour_at_dpi.nsw.gov.au
Archives are at
https://gatekeeper.dpi.nsw.gov.au/Listserv/archives/asreml-l.html
Cookbook: http://uncronopio.org/ASReml

Proposed travel:
UK 28 Jan
USA 11-15 Feb
><><><><><><><><><><><><><><><><><><><><><><><>
Received on Sun Dec 05 2007 - 10:11:58 EST

This webpage is part of the ASReml-l discussion list archives 2004-2010. More information on ASReml can be found at the VSN website. This discussion list is now deprecated - please use the VSN forum for discussion on ASReml. (These online archives were generated using the hypermail package.)