[R] interpreting Weibull survival regression

Göran Broström gb at stat.umu.se
Sun Jun 26 15:52:21 CEST 2005


On Fri, Jun 24, 2005 at 11:27:28AM -0400, sms13+ at pitt.edu wrote:
> Hi,
> I was wondering if someone can help me 
> interpret the results of running 
> weibreg.
> 
> I run the following and get the 
> following R output.
> > weibreg(Surv(time, censor)~covar)
> fit$fail =  0
> Call:
> weibreg(formula = Surv(time, 
> censor)~covar)
> 
> Covariate           Mean       Coef 
> Rel.Risk      L-R p   Wald p
> covar     319.880    -0.002     0.998 
> 0.000
> 
> log(scale)          0.000     8.239 
> 3786.326               0.000
> log(shape)          0.000     0.265 
> 1.304               0.000
> 
> Events                    172
> Total time at risk        845891
> Max. log. likelihood      -1609.4
> LR test statistic         34.4
> Degrees of freedom        3
> Overall p-value           1.65026e-07
> 
> 
> I would just like to find the estimated 
> mean survival time as a function of the 
> covariate in the model, but am not sure 
> how to use this output to find that.
> Any help would be greatly appreciated.

The fitted model is a distribution with hazard function

h(t; a, b, z) = (a/b)(t/b)^(a-1)exp(beta*z),

where a = "baseline shape" and b = "baseline scale". z is your "covar" and
beta is the estimated regression coefficient. It is an easy exercise to
show that this is the hazard function of a Weibull distribution with shape
a  and scale  b*exp(-beta*z/a). Thus the mean is 

E(T) = b*exp(-beta*z/a)*gamma(1+1/a) ## See ?Weibull

Here gamma is the usual gamma function, see ?gamma. (I notice in the R
documentation of the Weibull distribution that "E(X) = b Gamma(1+1/a)",
which is an error; the G should be g (lowercase).) 

In your case, a = 1.304, b = 3786.326, beta = -0.002, so

E(T) = 3495 * exp(0.00153 * z) 

(given my calculations are correct).

Hth,

Göran

> 
> Thank you,
> Steven
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Göran Broström                    tel: +46 90 786 5223
Professor and Head
Department of Statistics          fax: +46 90 786 6614
Umeå University                   http://www.stat.umu.se/~goran.brostrom/
SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se




More information about the R-help mailing list