The tt function is documented for coxph, and you are using cph. They are not the same.
On 09/03/2013 05:00 AM, r-help-requ...@r-project.org wrote:
tt<- function(x) { obrien<- function(x) { r<- rank(x) (r - 0.5)/(0.5 + length(r) - r) } unlist(tapply(x, riskset, obrien)) } hi, i am newer in R. when dealing with a survival data, i have found the variable progression was not met the PH assumption.the picture show the residual agaist time.So i use Cox model for time-depandent varibles. i use the default tt in function coxph,but when i use tt in "f<-cph(Surv(os$Stime,os$Status==1)~Metastasis+Surgery+Post.chem. +Age+tt(Progression)+ ALP, data=os, x=T, y=T, surv=TRUE, time.inc=60)",it didn't work. i don't kown what the arg"riskset" is .i beg your help . can you help me write down a appropriate tt expression to let me use in cph. thanks. Zhongxin Dong
______________________________________________ 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.