reg6_5.sas
来自「黄燕 吴平《SAS统计分析及应用》 书中一些例子的SAS程序代码」· SAS 代码 · 共 25 行
SAS
25 行
data data_prg.reg6_5a;
set data_prg.reg6_5;
x11=x1*x1 ;
x22=x2*x2;
x33=x3*x3;
run;
proc reg data=data_prg.reg6_5a; /*第1个REG过程用多种方法筛选变量 */
model y=x1-x3 / selection=backward;
model y=x1-x3 / selection=stepwise ;
model y=x1-x3 / selection=stepwise noint;
model y=x1-x3 x11 x22 x33 / selection=backward noint;
model y=x1-x3 x11 x22 x33 / selection=stepwise noint;
model y=x1-x3 x11 x22 x33 / selection=maxr start=1 stop=5 noint;
model y=x1-x3 x11 x22 x33 /selection=minr start=1 stop=5 noint;
run;
proc reg data=data_prg.reg6_5a;
/*第2个REG过程,对确定的变量进行模型拟合并进行预测、共线性检验 */
model y=x1 x2 x11 x22 /noint selection=stepwise p r cli influence
collin collinoint;
model y=x2 x11 x22 /noint p r cli influence collin collinoint;
output out=data_prg.reg6_5d predicted=pdc;
run;
proc print data=data_prg.reg6_5d (drop=x11 x22 x33 x55);
run;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?