Dear Bruce,
> X-Authentication-Warning: lamb.chiswick.anprod.csiro.au: petidomo set sender
to asreml-owner@lamb.chiswick.anprod.csiro.au using -f
> From: bsouthey@iastate.edu
> To: asreml@chiswick.anprod.csiro.au
> Subject: Clarification of data transformations
> Mime-Version: 1.0
> Date: Thu, 10 Feb 2000 10:28:18 CST
>
> Hi,
> I would like to recode a variable age at measurement such that the last level
> corresponds to ages 5+ to fit as a factor a model. Is this possible in ASREML
> without creating a special data set?
Several ways. If data was 1 2 3 4 5 6 7 8 use !MIN 5
(dat becomes minimum of value and 5)
If the data is 2 3 4 5 6 then use !min 5 !-1
>
> I have been trying to use MIN transformations on page 21 of the Manual (dated
> February 8, 2000) says that the !MIN v takes minimum of v and the data value.
> However, page 58 Chapter 4 say:
> !MIN v is the minimum of the field and the value v (MIN(<field>,v))
>
> My understanding is that ASREML recodes the levels based on the first value
> found and then applied these transformations. I.E. the first age of dam
> values in order found in the data set are:
> 4, 3, 5, 6 and 2
> So ASREML creates the vector with values [4 3 5 6 2],
> !MIN 3 then creates the vector with values [4 3 5 5 5].
YES if you use !I but not if you leave !I out
>
> Thus, v refers to the index of the vector and not the value. MAX seems to do
> the same but I have yet to understand the SET transformation.
>
Without !I [data values 2 3 4 5 6 present which are to be
recoded 1 2 3 4 4 respectively, you could also use !SET 1 1 2 3 4 4
> Thanks in advance for any suggestions,
> Bruce
>
> The simple data I have been using:
> 1 3 4 12
> 1 4 3 12
> 1 4 5 13
> 1 4 6 14
> 2 2 2 13
> 2 3 3 12
> 2 4 4 14
> 2 4 5 12
> 2 4 6 11
> 3 2 2 11
> 3 3 3 12
> 3 4 4 12
> 3 4 5 13
> 3 4 6 15
>
> The .as file:
>
> Test of coding
> animal
> tc !I
> code !I !MIN 3
> y
> test.dat
> y ~ mu code
My job is
Test of coding
animal
tc !-1
code !-1 !MIN 4
y
test.dat !print
y ~ mu code
And the transformed data [from test.asp] is
1.0 2.0 3.0 12.0
1.0 3.0 2.0 12.0
1.0 3.0 4.0 13.0
1.0 3.0 4.0 14.0
2.0 1.0 1.0 13.0
2.0 2.0 2.0 12.0
2.0 3.0 3.0 14.0
2.0 3.0 4.0 12.0
2.0 3.0 4.0 11.0
3.0 1.0 1.0 11.0
3.0 2.0 2.0 12.0
3.0 3.0 3.0 12.0
3.0 3.0 4.0 13.0
3.0 3.0 4.0 15.0
Arthur
>
>
> --
> 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
<> <> <> <> <> <> <>
"Christ Jesus came into the world to save sinners" I Timothy 1:15.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
--
Asreml mailinglist archive: http://www.chiswick.anprod.csiro.au/lists/asreml