Re: [R] Weibull survival regression

2004-11-23 Thread Ale iberna
)~1, data=lung, dist='weibull') plot(survfit(Surv(time,status),data=lung)) curve(exp(-(exp(-lung.wbs$coef[1])*x)^(1/lung.wbs$scale)),col=red,add=T) - Original Message - From: Eric Lim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 7:56 AM Subject: [R] Weibull

Re: [R] Weibull survival regression

2004-11-23 Thread Ale iberna
PS: You can plot hazard in a similar way Best regards, Ale iberna - Original Message - From: Eric Lim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 7:56 AM Subject: [R] Weibull survival regression Dear R users, Please can you help me with a relatively

Re: [R] Weibull survival regression

2004-11-23 Thread Göran Broström
On Tue, Nov 23, 2004 at 06:56:56AM -, Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where

Re: [R] Weibull survival regression

2004-11-23 Thread Frank E Harrell Jr
Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months and status is

Re: [R] Weibull survival regression

2004-11-23 Thread Thomas Lumley
On Tue, 23 Nov 2004, Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months

[R] Weibull survival regression

2004-11-23 Thread Eric Lim
A big thank you to everyone who responded... Using Ale iberna solution with the lung dataset, I obtained: plot(survfit(Surv(time,status),data=lung)) Error in Surv(time, status) : Time variable is not numeric In addition: Warning message: is.na() applied to non-(list or vector) in: is.na(time)

Re: [R] Weibull survival regression

2004-11-23 Thread Thomas Lumley
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

[R] Weibull survival regression

2004-11-22 Thread Eric Lim
Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months and status is 1=dead and 0=alive.