r - R 生存包 - survreg 在使用大间隔时报告奇点
问题描述
我在尝试使用生存包进行区间回归时遇到了一个问题。目标仅仅是使用区间删失数据来估计常数。
> library(survival)
> y = with(data, Surv(lb, ub, type = "interval2"))
> model_y = survreg(y ~ 1, dist = "gaussian")
> model_y
Call:
survreg(formula = y ~ 1, dist = "gaussian")
Coefficients: (1 not defined because of singularities)
(Intercept)
NA
Scale= 256178.4
Loglik(model)= -6186.5 Loglik(intercept only)= -6186.5
n=2556 (132 observations deleted due to missingness)
对于截距报告 NA。此外,显示“(1未定义,因为奇异性)”的备注。
但是,一旦我将区间的范围缩小一个常数因子,就会得到正确的结果(适用于整数 > 3):
> library(survival)
> y = with(data, Surv(lb/4, ub/4, type = "interval2"))
> model_y = survreg(y ~ 1, dist = "gaussian")
> model_y
Call:
survreg(formula = y ~ 1, dist = "gaussian")
Coefficients:
(Intercept)
567.184
Scale= 64000.89
Loglik(model)= -6186 Loglik(intercept only)= -6186
n=2556 (132 observations deleted due to missingness)
有没有人知道为什么会这样?
亲切的问候
解决方案
推荐阅读
- php - php concat 数组值到新数组 php
- raspberry-pi - Raspberry pi 可以同时配置为 WIFI ap 和客户端吗?
- tinymce - 是否可以使用 tinymce 生成表的自定义配置?
- javascript - 如何处理 expressJs 回调以及如何在函数内更新对象的属性?
- bash - 单独运行 bash 脚本与在另一个脚本中运行会产生不同的变量值
- c++ - 在 C++ 中的文本中查找模式
- swift - AddTapGesture 不适用于某些 imageViews 但不适用于其他
- macos - 为什么很多.pkg(安装包)在分发之前要转换成可挂载的磁盘映像(.dmg)
- speech-recognition - 'Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE' 的类型初始化程序引发异常
- corda - 广播旧交易会导致 2 个未消费状态