/* Lesson 03-01_10 */ /* File Name = les0301_10.sas 01/11/11 */ /* options linesize=72 pagesize=20; */ options linesize=72 pagesize=30; data gakusei; infile 'all10ae.csv' firstobs=2 dlm=',' truncover missover dsd ; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if sex^='M' & sex^='F' then delete; if shintyou=. | taijyuu=. then delete; if taijyuu> 90 then delete; if kodukai>=200000 then delete; proc print data=gakusei(obs=10); run; proc reg data=gakusei; model taijyuu=shintyou; output out=outreg1 predicted=pred1 residual=resid1; run; proc print data=outreg1(obs=15); run; proc plot data=outreg1; plot taijyuu*shintyou/vaxis=20 to 100 by 20; plot pred1*taijyuu; plot resid1*pred1 /vref=0; plot resid1*shintyou/vref=0; plot resid1*taijyuu /vref=0; run; proc univariate data=outreg1 plot normal; var resid1; run;