解释 survreg 中的威布尔参数
我正在尝试使用从 R 中的 survreg 估计的参数生成逆威布尔分布。我的意思是,对于给定的概率(这将是在 MS Excel 中实现的小型模拟模型中的随机数),返回使用我的参数预计出现故障的时间。我理解逆威布尔分布的一般形式是:
X=b[-ln(1-rand())]^(1/a)
其中 a 和 b 分别是形状和尺度参数,X 是我想要的失效时间。我的问题在于解释 survreg 的截距和协变量参数。我有这些参数,时间单位是天:
Value Std. Error z p
(Intercept) 7.79 0.2288 34.051 0.000
Group 2 -0.139 0.2335 -0.596 0.551
Log(scale) 0.415 0.0279 14.88 0.000
Scale= 1.51
Weibull distribution
Loglik(model)= -8356.7 Loglik(intercept only)= -8356.9
Chisq = 0.37 on 1 degrees of freedom, p= 0.55
Number of Newton-Raphson Iterations: 4
n=1682 (3 observations deleted due to missing values)
我在帮助文件中读到 R 的系数来自“极值分布”,但我不确定这真正意味着什么以及如何“回到”直接在公式中使用的标准比例参数。使用 b=7.79 和 a=1.51 给出了无意义的答案。我真的希望能够为基础组和“第二组”生成一个时间。我还应该指出,我自己没有进行分析,无法进一步询问数据。
I am trying to generate an inverse Weibull distribution using parameters estimated from survreg in R. By this I mean I would like to, for a given probability (which will be a random number in a small simulation model implemented in MS Excel), return the expected time to failure using my parameters. I understand the general form for the inverse Weibull distribution to be:
X=b[-ln(1-rand())]^(1/a)
where a and b are shape and scale parameters respectively and X is the time to failure I want. My problem is in the interpretation of the intercept and covariate parameters from survreg. I have these parameters, the unit of time is days:
Value Std. Error z p
(Intercept) 7.79 0.2288 34.051 0.000
Group 2 -0.139 0.2335 -0.596 0.551
Log(scale) 0.415 0.0279 14.88 0.000
Scale= 1.51
Weibull distribution
Loglik(model)= -8356.7 Loglik(intercept only)= -8356.9
Chisq = 0.37 on 1 degrees of freedom, p= 0.55
Number of Newton-Raphson Iterations: 4
n=1682 (3 observations deleted due to missing values)
I have read in the help files that the coefficients from R are from the "extreme value distribution" but I'm unsure what this really means and how I get 'back to' the standard scale parameter used directly in the formulae. Using b=7.79 and a=1.51 gives nonsensical answers. I really want to be able to generate a time for both the base group and 'Group 2'. I also should note that I did not perform the analysis myself and cannot interrogate the data further.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这在手册页
?survreg
(“示例”部分)中进行了解释。This is explained in the manual page,
?survreg
(in the "examples" section).关键是 rweibull 生成的形状参数是 survreg 输入的形状参数的倒数
The key is that the shape parameter the rweibull generates is the inverse of the shape parameter the survreg inputs