OPTIONS NOCENTER; TITLE1 'Generating Orthogonal Polynomial Matrix'; PROC IML; /* 4 equal interval timepoints (including the constant) */ xraw = { 1 1 1 1, 0 1 2 3, 0 1 4 9, 0 1 8 27}; xorth = INV(T(ROOT(xraw*T(xraw))))*xraw; PRINT '4 equal interval timepoints - including the constant'; PRINT 'Matrix of Time Polynomials', xraw [FORMAT=10.4]; PRINT 'Orthonormalized Matrix of Time Polynomials', xorth [FORMAT=10.4]; __________________________________________________________________________ Generating Orthogonal Polynomial Matrix 4 equal interval timepoints - including the constant Matrix of Time Polynomials XRAW 1.0000 1.0000 1.0000 1.0000 0.0000 1.0000 2.0000 3.0000 0.0000 1.0000 4.0000 9.0000 0.0000 1.0000 8.0000 27.0000 Orthonormalized Matrix of Time Polynomials XORTH 0.5000 0.5000 0.5000 0.5000 -0.6708 -0.2236 0.2236 0.6708 0.5000 -0.5000 -0.5000 0.5000 -0.2236 0.6708 -0.6708 0.2236