I really appreciate it if you could help me understand the likelihood in a survival model with a time varying covariate. To be more clear, let's first start with a survival analysis with fixed covariates. In this case:
$$L_i = \lambda_i^{\delta_i}(t) * S_i(t)$$
where, $L_i$ is the likelihood contribution of the $i^{th}$ subject, $\lambda_i$ is the hazard function, $S_i$ is the survival function, and $\delta_i$ is the event indicator (1: if event observed, 0: if subject got censored). We know:
$$\lambda(t) = \frac{f(t)}{S(t)}$$
So I guess, I can re-write $L_i$ as:
$$L_i = \lambda_i^{\delta_i}(t) * S_i(t) = (\frac{f_i(t)}{S_i(t)})^{\delta_i} * S_i(t) = {f_i(t)}^{\delta_i} {S_i(t)}^{1 - \delta_i}$$
So based on the formula above:
if event observed (i.e. $\delta_i = 1$) ---> $L_i = f_i(t)$
if subject got censored (i.e. $\delta_i = 0$) ---> $L_i = S_i(t)$
Now what if our survival analysis included time varying covariate? Are formula above still valid?