菜单

logistic 拟合

data test9_12; /*创建数据集*/
input x1 x2 x3 y;
cards;
1 0 1 1
0 0 1 0
0 1 1 1
1 1 1 1
0 1 0 0
1 2 1 1
0 0 1 0
1 2 0 1
0 1 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 1 1 1
1 1 0 1
1 2 0 1
0 0 1 1
0 1 0 1
0 0 0 1
1 1 1 1
0 0 0 1
0 1 1 0
1 2 0 1
0 2 1 0
0 0 0 1
0 1 0 1
1 2 0 0
0 1 0 1
0 2 0 1
0 0 1 1
1 2 0 0
1 1 1 1
0 0 1 1
1 2 0 1
0 0 1 1
0 1 0 1
0 0 0 1
1 2 0 1
0 0 0 1
0 1 0 0
1 1 1 1
;
run;
proc logistic data=test9_12; /*拟合logistic回归模型*/
model y=x1-x3;
run;