/* Lesson 12-2 */ /* File Name = les1202.sas 07/05/07 */ options linesize=72 pagesize=20; data gakusei; infile 'all07ae.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if sex^='M' & sex^='F' then delete; if shintyou=. | taijyuu=. | kyoui=. then delete; proc print data=gakusei(obs=10); run; proc corr data=gakusei; where sex='M'; run; proc reg data=gakusei; model taijyuu=shintyou kyoui; where sex='M'; output out=outreg1 predicted=pred1 residual=resid1; run; proc print data=outreg1(obs=15); run; proc plot data=outreg1; where sex='M'; plot taijyuu*shintyou; plot taijyuu*kyoui; plot taijyuu*pred1; plot resid1*(pred1 shintyou kyoui taijyuu)/vref=0; /* plot resid1*pred1 /vref=0; plot resid1*shintyou/vref=0; plot resid1*kyoui /vref=0; plot resid1*taijyuu /vref=0; */ run; proc univariate data=outreg1 plot normal; var resid1; run;