[R] survival function with a Weibull dist

Thomas Lumley tlumley at u.washington.edu
Thu Sep 21 17:35:20 CEST 2006


On Thu, 21 Sep 2006, Anaid Diaz wrote:

> Hi
> I am using R to fit a survival function to my data
> (with a weibull distribution).
>
> Data: Survival of individuals in relation to 4
> treatments ('a','b','c','g')
>
> syntax:
> ----  > survreg(Surv(date2)~males2, dist='weibull')
>
> But I have some problems interpreting the outcome and
> getting the parameters for each curve.
>
> ---------              Value Std. Error      z
> p
> ---------  (Intercept)  2.788      0.147 19.022
> 1.13e-80
> --------- males2b     -0.107      0.207 -0.519
> 6.04e-01
> --------- males2c     -0.486      0.586 -0.831
> 4.06e-01
> --------- males2g      0.580      0.207  2.798
> 5.15e-03
> --------- Log(scale)  -1.116      0.139 -8.007
> 1.18e-15
> ---------
> --------- Scale= 0.328
>
>
> I know from Venables & Ripley (2002) that the
> parameters of this function should be two:

"this function" being which function? As help(survreg.distributions) says
      The Weibull distribution is not parameterised the
      same way as in 'rweibull'.

In your model the survival time is a variable whose logarithm has 
distribution

    2.788-0.107males2b-0.486males2c+0.580males2g+epsilon*0.328

where epsilon has cdf F=1-e^{-e^t}.

As in the example on help(survreg.distributions) shows, a survreg Weibull 
model with linear predictor M and scale S corresponds to R's weibull 
distribution with scale exp(M) and shape 1/S.

 	-thomas



More information about the R-help mailing list