/* Lesson 15-33 */ /* File Name = les1533.sas 07/24/03 */ /* 重回帰分析 : 本来は適用できる構造にはなってないが */ options linesize=72 pagesize=20; data magaz; infile 'magazine.txt' firstobs=2 dlm='09'x; input WDS SEN SYL MAG GROUP; run; proc print data=magaz(obs=5); run; title "*** model MAG=WDS SEN SYL ***"; proc reg data=magaz; model MAG=WDS SEN SYL; output out=outreg1 predicted=pred1 residual=resid1; run; /* proc print data=outreg1(obs=5); run; proc plot data=outreg1; plot MAG*pred1; plot resid1*pred1 /vref=0; plot resid1*WDS/vref=0; plot resid1*SEN /vref=0; plot resid1*SYL/vref=0; run; proc univariate data=outreg1 plot normal; var resid1; run; */ title "*** model GROUP=WDS SEN SYL ***"; proc reg data=magaz; model GROUP=WDS SEN SYL; output out=outreg2 predicted=pred2 residual=resid2; run; /* proc print data=outreg2(obs=5); run; proc plot data=outreg2; plot MAG*pred2; plot resid2*pred2 /vref=0; plot resid2*WDS/vref=0; plot resid2*SEN /vref=0; plot resid2*SYL/vref=0; run; proc univariate data=outreg2 plot normal; var resid2; run; */