Dan*_*ham 5 r cox-regression na logistic-regression
我不知道我是否需要删除一些数据,或者这里发生了什么。模型 1 和 2 工作得很好。Model 3 无法运行。
model1 <- clogit(Used ~ Slope + strata(OBJECTID), data=old)
model2 <- clogit(Used ~ Aspect + strata(OBJECTID), data=old)
model3 <- clogit(Used ~ Slope + Aspect + strata(OBJECTID), data=old)
Run Code Online (Sandbox Code Playgroud)
模型 3 给出以下错误:
> Error in fitter(X, Y, strats, offset, init, control, weights =
> weights, : NA/NaN/Inf in foreign function call (arg 5)
Run Code Online (Sandbox Code Playgroud)
它还给出以下警告:
> In fitter(X, Y, strats, offset, init, control, weights = weights, :
> Ran out of iterations and did not converge
Run Code Online (Sandbox Code Playgroud)
我不太关心警告,因为其他模型也给出了这个,但实际上有输出。
如果需要,我可以发布数据,或者如果您有一个可以为我指明正确方向的想法,那就太棒了。
-担
****** 附加信息 *******
RPackages:生存
> o.s.model <- clogit(Used ~ Slope + strata(OBJECTID), data=old)
> o.a.model <- clogit(Used ~ Aspect + strata(OBJECTID), data=old)
> o.sa.model <- clogit(Used ~ Slope + Aspect + strata(OBJECTID), data=old)
Error in fitter(X, Y, strats, offset, init, control, weights = weights, :
NA/NaN/Inf in foreign function call (arg 5)
In addition: Warning message:
In fitter(X, Y, strats, offset, init, control, weights = weights, :
Ran out of iterations and did not converge
>
Run Code Online (Sandbox Code Playgroud)
Slope 和 Aspect 都是数字。
数据集位于:https : //drive.google.com/file/d/1AXKMJnDs_JYZmy_gB3IaMXHL34_ejxz3/view?usp=sharing
| 归档时间: |
|
| 查看次数: |
3692 次 |
| 最近记录: |