data spl3; int=1; input x sp1; cards; 2.00000 0.98453 2.50000 0.46518 3.00000 -0.04444 3.50000 -0.53457 4.00000 -0.99547 4.50000 -1.41740 5.00000 -1.79062 5.50000 -2.10538 6.00000 -2.35194 6.50000 -2.52056 7.00000 -2.60149 7.50000 -2.58500 8.00000 -2.46134 8.50000 -2.22482 9.00000 -1.88600 9.50000 -1.45949 10.00000 -0.95992 10.50000 -0.40189 11.00000 0.19998 11.50000 0.83109 12.00000 1.47680 data sln int slope spline; length level $ 15; length factor $20; infile "c:\ASREML\mouse_42_spline.sln" expandtabs; input factor $ level $ sol se; output sln; if factor="Anim" then output int; if factor="Week.Anim" then output slope; if factor="spl(Week,3).Anim" then output spline; run; proc iml; use spl3; read all into Z; use sln; read all; use int; read all var {sol} into aint; read all var {level} into Anim; use slope; read all var {sol} into aslope; use spline; read all var {sol} into aspline; GM=aint||aslope||aspline; Zx=Z[{2 3 4.5 6 8 12}*2-3,]; print Zx; GW=GM*Zx`; week={W2 W3 W4_5 W6 W8 W12}; print GW[rowname=Anim colname=week]; create Gdata from GW[colname=week]; append from GW;; create Anim var {Anim}; append; quit; run; data Gdata; merge Anim Gdata; run;