/* x2_2.sas */ /* Purpose: */ title1 'Example 2.2'; data a; input x y; 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 x y; title2 'List of data.'; proc princomp data=a cov; var x y; title2 'Compute eigenvalues and eigenvectors.'; proc plot data=a; plot y*x; title2 'Plot of data.'; proc corr data=a; var x y; title2 'Correlations.'; proc reg data=a; model y=x; title2 'Regression: y=a*x+b'; proc reg data=a; model x=y; title2 'Regression: x=c*y+d'; run;