# 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?

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).