/* Lesson 04-3 */ /* File Name = les0403.sas 10/29/18 */ options nocenter linesize=78 pagesize=30; proc printto log = 'Kougi19/les0402_log.txt' print = 'Kougi19/les0402_Results.txt' new; /* ods listing gpath='Kougi19/SAS_ODS99'; */ data gakusei; infile 'Kougi19/all19bu.csv' firstobs=2 truncover lrecl=80 dlm=',' dsd missover ; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; /* if sex^='M' & sex^='F' then delete; */ if shintyou=. | taijyuu=. then delete; proc print data=gakusei(obs=10); run; proc corr data=gakusei; where taijyuu<85; run; proc reg data=gakusei; model taijyuu=shintyou; where taijyuu<85; output out=outreg1 predicted=pred1 residual=resid1; run; proc print data=outreg1(obs=15); run; proc plot data=outreg1; where taijyuu<85; 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;