# 第 78 章 時間依賴變量 Time-dependent variables

External time-dependent variables are those that do not require contact with the patient to be known, and it does not require that the patient is alive to exist. For example, air pollution.

Internal time-dependent variables can only be measured when an individual is alive and still in the study and they cannot be determined without contact with the patient. For example, biomarker, blood pressure.

## 78.1 Extended Cox model

Cox proportional hazards model has been extended to accommodate time-dependent explanatory variables, and in this situation takes the form:

$h(t|x(t)) = h_0(t) e^{\beta^Tx(t)}$

This formulation is assumed that we are interested in the explanatory variable at the time of the event of interest. In other words, it means that only the current value of the covariates (i.e. at time t) affects the hazard. Here, the baseline hazard function is interpreted as the hazard function for an individual for whom all the variables are zero (from the time origin and during all the follow-up).

The hazard ratio for individuals r and s is

\begin{aligned} \frac{h(t|x_{1r}(t))}{h(t|x_{1s}(t))} & = \frac{h_0e^{\beta_1x_{1r}(t)}}{h_0e^{\beta_1x_{1s}(t)}} \\ & = \exp(\beta_1(x_{1r}(t) - x_{1s}(t))) \end{aligned}

Therefore, $$\beta_1$$ is the log hazard ratio for two individuals whose explanatory variable at (any) time t differs by 1 unit. Notice here that the effect of 1-unit change of TD variable is assumed to be constant overtime. However, the quantity $$x_1(t) - x_2(t)$$ varies with time, and therefore, this model is no longer a proportional hazard model. This is called extended Cox model.

## 78.2 Frailty Models (脆弱模型?)

Frailty models are random effects models for time-to-event data.

### 78.2.1 Individual frailty model

$h_i(t|x_i) = \alpha_ih(t|x_i) = \alpha_i h_0(t)\exp(\beta^Tx_i)$

### 78.2.2 Application to a Weibull model

$h(t|x_i,\alpha_i) = \alpha_i \kappa \lambda t^{\kappa - 1}e^{\beta^Tx}$

### 78.2.3 Shared frailty model

$h(t|x_{ij}, \alpha_i) = \alpha_j h_0(t)e^{\beta^Tx_{ij}}$