/* Lesson Reg0602b */ /* File Name = Reg0602b.sas 01/19/21 */ /* Original File Name = Reg0602b.sas 11/15/20 */ options nocenter linesize=78 pagesize=30; options locale='en_US'; /* options locale='ja_JP'; */ proc printto print = 'StatM20/Reg0602b-Results.txt' new; ods listing gpath='/folders/myfolders/Kougi20/SAS_ODS06'; data gakusei; infile 'StatM20/StudAll20e.csv' firstobs=8 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=outreg2 predicted=pred2 residual=resid2; run; proc print data=outreg2(obs=15); run; proc plot data=outreg2; 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=outreg2 plot normal; var resid2; run;