/* Lesson Reg0403 */ /* File Name = Reg0403.sas 10/24/21 */ options linesize=72 pagesize=20; options nocenter linesize=78 pagesize=40; options locale='en'; proc printto print = 'StatM21/Reg0403-Results.txt' new; /* ods listing gpath='StatM21/SAS_ODS01'; */ ods listing gpath='StatM21/SAS_ODS_Reg0403'; data gakusei; infile 'StatM21/StudAll21c.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; 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=outreg3 predicted=pred3 residual=resid3; run; proc print data=outreg3(obs=15); run; proc plot data=outreg3; plot taijyuu*shintyou/vaxis=20 to 100 by 20; plot taijyuu*kyoui/vaxis=20 to 100 by 20; plot pred3*taijyuu; plot resid3*shintyou/vref=0; plot resid3*kyoui /vref=0; plot resid3*taijyuu /vref=0; run; proc univariate data=outreg3 plot normal; var resid3; run;