/* Lesson 05-2 */ /* File Name = les0502.sas 11/09/17 */ options linesize=72 pagesize=20; options nocenter linesize=78 pagesize=20; proc printto log = '/folders/myfolders/Kougi/SAS_log0502.txt' print = '/folders/myfolders/Kougi/SAS_out0502.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 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;