Problem with prediction

# Problem with prediction

```I am trying to follow the example on p. 88 of the ASREML manual(version of 2
October 1998).

I have created a file with five levels for group and 12 unique values in X,
presented in test.dat below.   I have analysed this with the command file
presented in test.as below.   I have then produced predicted values using
the file presented in test.pin below.   I have then tried to produce a plot
of splines in Splus using the command

asr.pvsplot("c:\\docs\\dracup_m\\96wh14\\test.pvs",1,5,12)

This produces some output - i.e. it finds the file okay - but the lines
zigzag all over the place.   What am I doing wrong?

Nick Galwey
____________________

test.dat

group   X       y
1      12    5.11
1      13    5.45
1      15    6.08
1      16    6.32
1      18    6.97
1      19    7.29
1      21    7.87
1      24    8.78
1      25    9.08
1      26    9.40
1      27    9.61
1      29   10.24
2      12   10.24
2      13   10.85
2      15   12.03
2      16   12.66
2      18   13.90
2      19   14.50
2      21   15.61
2      24   17.44
2      25   18.07
2      26   18.65
2      27   19.29
2      29   20.41
3      12   15.39
3      13   16.26
3      15   18.09
3      16   18.95
3      18   20.76
3      19   21.62
3      21   23.47
3      24   26.19
3      25   27.04
3      26   27.92
3      27   28.89
3      29   30.68
4      12   20.42
4      13   21.70
4      15   24.09
4      16   25.21
4      18   27.68
4      19   28.86
4      21   31.30
4      24   34.86
4      25   36.01
4      26   37.21
4      27   38.48
4      29   40.89
5      12   25.53
5      13   27.09
5      15   30.09
5      16   31.60
5      18   34.56
5      19   36.00
5      21   39.02
5      24   43.60
5      25   45.05
5      26   46.56
5      27   48.01
5      29   51.07

test.as

Example - Manual page 88
group     5
X
y

C:\DOCS\Dracup_M\96WH14\test.dat !skip 1

y ~ mu group group.X !r spl(X) group.spl(X)

test.pin

# 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
_____________________________________________________________________
N.W. Galwey,
Faculty of Agriculture,
University of Western Australia,
Nedlands, WA 6709, Australia.

Tel.: +61 9 380 1959 (direct line)
+61 9 380 2554 (switchboard)
Fax:  +61 9 380 1108

```