📄 reg6_5.sas
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -