Dear Anne,
Both versions should work with missing values provided
!f mv is included in the model.
Version 2 lends itself to dropping records with missing values
and then declaring the exact number of gilts
with data for each 'dot'
Your data file rrdata1.csv is sorted gilt : dot
whereas data file rrdata1.csv is sorted dot:gilt
Try: Use rrdata2.csv in version 1 after moving the Rstructure 'gilt'
to after the dot 0 DIAG structure
The !CON qualifier on the US line is wrong.
If problems persist, send me the job.
Arthur
>
> Hi,
>
> I am attempting to use asreml to fit a random regression model using Legendre
> polynomials. At this point, I am simply using a small test example to make
sure
> that the command file is correct. The example I have chosen is taken from
Larry
> Schaeffer's course notes on rrms. The trait is body weight in gilts, with
days
> on test (dot) as the "age" variable with levels 10, 20, 30, 40, 50, and 100.
I
> have added a permanent environmental effect. For simplicity, relationships
are
> not considered. I have two versions of asreml commmand files (shown below).
I
> included the !MAXIT 1 and !S2==1 options so I can compare solutions (and
> standard errors) with those obtained from dfreml (or, more specifically,
dxmrr)
> and a program written in IML (SAS). Asreml, dfreml and iml produce the same
> results. These programs are fine as long as there are no missing values.
> When missing values occur, one can use version 2 of the command file if
> 1) !f mv is included in the model line, and
> 2) the missing record is included in the data file using (in a .csv file)
> consecutive commas for the missing weight record.
>
> Minor question: I am unable to get version 1 to work with the same strategy.
> Can version 1 be used for data with missing values?
>
> Major question: Inclusion of the missing values as was done in this example
for
> version 2 is o.k when the data set is small and the "age" variable (dot) has a
> small number of levels with one error variance associated with each level.
For
> test day records in dairy cattle we may want to use days in milk (say from 1
to
> 270) as the age variable, where each cow has only a handful of tests. In this
> case, records associated with dim 1 to 45 might have one error variance
assigned
> to them , records associated with dim 2 to 90 would have another error
variance
> associated with them, etc. How can this error structure be specified in the
> asreml command file?
>
> Thanks in advance,
>
> Anne Winkelman
> Livestock Improvement
> Hamilton
> New Zealand
>
> The two command files are as follows:
>
> Version 1
>
> rrprogram1.as Random regression: Legendre polynomials
> gilt 3 dot !I phi 6 !F perm 3 weight
> rrdata1.csv !SKIP 1 !CSV !MAXIT 1 #sorted by gilt, dot
> weight ~ mu !r gilt.phi perm.phi
> 1 2 2 # R header line <sites> <dimensions> <G-structures>
> gilt 0 0 # R structure, outer dimension
> dot 0 DIAG !S2==1 !+6 # R structure, inner dimension
> 6.25
> 33.75
> 38.00
> 50.00
> 62.50
> 375.00
> gilt.phi 2 # G header line <model_term> <dimensions>
> gilt 0 0 # Outer dimension
> 6 0 US !CON !+21 # <order> 0 (sortc) <model> <init parm> <!qualifier>
> 2.5 # v11
> 4.9 13.5 # c21 v22
> 4.6 12.1 15.2 # c31 c32 v33
> 4.6 12.3 14.5 20.0 # c41 c42 c43 v44
> 4.3 11.9 14.6 19.0 25.0 # c51 c52 c53 c54 v55
> 1.9 6.7 9.5 10.9 15.3 150.0 # c61 c62 c63 c64 c65 v66
> perm.phi 2 # perm environment header line <model_term> <dimensions>
> perm 0 I # Outer dimension
> 6 0 US !CON !+21 # <order> 0 (sortc) <model> <init parm> <!qualifier>
> 1.0 # v11
> 0.5 1.0 # c21 v22
> 0.5 0.5 1.0 # c31 c32 v33
> 0.5 0.5 0.5 1.0 # c41 c42 c43 v44
> 0.5 0.5 0.5 0.5 1.0 # c51 c52 c53 c54 v55
> 0.5 0.5 0.5 0.5 0.5 1.0 # c61 c62 c63 c64 c65 v66
>
> Version 2
>
> rrprogram2.as Random regression: Legendre polynomials
> gilt 3 dot !I phi 6 !F perm 3 weight
> rrdata2.csv !SKIP 1 !CSV !MAXIT 1 #sorted by dot, gilt
> weight ~ mu !r gilt.phi perm.phi
> 6 1 2 # R header line <sites> <dimensions> <G-structures>
> gilt 0 I !s2=6.25 # R str <levels> <0 if sorted> <structure>
> gilt 0 I !s2=33.75
> gilt 0 I !s2=38.00
> gilt 0 I !s2=50.00
> gilt 0 I !s2=62.50
> gilt 0 I !s2=375.00
> gilt.phi 2 # G header line <model_term> <dimensions>
> gilt 0 0 # Outer dimension
> 6 0 US !CON !+21 # <order> 0 (sortc) <model> <init parm> <!qualifier>
> 2.5 # v11
> 4.9 13.5 # c21 v22
> 4.6 12.1 15.2 # c31 c32 v33
> 4.6 12.3 14.5 20.0 # c41 c42 c43 v44
> 4.3 11.9 14.6 19.0 25.0 # c51 c52 c53 c54 v55
> 1.9 6.7 9.5 10.9 15.3 150.0 # c61 c62 c63 c64 c65 v66
> perm.phi 2 # perm environment header line <model_term> <dimensions>
> perm 0 I # Outer dimension
> 6 0 US !CON !+21 # <order> 0 (sortc) <model> <init parm> <!qualifier>
> 1.0 # v11
> 0.5 1.0 # c21 v22
> 0.5 0.5 1.0 # c31 c32 v33
> 0.5 0.5 0.5 1.0 # c41 c42 c43 v44
> 0.5 0.5 0.5 0.5 1.0 # c51 c52 c53 c54 v55
> 0.5 0.5 0.5 0.5 0.5 1.0 # c61 c62 c63 c64 c65 v66
>
>
>
>
> ___________________________________________________________________________
> THE FOLLOWING WARNINGS ATTACH TO THIS COMMUNICATION
> This material is intended for the named recipient only and has been
created
> solely for the purpose and function of Livestock Improvement Corporation
Limited
> and may contain information that is subject to the Privacy Act /
Confidentiality
> / Privilege / Copyright. Any person other than the named recipient is
prohibited
> from retaining / disclosing / copying / distributing / using all or part of
this
> material.
>
>
> --
> Asreml mailinglist archive: http://www.chiswick.anprod.csiro.au/lists/asreml
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Arthur Gilmour PhD mailto:Arthur.Gilmour@agric.nsw.gov.au
Principal Research Scientist (Biometrics) fax: <61> 2 6391 3899
NSW Agriculture <61> 2 6391 3922
Orange Agricultural Institute telephone work: <61> 2 6391 3815
Forest Rd, ORANGE, 2800, AUSTRALIA home: <61> 2 6362 0046
ASREML is still free by anonymous ftp from pub/aar on ftp.res.bbsrc.ac.uk
or point your web browser at ftp://ftp.res.bbsrc.ac.uk/pub/aar/
To join the asreml discussion list, send the message
subscribe
mailto:asreml-request@chiswick.anprod.CSIRO.au
To send messages to the list, mailto:asreml@chiswick.anprod.CSIRO.au
Asreml list archive: http://www.chiswick.anprod.csiro.au/lists/asreml
<> <> <> <> <> <> <>
"Blessed are the peacemakers,
for they shall be called sons of God" Jesus; Matthew 5:9
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
--
Asreml mailinglist archive: http://www.chiswick.anprod.csiro.au/lists/asreml