本人SAS新人,由于课题需要用到SAS做多元线性回归。
数据中有22个自变量,这里用CP值来筛选最优回归方程,命令如下:
proc reg data=test15;
model y=x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22/selection=cp stop=3;
run;
OUTPUT如下:
Number in
Model C(p) R-Square Variables in Model
3 . 0.9623 x13 x14 x16
3 . 0.9587 x12 x13 x16
LOG如下:
NOTE: 11 observations read.
NOTE: 11 observations used in computations.
ERROR: Invalid Operation.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 11 observations read from the data set WORK.TEST15.
NOTE: PROCEDURE REG used:
real time 0.48 seconds
cpu time 0.04 seconds
不知道为什么就算不出CP值,而我计算另一组有22个自变量的数据时算的很顺利,求各位达人帮忙看下,谢谢!