*------------------------------------------------------------------* | proc iml; reset spaces=3 nolog; | | TEMP = {85 70 90 64, 90 72 78 71, 91 69 95 62, 93 66 93 55, | | 83 66 91 62, 84 65 91 69, 95 76 101 79, 89 77 90 79, | | 78 65 82 62, 80 66 89 64, 87 74 93 65, 81 57 80 57}; | | DAY = {T_hi T_lo Y_hi Y_lo}; | | CITY = { 'Albuquerque', 'atlanta', 'Baltimore', 'bismark', | | 'Chicago', 'cincinnati', 'Dallas', 'Miami', | | 'milwauke', 'Omaha', 'Philadelphia', 'portland(Or)'}; | | call SVD(U,LV,Z,TEMP); EVALS=eigval(TEMP`*TEMP); | | print EVALS[format=12.2]; L=diag(LV); | | A1 = U[ ,1]*L[1,1]*Z[ ,1]`; A2 = U[ ,2]*L[2,2]*Z[ ,2]`; | | A3 = U[ ,3]*L[3,3]*Z[ ,3]`; A4 = U[ ,4]*L[4,4]*Z[ ,4]`; | | DELTA = A2+A3+A4; | | print CITY TEMP [format=3.0] A1 [format=3.0] DELTA [format=3.0];| | run; | *------------------------------------------------------------------* EVALS 294758.21 483.38 167.01 66.41 CITY TEMP A1 DELTA Albuquerque 85 70 90 64 86 68 89 66 -1 2 1 -2 atlanta 90 72 78 71 86 68 89 66 4 4 -11 5 Baltimore 91 69 95 62 89 71 92 68 2 -2 3 -6 bismark 93 66 93 55 86 69 89 66 7 -3 4 -11 Chicago 83 66 91 62 84 67 87 64 -1 -1 4 -2 cincinnati 84 65 91 69 86 68 89 66 -2 -3 2 3 Dallas 95 76 101 79 97 77 101 74 -2 -1 0 5 Miami 89 77 90 79 92 73 96 70 -3 4 -6 9 milwauke 78 65 82 62 80 63 83 61 -2 2 -1 1 Omaha 80 66 89 64 83 66 86 63 -3 -0 3 1 Philadelphia 87 74 93 65 89 71 92 68 -2 3 1 -3 portland(Or) 81 57 80 57 77 61 80 59 4 -4 0 -2