# Is it okay to use time as a covariate in a survival model?

I am new to survival modeling and the Cox-PH model is quite simple with $$\lambda(t|x;\beta) = \lambda_0(t) \exp(x'\beta).$$ where $x$ does not depend on time. I'm wondering if it is also possible to include time and functions thereof as covariates in order to make less strict parametric assumptions regarding the baseline hazard. Consider the following $$\lambda(t|x;\beta,\alpha) = \lambda_0(t) \exp(x'\beta + \alpha_1 t + \alpha_2 t^2 + \alpha_3 \log(t) + \ldots).$$

This seems equivalent to picking a different baseline hazard $$\lambda(t|x;\beta,\alpha) = \lambda_1(t ; \alpha) \exp(x'\beta)$$ where $$\lambda_1(t ; \alpha) = \lambda_0(t) \exp(\alpha_1 t + \alpha_2 t^2 + \alpha_3 \log(t) + \ldots),$$ but you can fit it using all the normal software for fitting the Cox-PH model.

Is this a reasonable thing to do?

## 1 Answer

You need a different likelihood function to handle time-dependent covariates. The best explanation I've seen is at https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf which is a vignette for the R survival package (one of many incredible vignettes that comes with this package by Therneau).

• I see. Is there a standard background article on what changes with time-dependent covariates? Thanks! – ted Jan 29 '17 at 4:03
• I'm not clear on what you are asking. – Frank Harrell Jan 29 '17 at 14:04
• An article that discusses what procedures or assumptions change for the cox ph model once you add time dependent covariates. – ted Feb 5 '17 at 5:31
• The pdf file I provided above. – Frank Harrell Feb 5 '17 at 14:33
• @ted think this might be what you are looking for math.ucsd.edu/~rxu/math284/slect7.pdf – jeffmax Jun 22 '17 at 21:05