/* Lesson 03-3 */ /* File Name = les0303.sas 10/19/17 */ options linesize=72 pagesize=20; options nocenter linesize=78 pagesize=30; proc printto log = '/folders/myfolders/Kougi/SAS_log0303.txt' print = '/folders/myfolders/Kougi/SAS_out0303.txt' new; ods listing gpath='/folders/myfolders/Kougi/SAS_ODS99'; data gakusei; infile '/folders/myfolders/Kougi/all07ae.prn' firstobs=2; 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; plot resid1*(pred1 shintyou taijyuu)/vref=0; run; proc univariate data=outreg1 plot normal; var resid1; run;