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?
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 (MAX(<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].
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.
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
The .asr file:
ASREML [ 8 Feb 2000] Test of coding
Thu Feb 10 10:16:00 2000 8.00 Mbyte Unix test
Reading test.dat FREE FORMAT skipping 0 lines
Univariate analysis of y
Using 14 records [of 14 read from 14 lines of test.dat
]
Model term Size Type COL Minimum Mean Maximum #zero #miss
1 animal 1 Covariat 1 1.000 2.071 3.000 0 0
2 tc 3 Factor 2 1 1.9286 3 0 0
3 code 3 Factor 3 1 2.3571 3 0 0
4 y 1 Variate 4 11.00 12.57 15.00 0 0
5 mu 1 Constant Term
Forming 4 equations: 4 dense
Initial updates will be shrunk by factor 0.548
NOTICE: 1 (more) singularities,
LogL=-9.75614 S2= 1.4697 11 df 1.000
Final parameter values 1.0000
Source Model terms Gamma Component Comp/SE % C
Variance 14 11 1.00000 1.46970 2.35 0 P
Analysis of Variance DF F-incr F-adj StndErrDiff
5 mu 1 1505.46 327.51
3 code 2 0.43 0.43 0.8807
Solution Standard Error T-value T-prev
3 code
3 -0.666667 0.989847 -0.67
5 0.833333E-01 0.820738 0.10 0.91
5 mu
4 12.6667 0.699928 18.10
Finished: Thu Feb 10 10:16:02 2000 LogL Converged
The .sln file:
code 4 0.000 0.000
code 3 -0.6667 0.9898
code 5 0.8333E-01 0.8207
mu 1 12.67 0.6999
Residual 1 -0.6667 12.67
Residual 2 0.1776E-14 12.00
Residual 3 0.2500 12.75
Residual 4 1.250 12.75
Residual 5 0.2500 12.75
Residual 6 0.1776E-14 12.00
Residual 7 1.333 12.67
Residual 8 -0.7500 12.75
Residual 9 -1.750 12.75
Residual 10 -1.750 12.75
Residual 11 0.1776E-14 12.00
Residual 12 -0.6667 12.67
Residual 13 0.2500 12.75
Residual 14 2.250 12.75
--
Asreml mailinglist archive: http://www.chiswick.anprod.csiro.au/lists/asreml