/* Lesson 04-3 */ /* File Name = les0403.sas 10/23/18 */ options linesize=72 pagesize=20; options nocenter linesize=78 pagesize=30; proc printto log = 'Kougi/les0403_log.txt' print = 'Kougi/les0403_Results.txt' new; ods listing gpath='Kougi/SAS_ODS99'; data gakusei; infile 'Kougi/all07au.txt' 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 sex='M' and taijyuu<80; run; proc reg data=gakusei; model taijyuu=shintyou kyoui; where sex='M' and taijyuu<80; output out=outreg1 predicted=pred1 residual=resid1; run; proc print data=outreg1(obs=15); run; proc plot data=outreg1; where sex='M' and taijyuu<80; plot taijyuu*shintyou; plot taijyuu*kyoui; plot taijyuu*pred1; plot resid1*(pred1 shintyou kyoui taijyuu)/vref=0; run; proc univariate data=outreg1 plot normal; var resid1; run;