Perfect multicollinearity among predictors should be dealt with in any regression, Cox or otherwise. Some software might just refuse to fit such data. Some functions are smart enough to find and remove enough predictors to ensure linear independence (perhaps silently), but you don't want to count on that and you presumably would prefer to make such a choice consciously yourself.
Multicollinearity doesn't arise from associations of values within single predictors like your X_1
. It has to do with linear associations among predictors. There's no way to say in general whether the type of data structure you describe will lead to perfect multicollinearity among X_1
, X_2
and X_3
.
The problem in your scenario is that you might not gain any information from including covariates that have "zero variance" among members of the risk set at all event times in a Cox model. If all individuals at risk at each event time have identical values of a particular covariate $X_j(s)$, and that is true for all of the event times $s$, then you can't estimate a hazard for that covariate unless it has interactions with other covariates.
The vector of coefficient estimates $\hat \beta$ in a Cox model comes from solving the partial-likelihood vector score function $U$ as a function of the covariate-coefficient vector $\beta$ for $U(\hat \beta)=0$. Following Therneau and Grambsch on page 40, with p covariates and n individuals, the $p \times 1$ score vector is:
$$ U(\beta) = \sum_{i=1}^n \int_0^{\infty} [X_i(s) - \bar x(\beta,s)]dN_i(s),$$
where $\bar x(\beta,s)$ is a risk-weighted mean of the $X$ values over the risk set at time $s$ and $dN_i(s)$ is 1 at the event time for individual $i$ and 0 otherwise.
If the entire risk set at an event time $s$ has identical values of $X_j$ and that holds true for all values of $s$, then the $j^{th}$ component of the score vector is necessarily 0 regardless of the coefficient values $\beta$. There is thus no unique solution for $\hat \beta_j$. If $X_j$ is involved in interaction terms with other covariates, however, then estimates of those interaction coefficients could be possible.
This difficulty with modeling such covariates in a Cox model might be overcome in a parametric survival model. With a parametric model, covariates can contribute to the entire likelihood function over time, as summarized on this page, and thus allow for estimation of their associated coefficients if they vary over time. Unless they follow defined functions of time, however, time-varying covariates for an individual are modeled over a set of time spans, each of which is left truncated and is either right-censored or ends with an event. If you choose an accelerated failure time parametric model, handling left truncation requires some care as explained in this vignette of the R eha
package.
For reference of others reading this thread, know that time-varying predictors in a Cox model are typically formatted in a different way than shown, with one data row for each combination of individual and time period during which all covariate values are constant. That's sometimes called the counting-process format. Each row specifies the start time (left truncated) and end time (censoring/event) of each such time period, along with the covariate values and an event/censoring indicator. See the R time-dependence vignette for details.
age
if you updated it as a predictor at each time point? Multicollinearity has to do with correlations among predictor variables, not within a single predictor. Are you also saying that the values ofX_2
orX_3
are changing in parallel with the values ofX_1
in a way that introduces linear dependence among them? Please provide that information by editing the question, as comments are easy to overlook and can get deleted. $\endgroup$X_2
andX_3
also change only with each new time step. I am not sure if it introduces linear dependence or not. For example,age
andyear
have a linear dependence, but what aboutyear
andannual_inflation_rate
, or a less obvious example,annual_inflation_rate
andannual_interest_rate
. $\endgroup$