dwinsemius at comcast.net
Fri May 17 21:55:08 CEST 2013
On May 17, 2013, at 11:55 AM, masumeh akhgar 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) ~
> data=rem.data,tt=function(x,t,...) log(t)*x))
After reading the help page it seems pretty clear that the 'tt' argument has a very special purpose and that it is not designed to inserting transformations of anything other than time-related transformations. Applying a tt() function to 'logwbc' or to 'SEX' makes no sense at all. In the help page the `tt` function is applied to the age variable and is intended to advance a subject's age value forward as they …. wait for it…. "age" (used now as an English verb rather than a numeric value). Other transformations would need to be built in the usual manner in the formula or by constructing transformed variables in the input dataset.
Alameda, CA, USA
More information about the R-help