/* Lesson 14-1 */ /* File Name = les1401.sas 10/17/00 */ options linesize=79 pagesize=20; data air; infile 'usair2.prn'; input id $ y x1 x2 x3 x4 x5 x6; /* label y='SO2 of air in micrograms per cubic metre' x1='Average annual temperature in F' x2='Number of manufacturing enterprises employing 20 or more workers' x3='Population size (1970 census); in thousands' x4='Average annual wind speed in miles per hour' x5='Average annual precipitation in inches' x6='Average number of days with precipitation per year' ; */ proc print data=air(obs=10); run; proc corr data=air; run; proc reg data=air; model y=x1 x2 x3 x4 x5 x6; output out=outreg1 predicted=pred1 residual=resid1; run; proc plot data=outreg1; plot resid1*pred1; plot resid1*x1; plot resid1*x2; plot resid1*x3; plot resid1*x4; plot resid1*x5; plot resid1*x6; plot resid1*y; run; proc reg data=air; model y=x1-x6 / selection=stepwise; output out=outreg1 predicted=pred1 residual=resid1; run; proc print data=outreg1(obs=15); run; proc plot data=outreg1; plot resid1*pred1; plot resid1*(x1 x2 x3 x4 x5 x6); plot resid1*(x1-x6); plot resid1*y; run; proc reg data=air; model y=x1-x6 / selection=rsquare; output out=outreg1 predicted=pred1 residual=resid1; run;