I am asking this in the context of wanting to diagnose for violation of proportional hazard assumption and its correction. (Schemper 1992)
On p.179 of Hosmer, Lemeshow and May, it says that we can not simply take the product of covariate and observed value of time. I.e. we cannot define a new variable as
Treat_t <- Treat * Time
And then include Treat_t in the model. I know in SAS, this could be done by including Treat_t = Treat * Time statement within PROC PHREG. I tried in R
f5.time <- cph(S ~ rcs(Age, 5) + Stage + Surgery + ChemoN + RaceN + Surgery*ChemoN + Stage*Surgery + Stage*ChemoN + ChemoN*log(FollowUp+1) + Surgery*log(FollowUp+1) + RaceN*log(FollowUp+1), x=T, y=T, surv=T, time.inc = 5*365)
and the result is way off. In all fairness, the documentation (http://www.inside-r.org/packages/cran/rms/docs/Mean.cph) of cph only says that it can fit this extension of Cox model: "interval time-dependent covariates, time-dependent strata, and repeated events"
So, I am wondering:
- If it is at all possible to do this in R (using rms or otherwise)?
- Assuming that could be fit, would I still be able to use validate.cph to compute a valid Dxy? I know it is not possible to calibrate.cph when there is time dependent covariates (Error in validation of a Cox PH model using rms package in R).
- If 2 is not valid, how do I test if model with the time-varying covariates have greater predictive power than the older model?
Thank you so much!
- Schemper, M. (1992); Cox analysis of survival data with non-proportional hazard functions