data exp4_5;
input x1 x2 x3 x4 y@@;
cards;
7 26 6 60 78.5 1 29 15 52 74.3 11 56 8 20 104.3 11 31 8 47 87.6
7 52 6 33 95.9 11 55 9 22 109.2 3 71 17 6 102.7 1 31 22 44 72.5
2 54 18 22 93.1 21 47 4 26 115.9 1 40 23 34 83.8 11 66 9 12 113.3
10 68 8 12 109.4
;
proc reg data=exp4_5;
model y=x1-x4/selection=rsquare
best=2 cp aic rmse adjrsq;
run;
运行结果:
SAS 系统 2012年12月29日 星期六 上午10时11分08秒 2
The REG Procedure
Model: MODEL1
Dependent Variable: y
R-Square Selection Method
Number of Observations Read 13
Number of Observations Used 13
Number in Adjusted Root
Model R-Square R-Square C(p) AIC MSE Variables in Model
1 0.6745 0.6450 138.7308 58.8516 8.96390 x4
1 0.6663 0.6359 142.4864 59.1780 9.07713 x2
------------------------------------------------------------------------------------------------
2 0.9787 0.9744 2.6782 25.4200 2.40634 x1 x2
2 0.9725 0.9670 5.4959 28.7417 2.73427 x1 x4
------------------------------------------------------------------------------------------------
3 0.9823 0.9764 3.0182 24.9739 2.30874 x1 x2 x4
3 0.9823 0.9764 3.0413 25.0112 2.31206 x1 x2 x3
------------------------------------------------------------------------------------------------
4 0.9824 0.9736 5.0000 26.9443 2.44601 x1 x2 x3 x4