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

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to