SAS警告:数据点完全分离。最大似然估计不存在
我使用如下所示的数据库在SAS中进行了对数回归,但得到了几个警告。我试图识别异常值并排除它们,然后测试多重线性,但仍然收到警告。 如有任何建议,将不胜感激SAS警告:数据点完全分离。最大似然估计不存在,sas,logistic-regression,proc,Sas,Logistic Regression,Proc,我使用如下所示的数据库在SAS中进行了对数回归,但得到了几个警告。我试图识别异常值并排除它们,然后测试多重线性,但仍然收到警告。 如有任何建议,将不胜感激 **********************************; ************** database **********; ***********************************; data D_BP; input BP Age Weight BSA Dur Pulse Stress; datalin
**********************************;
************** database **********;
***********************************;
data D_BP;
input BP Age Weight BSA Dur Pulse Stress;
datalines;
0 47 85.4 1.75 5.1 63 33
0 51 89.4 1.89 7 72 95
0 47 90.9 1.9 6.2 66 8
0 49 89.2 1.83 7.1 69 62
0 48 92.7 2.07 5.6 64 35
0 47 94.4 2.07 5.3 74 90
0 50 95 2.05 10.2 68 47
0 45 87.1 1.92 5.6 67 80
0 46 94.5 1.98 7.4 69 95
0 46 87 1.87 3.6 62 18
0 46 94.5 1.9 4.3 70 12
0 48 90.5 1.88 9 71 99
1 49 94.2 2.1 3.8 70 14
1 49 95.3 1.98 8.2 72 10
1 50 94.7 2.01 5.8 73 99
1 48 99.5 2.25 9.3 71 10
1 49 99.8 2.25 2.5 69 42
1 49 94.1 1.98 5.6 71 21
1 52 101.3 2.19 10 76 98
1 56 95.7 2.09 7 75 99
;
run;
****** do logistic regression **********;
Proc logistic data=work.D_bp;
Model BP=Age Weight BSA Dur Pulse Stress;
Run;
**** identify outlier *********;
proc reg data=work.D_bp plots(only
label)=(RStudentByLeverage CooksD);
model BP=Age Weight BSA Dur Pulse Stress ;
run;
**** After removing outliers ==> assess multicollinearity*********;
**** assessing multicollinearity by 2 ways *********;
proc corr data=work.D_bp ;
Var Age Weight BSA Dur Pulse Stress;
run;
proc reg data=work.D_bp plots;
Model BP=Age Weight BSA Dur Pulse Stress/Collin vif tol;
run;
****** repeat logistic regression after excluding weight **********;
Proc logistic data=work.D_bp;
Model BP=Age BSA Dur Pulse Stress;
Run;
警告:数据点完全分离。最大似然估计确实如此
不存在。
警告:尽管有上述警告,后勤程序仍在继续。结果显示
基于上一次最大似然迭代。模型拟合的有效性得到了验证
有问题
您没有足够的数据来预测如此多的预测值。在模型中尝试FIRTH选项,如:model BP=年龄-体重BSA Dur Pulse Stress/FIRTH,并查看SAS文档以获取此解决方案。@crow16384 Thx以获取宝贵的输入。它在排除了许多独立的预测因素后起作用。我也尝试了你的代码,它的工作。谢谢你的建议。向上投票!