[R] Weibull survival regression
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Tue Nov 23 13:11:22 CET 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 and status is 1=dead and 0=alive.
>
> Using the survival package:
>
> lung.wbs <- survreg( Surv(futime, status)~ 1, data=lung, dist='weibull')
>
> plot (lung.wbs)
>
> Returns the error msg:
>
> Error in xy.coords(x, y, xlabel, ylabel, log) :
> x and y lengths differ
>
> Using the Design package:
>
> lung.wbd <- psm (Surv (futime, status)~ 1, dist="weibull", data=lung,
> na.action=na.omit)
You don't need to specify na.action here.
>
> survplot(lung.wbd)
>
> Returns the error msg:
>
> Error in survplot.Design(lung.wbd) : fit does not have design
> information
survplot only works when there is at least one covariate. Sorry. Maybe
someday ...
-Frank Harrell
> Regards,
>
> Eric Lim
> Papworth Hospital
> Cambridge, UK
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list