/* Lesson Reg0601b */ /* File Name = Reg0601b.sas 11/15/20 */ options linesize=72 pagesize=20; options nocenter linesize=78 pagesize=40; options locale='en'; proc printto print = 'StatM20/SAS_out0601b.txt' new; ods listing gpath='StatM20/SAS_ODS06'; /* proc printto log = '/folders/myfolders/Kougi20/SAS_log0601b.txt'; print = '/folders/myfolders/Kougi20/SAS_out0601b.txt' new; ods listing gpath='/folders/myfolders/Kougi20/SAS_ODS0601a' new; */ data gakusei; infile 'StatM20/StudAll20c.csv' firstobs=8 dlm=',' dsd missover encoding=sjis termstr=crlf; input sex $ shintyou taijyuu kyoui jitaku : $9. kodukai carryer $ tsuuwa; if shintyou='.' or taijyuu='.' or kyoui='.' 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;