sas - SAS 警告:数据点完全分离。最大似然估计不存在
问题描述
我使用下面显示的数据库在 SAS 中进行了逻辑回归,但收到了几个警告。我试图识别异常值并排除它们,然后测试多重共线性,但我仍然收到警告。任何建议将不胜感激。
**********************************;
************** 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;
警告:数据点完全分离。最大似然估计不存在。警告:尽管有上述警告,LOGISTIC 程序仍在继续。显示的结果基于最后一次最大似然迭代。模型拟合的有效性值得怀疑。
解决方案
推荐阅读
- python - matplotlib:轴边框和刻度线/标签位置
- neural-network - About RNN with variable length vectors
- spring-kafka - spring-kafka 监听器关闭
- spring-boot - How to validate facebook authorization token and sign up user using Spring(java)
- php - MySQL 用于选择两列的最大差异
- javascript - Why WebGL build disables Mouse Wheel Scroll on webpage?
- wso2 - WSO2 API 管理器 - 发布 API 在技术上是如何工作的?
- c - Communication between processes - pipe and fifo
- r - 使用耦合列从宽到长:是否有更多 R 方法来做到这一点(即 - 不使用 for 循环)?
- javascript - 如何检查地图功能是否完成