NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to MCGILL UNIVERSITY, Site 0009211001. NOTE: This session is executing on the WIN_98 platform. NOTE: SAS initialization used: real time 4.33 seconds 1 2 ods rtf file='d:\wwwstats\sas\example1.rtf'; NOTE: Writing RTF Body file: d:\wwwstats\sas\example1.rtf 3 4 ods html file='d:\wwwstats\sas\example1.html'; NOTE: Writing HTML Body file: d:\wwwstats\sas\example1.html 5 6 proc iml; NOTE: IML Ready 7 reset print; 8 9 a = {1 2 3, 10 3 2 1}; 11 12 b = {3 2, 13 2 3, 14 1 1}; 15 16 c = a * b; 17 18 d = inv(c); 19 20 quit; NOTE: Exiting IML. NOTE: PROCEDURE IML used: real time 1.25 seconds 21 22 ods rtf close; 23 24 ods html close; 25 26 ods rtf file='d:\wwwstats\sas\example2.rtf'; NOTE: Writing RTF Body file: d:\wwwstats\sas\example2.rtf 27 28 ods html file='d:\wwwstats\sas\example2.html'; NOTE: Writing HTML Body file: d:\wwwstats\sas\example2.html 29 30 31 proc iml; NOTE: IML Ready 32 reset print; 33 34 x = {1 4.6, 35 1 5.1, 36 1 4.8, 37 1 4.4, 38 1 5.9, 39 1 4.7, 40 1 5.1, 41 1 5.2, 42 1 4.9, 43 1 5.1}; 44 45 y = {87.1, 46 93.1, 47 89.8, 48 91.4, 49 99.5, 50 92.1, 51 95.5, 52 99.3, 53 93.4, 54 94.4}; 55 56 xt = x`; 57 xtx = xt * x; 58 59 xty = xt * y; 60 61 invxtx = inv(xtx); 62 63 bhat = invxtx * xty; 64 65 tss = y` * y; 66 67 ssr = bhat` * xty; 68 69 sse = tss - ssr; 70 71 n = nrow(x); 72 73 rx = 2; 74 75 dfe = n - rx; 76 77 mse = sse/dfe; 78 79 covb = invxtx * mse; 80 varb1 = covb[2,2]; 81 seb1 = sqrt(varb1); 82 83 quit; NOTE: Exiting IML. NOTE: PROCEDURE IML used: real time 1.48 seconds 84 85 ods rtf close; 86 87 ods html close; 88 89 ods rtf file='d:\wwwstats\sas\example3.rtf'; NOTE: Writing RTF Body file: d:\wwwstats\sas\example3.rtf 90 91 ods html file='d:\wwwstats\sas\example3.html'; NOTE: Writing HTML Body file: d:\wwwstats\sas\example3.html 92 93 data ex1; 94 input obs x y; 95 cards; NOTE: The data set WORK.EX1 has 10 observations and 3 variables. NOTE: DATA statement used: real time 0.65 seconds 106 ; 107 108 proc print data=ex1; 109 var x y; 110 run; NOTE: There were 10 observations read from the data set WORK.EX1. NOTE: PROCEDURE PRINT used: real time 0.22 seconds 111 112 proc means data=ex1; 113 var x y; 114 run; NOTE: There were 10 observations read from the data set WORK.EX1. NOTE: PROCEDURE MEANS used: real time 0.26 seconds 115 116 ods rtf close; 117 118 ods html close;