Y X1 X2
1 13 10 17 11 14 01 13 10 15 01 11 1
数据(略)
要分析并预测在X1在18以上、X2为1的情况下,Y为1的概率,
急啊!
各位大家帮忙下!谢谢
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
0、1变量可视作虚拟变量,不正好省事了吗?
proc logistic data=XX descending;
model y=X1 X2;
run;
after you get the coefficients then you can get the P for y=1
data own;input type x1-x3;cards;0 11 01 13 01 14 00 12 01 18 11 20 10 9 01 13 10 12 01 14 01 13 10 15 01 11 1;proc logistic;model type=x1-x3/selection=stepwise sle=0.3 sls=0.3;output out=result p=predi xbeta=XI;run;proc print data=result;run;有大侠能帮小弟改下吗?
不可取。
这个不能用虚拟变量来代替,代替了的话,就没有分析的意义了
Faint , you have only 2 predictors , no need to do selection