重回帰分析用プログラムの例4 |
以下の reg プロシジャの中の test 文が、偏回帰係数の等質性の検定を行う。
*---------------------------------------------------------------------* | October 22, 1998 | | sas program--mreg_ex4.sas-- | | example 2 of sas programs for multiple regression. | | | | file name: $HOME/sasprog/multivar/mreg_ex4.sas | | | *---------------------------------------------------------------------*; libname sasfile '$HOME/sasset/others'; options pagesize=60; title 'principal FA for the holograph data'; proc factor data=sasfile.Fujiiraw /* method options */ method=p priors=max n=5 rotate=v /* output options */ score outstat=factout; var img1-img29; run; proc score data=sasfile.Fujiiraw score=factout out=scores; run; options pagesize=30; title 'multiple regressions for the Fujii data'; proc reg data=scores simple corr; model factor3=inv1-inv5 yg1-yg12/covb; plot predicted.*factor3; plot residual.*obs.; plot h.*obs.; plot cookd.*obs.; plot dffits.*obs.; b1: test inv1=0,inv2=0,inv3=0,inv4=0,inv5=0, yg1=0,yg2=0,yg3=0,yg4=0,yg5=0,yg6=0, yg7=0,yg8=0,yg9=0,yg10=0,yg11=0,yg12=0; b2: test INTERCEPT=0; b3: test inv1=0; b4: test inv1=1.4; output out=resfile r=resid; run; title 'histogram for residuals'; proc chart data=resfile; vbar resid; run; options pagesize=60; title 'test for normality of the residuals'; proc univariate data=resfile normal; var resid; run; quit; /pre> |
mreg_ex4.sas |