[R] tt function and coxph

Terry Therneau therneau at mayo.edu
Tue May 21 16:58:06 CEST 2013



On 05/18/2013 05:00 AM, r-help-request at r-project.org wrote:
> hi all
> this command used tt function for all variables.
> How can i define a different function for each variable?
>   >  exCox.all<-coxph(Surv(SURVT,STATUS) ~
> RX+LOGWBC+SEX+tt(RX)+tt(LOGWBC)+tt(SEX),
> data=rem.data,tt=function(x,t,...) log(t)*x))
> thank you
>
There is currently no way to do what you ask.  Could you give me an example of why it is
necessary?  I'd never thought of adding such a feature.

Terry Therneau



More information about the R-help mailing list