Prediction - when // is important
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Prediction - when // is important



Hi  to you all,
I have 1 comment and 1 question.

I want to share with you a minor breakthrough I think I've just had in
writing .PIN files.

Last month (29 Oct to be exact), Nick Galway initiated a couple of
questions regarding setting up a .PIN file to form predictions.  He
actually tried to follow the example on p. 88 of the ASREML manual(version
of 2 October 1998).   Likewise now for me.

From the manual, here is the TEST.PIN file ............
# A is the vector of the 12 knot points
# B is the vector of the average predicted spline
C = C+B           # Add average curve to Group 1 specific curve
D = D+B          # Add average curve to Group 2 specific curve
E = E+B           # Add average curve to Group 3 specific curve
F = F+B          # Add average curve to Group 4 specific curve
G = G+B          # Add average curve to Group 5 specific curve
GROUP B6 [ 1:5 ] A6 [6:10 ] 11  # Group means at knot point 6
GROUP1 C   1     A   6      11       # Spline for group 1
GROUP2 D   2     A   7      11      # Spline for group 2
GROUP3 E   3     A   8      11       # Spline for group 3
GROUP4 F   4     A   9      11       # Spline for group 4
GROUP5 G   5     A  10      11     # Spline for group 5

In working through this code, I find that this .PIN file actually produces
85(=25+12+12+12+12+12) predicted means, not the 65 as expected.  This threw
a spanner in my works for a while.  In reading (and trying to recreate in
Excel) the .PVS output, and then re-reading the manual, it turns out that
the 8th line in this .PIN file (in the manual) ought to read as

GROUP B6 [ 1:5 ] A6   //     [6:10 ] 11  # Group means at knot point 6
                                      ^^^
where the lists 1:5 and 6:10 will be expanded in parallel (1&6, 2&7,
....... 5&10) giving 5 group means evaluated at the 6th value in the x-list
of spline knots held in vector A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now for my question.  
Am I correct in making up the following simple "rule of thumb" for my
simple mind?

Lines within a .PIN file are executed LITERALLY left to right (order is
vitally important), and <index>es to the LEFT of a <letter> imply
multiplication of the two, while <index>es to the RIGHT of a <letter> imply
addition, even though the multiplication sign is omitted.

Thus execution of this line from the above .PIN file
GROUP1    C   1     A   6      11       # Spline for group 1

is (Cvector) + (Beta1 * Avector) + Beta6 + Mu,   .............whereas

GROUP1    C   6   11   1    A        # Spline for group 1  ..... wrongly
solves for
(Cvector) + (Beta6 + Mu + Beta1) * Avector

Thanks for your time.
Cheers,  Terry
*******************************************************************
Terry Koen							EMail: 	koentb@ozemail.com.au
Research Centre						Phone: 	(02) 6342 1811 (w)
Dept Land and Water Conservation				(02) 6341 1368 (h)
PO Box 445, Cowra, NSW 2794,		Fax:	(02) 6342 4551
Australia
*******************************************************************