# Cox survival model with pre-determined time-dependent covariate

I am working on the Cox survival analysis model with time-dependent covariate, which is a very very common model.

However, in most papers and R packages, I noticed they estimate the parameters of survival model by expanding the time-dependent data as long data (there are multiple rows (time intervals) for each subject), and predict the new data with pre-determined time-dependent path in the same way (as the first answer shown in this link).

My question is, if the time-dependent covariate is a function of time and is predictable, why can't we directly use the analytical method to estimate the parameters. For instance, if $$h_i(t)=h_0(t)\exp(\beta_0w+\beta_1X(t))$$, where h_0(t) following a specific distribution and X(t) is predetermined, then $$S_i(t)=\exp(-\int_0^t h_i(s)ds)$$ and the log-likelihood is $$\sum_1^n f(t_i)^ {\sigma_i} S(t_i)^{1-\sigma_i}$$, where $$\sigma_i$$ is whether the individual i is right censored. And we use the death or censored time $$t_i$$ for each individual to estimate. This estimation looks like joint model with longitudinal data and survival data without the random effect, but our longitudinal data is external not internal.

I am sorry for this naive question, but it has been confusing me for a long time.

The most practical way to deal even with a predictable time-varying covariate is thus to extend the data set with multiple rows for an individual representing each event time at which the individual is at risk, with the value of the predictable time-varying covariate at that time included. Section 5 of the R time-dependence vignette discusses this situation and shows how to use a tt() function to build this extended data set.
• Thanks for your reply! But I want to analyze the baseline model (as it is important for predict), so, I still have two questions: 1. can I assume the baseline distribution in the above Cox model? as I used to see some papers considering the weibull-cox or loglogistic-cox model. 2. If the answer is no for the previous one, can I switch to AFT model with time-dependent covariate where $S_i(t)=S_0(\int_0^t exp(\beta_0w + \beta_1 X(s))ds)$ and estimate parameters using the same MLE way in the question. Jul 10, 2023 at 13:27