1
$\begingroup$

Under the Weibull parametric model, we assume the survival time $T \sim \text{Weibull}(\alpha, \lambda)$, with density $f_T(t) = \alpha \lambda (\lambda t)^{\alpha - 1} \exp(-(\lambda t)^\alpha)$. Then the mean would be $ET = \Gamma(1+1/\alpha)/\lambda$ (from wiki, although they use $1/\lambda$ for the scale and $k$ for the shape). I'm trying to fit a Weibull model to a dataset, but I find there's a discrepancy between the estimated mean survival time from the model, and the mean I calculate using the fitted parameters:

> library(survival)
> data(kidney)
> m <- survreg(Surv(time,status)~1,data=kidney[kidney$sex==1,],dist="weibull")
> predict(m)[1]
[1] 50.37909 # estimate from the model
> summary(m)
> alpha <- 1/m$scale
> lambda <- 1/exp(m$coef)
> gamma(1+1/alpha)/lambda
[1] 62.0962  # my calculation using the formula for expected value

What's the reason for this difference?

$\endgroup$

1 Answer 1

2
$\begingroup$

The second part of your calculations is correct. You can verify this with a simple simulation:

> set.seed(1234)
> mean(rweibull(1e5, shape = alpha, scale = 1/lambda))
[1] 62.00408

predict.survreg does not return the expected survival time. For details see for example this answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.