/* Lesson 14-01 */ /* File Name = les1401.sas 01/25/22 */ /* Original File File Name = Reg0403.sas 10/24/21 */ options nocenter linesize=78 pagesize=30; options locale='en_US'; /* options locale='ja_JP'; */ proc printto print = 'StatM21/les1401-Results.txt' new; /* ods listing gpath='/folders/myfolders/StatM20/SAS_ODS06'; */ ods listing gpath='StatM21/SAS_ODS14'; data gakusei; infile 'StatM21/StudAll21d.csv' firstobs=9 dlm=',' dsd missover encoding=sjis termstr=crlf; input sex $ shintyou taijyuu kyoui jitaku : $10. kodukai carryer $ tsuuwa; if shintyou='.' or taijyuu='.' or kyoui='.' then delete; if kyoui<60 then delete; if taijyuu>85 then delete; proc print data=gakusei(obs=10); run; proc reg data=gakusei; model taijyuu=shintyou kyoui; output out=out_reg2 predicted=pred2 residual=resid2; run; proc print data=out_reg2(obs=15); run; proc plot data=out_reg2; plot taijyuu*shintyou/vaxis=20 to 100 by 20; plot taijyuu*kyoui/vaxis=20 to 100 by 20; plot pred2*taijyuu; plot resid2*shintyou/vref=0; plot resid2*kyoui /vref=0; plot resid2*taijyuu /vref=0; run; proc univariate data=out_reg2 plot normal; var resid2; run;