data d1;
INFILE 'c:\mySAS\mydata.txt';
INPUT y x1 x2 x3 x4 x5;
LABEL y='隊員總人數' x1='工商界人士' x2='公教員工' x3='退休員工' x4='家庭管理' X5='學生';
proc print label;
proc reg;
model y=x1 x2 x3 x4 x5
/selection=forward sle=0.05;
proc reg;
model y=x1 x2 x3 x4 x5
/selection=backward sle=0.05;
proc reg;
model y=x1 x2 x3 x4 x5
/selection=stepwise sle=0.05;
proc rsquare adjrsq mse cp AIC SBC;
model y=x1 x2 x3 x4 x5 ;
proc reg corr covout;
model y=x1 x2 x3 x4 x5 /R DW tol influence vif;
output p=predict r=residual;
proc plot;
plot residual*predict;
proc sort;
by y;
proc univariate plot normal;
var residual;
proc reg;
model y=x1 x2 x3 x4 x5/ss1 ss2;
proc autoreg;
model y=x1 x2 x3 x4 x5/dwprob;
proc plot hpercent=100 vpercent=50;
plot y*x1='$' y*x2='$' y*x3='$' y*x4='$' y*x5='$';
symbol I=RLCLI V=# H=2 CV=blue CI=green CO=orange;
goptions vsize=3 in hsize=5;
proc gplot;
plot residual*x1;
plot residual*x2;
plot residual*x3;
plot residual*x4;
plot residual*x5;
run; |