Re: Prediction - when // is important

Re: Prediction - when // is important

```Hi Terry,

Your detective work for Nick's question was good.
It seems as if I forgot to send the answer I sent Nick ti the list.

The // forces the two  [ ] lists to be executed in parralel instead
of in all combinations.  The 'all combination' action is
rarely appropriate but would apply if you wanted to predict an A.B table
of means but had only fitted main effects in the model.

Your final interpretation of a .pin line is however wrong.

> 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

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

This is intended to be equivalent to the first form
Cvector + Beta6 + Beta11 + (Beta1 * Avector)

i.e.  Both are meant to do the same thing and they do for me
xaxa  B6 1 A6 6 11
xbxb  B6 6 11 1 A6
produces

'xaxa                '     1.00000     7.25683     0.00991
'xbxb                '     1.00000     7.25683     0.00991

I made the assumption that Beta values would be referred to in
natural order  so the first form is the correct specification.
The second form seems to work anyway.

NB  A number adjoined to a <letter> vector is an index to the vector
i.e. B6 is the 6th element of B  but
B 6  is all of B   and Beta6

All numbers on the line refer to Beta's unless preceeded by a * or /
operator, or adjoined to a <letter>

I
> X-Sender: koentb@ozemail.com.au
> Date: Fri, 04 Dec 1998 11:56:38 +1100
> To: asreml@ram.chiswick.anprod.csiro.au
> From: Terry Koen <koentb@ozemail.com.au>
> Subject: Prediction - when // is important
> Cc: koentb@ozemail.com.au
> Mime-Version: 1.0
>
> 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
>
> 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
> *******************************************************************

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Arthur Gilmour PhD                    email: Arthur.Gilmour@agric.nsw.gov.au
Senior 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

To join the asreml discussion list, send the message
subscribe
to  asreml-request@chiswick.anprod.CSIRO.au

The address for messages to the list is asreml@chiswick.anprod.CSIRO.au

Asreml mailinglist archive: http://www.chiswick.anprod.csiro.au/lists/asreml

<> <> <> <> <> <> <>
"For the wages of sin is death,
but the gift of God is eternal life in Christ Jesus our Lord." Romans 6:23
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

```