[R] using weights with survfit

jgerald at berkeley.edu jgerald at berkeley.edu
Fri Feb 9 03:58:45 CET 2007


Hi,

I am trying to do a weighted cox regression, specifically I need a
weighted estimate of the baseline survival function.  I'm getting an
'unused argument' error when I try to use the weights option in survfit. 
Looking at the code, it looks as though the documentation may be wrong and
you actually can't use weights with survfit at this time where it says

if (!is.null((object$call)$weights))
        stop("Survfit cannot (yet) compute the result for a weighted model")

Are there any alternatives at this time for getting a weighted estimate of
the  baseline survival function from a cox ph model?  I noticed someone
had the same question in 2002 and there were no responses but thought it
was worth a shot!

Thanks,
Jessica



More information about the R-help mailing list