)~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
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
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
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
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
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)
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
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.