[R] Re: survfit on coxph object with weights

Nicholas Lewin-Koh nikko at hailmail.net
Thu Jul 18 08:08:27 CEST 2002


Hi,

That was fast! No I don't need the CI's right now, just the predictions.
That did just the trick. I must of looked everywhere in the
documentation except coxph.detail. 

Thank you

Nicholas



On Thu, 2002-07-18 at 12:27, Terry Therneau wrote:
>  If you don't need the confidence intervals, which is the part of the formula
> that I got hung up on, then there is an easy way to get the survival curve.
> (A continual succession of other things to do has kept me from getting back to
> this problem.)
> 
>    fit <- coxph(Surv(.....  etc etc
>    details <- coxph.detail(fit)
>    
> The coxph.detail routine was originally written for debugging; it returns
> nearly every intermediate internal computation that coxph does.
> 
>   The cumulative hazard can be plotted as
>   
>   	plot(details$time, cumsum(details$hazard))
>   	   
> This is for a hypothetical subject whose covariates are details$means[1,].
> For a general subject with covariates x, multiply the cumulative hazard
> by exp(sum(fit$coef * (x-details$means)))
> 
> 	Terry Therneau
> 	
> 	  	   
>   	   
> 
> 


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list