[R] Weibull survival regression

Thomas Lumley tlumley at u.washington.edu
Wed Nov 24 00:27:49 CET 2004


On Tue, 23 Nov 2004, Eric Lim wrote:
>
> Using Thomas Lumley's solution with the lung dataset, I obtained:
>
>> curve(pweibull(x, scale=1/coef(lung.wbs), shape=1/lung.wbs$scale,
>      lower.tail=FALSE),from=0, to=max(lung$time))
>

That's because you read the part of the message where I got the 
reparametrization wrong, rather than the part where I got right.

It should be
  curve(pweibull(x, scale=exp(coef(lung.wbs)), shape=1/lung.wbs$scale,
       lower.tail=FALSE),from=0, to=max(lung$time))


 	-thomas




More information about the R-help mailing list