[R] help

董忠信 06dongsheng at 163.com
Mon Sep 2 19:33:19 CEST 2013









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
  




More information about the R-help mailing list