从Survreg解释Weibull参数 [英] Interpreting Weibull parameters from survreg

查看:384
本文介绍了从Survreg解释Weibull参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用R中survreg估计的参数生成逆Weibull分布.这意味着我想针对给定的概率(在MS Excel中实现的小型仿真模型中为随机数) ,使用我的参数返回预期的故障时间.我理解逆Weibull分布的一般形式为:

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)

其中a和b分别是形状和比例参数,X是我想要的失效时间.我的问题是来自survreg的intercept和协变量参数的解释.我有这些参数,时间单位是天:

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)

我已经阅读了帮助文件,其中R的系数来自极值分布",但是我不确定这的真正含义以及我如何返回"公式中直接使用的标准比例参数.使用b = 7.79和a = 1.51会给出无意义的答案.我真的希望能够为基础组和组2"生成时间.我还应该注意,我自己没有执行分析,也无法进一步查询数据.

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.

推荐答案

这在手册页?survreg(在示例"部分中)中进行了说明.

This is explained in the manual page, ?survreg (in the "examples" section).

library(survival)
y <- rweibull(1000, shape=2, scale=5)
r <- survreg(Surv(y)~1, dist="weibull")
a <- 1/r$scale      # Approximately 2
b <- exp( coef(r) ) # Approximately 5
y2 <- b * ( -ln( 1-runif(1000) ) ) ^(1/a)
y3 <- rweibull(1000, shape=a, scale=5)
# Check graphically that the distributions are the same
plot(sort(y), sort(y2))
abline(0,1)

这篇关于从Survreg解释Weibull参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆