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) ~
> RX+LOGWBC+SEX+tt(RX)+tt(LOGWBC)+tt(SEX),
> 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.

-- 

David Winsemius
Alameda, CA, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to