/* x2_8.sas */ /* Purpose: */ title1 'Example 2.8. (See also: example 2.2)'; data a; input x1 x2; cards; 2 2 5 12 15 4 16 21 16 41 19 14 26 31 24 29 16 31 36 8 39 30 42 44 44 26 40 60 42 34 42 34 50 14 51 41 58 58 64 47 ; proc print data=a; var x1 x2; title2 'List of data.'; proc plot data=a; plot x2*x1; title2 'Plot of data.'; proc reg data=a; model x1=x2; title2 'Regression x1=a*x2+b'; proc reg data=a; model x2=x1; title2 'Regression x2=a*x1+b'; proc corr data=a; var x1 x2; title2 'Compute correlation and test if zero'; run;