Why Share Random Effects?
A biomarker recorded repeatedly over time can reveal persistent differences between subjects. Some subjects may tend to have higher marker values, or steeper trajectories, than others. If those same subject-specific characteristics also enter the event submodel, a subject’s latent trajectory and event risk can be statistically connected. A shared-random-effects model represents that connection through common latent variables rather than treating each observed biomarker value as an error-free predictor.
The word can matters. Putting random effects in both submodels creates a route through which association may arise, but does not guarantee an association in every direction or at every time. Whether the biomarker’s random component is associated with the event’s random contribution depends on the random-effects covariance structure and on how each submodel uses the random effects.
Writing the Shared Structure
Let \(y_{ij}\) be the biomarker measurement for subject \(i\) at time \(t_{ij}\). A standard longitudinal submodel is
Here \(m_i(t)\) is the subject-specific latent marker trajectory, \(x_i(t)\) and \(z_i(t)\) are covariate and random-effects design vectors, and \(D\) is the random-effects covariance matrix. The random component of the latent trajectory at time \(t\) is \(U_i(t)=z_i(t)^Tb_i\). For the examples below, measurement error has mean zero and is independent of \(b_i\); this allows us to distinguish the latent trajectory from noise in an observed measurement.
A corresponding event submodel can place a linear function of that same random-effects vector in the log hazard:
In this expression, \(h_0(t)\) is the baseline hazard, \(w_i\) is a vector of event-submodel covariates, and \(a\) is the vector of event-submodel random-effects loadings. The term \(V_i=a^Tb_i\) is the random contribution to the log hazard; the corresponding multiplicative contribution to the hazard is \(\exp(V_i)\). This form isolates the shared-random-effects link. It does not add a current-value term to the event model.
The direction of \(b_i\) used by the longitudinal model at time \(t\) is \(z_i(t)\), while the direction used by the event model is \(a\). The matrix \(D\) describes how random-effects directions co-vary. Consequently, it is not enough to check whether the two submodels contain random effects. One must check whether they use directions that vary together under \(D\).
The Covariance That Reveals the Link
Because \(E(b_i)=0\) and \(\operatorname{Var}(b_i)=D\), the covariance between the longitudinal random component and the event linear predictor is
This scalar projection is the key calculation. If it is nonzero, the marker’s latent random deviation and the event’s random log-hazard contribution have nonzero covariance. If it is zero, they have zero covariance, but the interpretation depends on the random-effects distribution. Under the Gaussian assumption above, the two linear combinations are jointly normal, so zero covariance implies independence. Without joint normality, zero covariance alone does not generally imply independence.
Under Gaussian random effects, the connection can also be expressed on the hazard-multiplier scale. Since \(V_i\) is normal with mean zero and variance \(a^TDa\),
Thus, for a Gaussian random-effects distribution, the same directional covariance determines whether the latent marker deviation is associated with the event’s multiplicative hazard contribution. This is an association with the random part of the instantaneous hazard, not a statement that a biomarker causes an event or that the covariance alone fully describes the distribution of event times.
A Short Derivation
To justify the hazard-multiplier result, write \(U=U_i(t)\), \(V=V_i\), and \(c=\operatorname{Cov}(U,V)\). Since \((U,V)\) is jointly normal and \(E(U)=E(V)=0\), for \(\operatorname{Var}(V)>0\),
Taking the expectation of \(U\exp(V)\) conditional on \(V\), and then averaging over \(V\), gives
For a mean-zero normal variable \(V\), its moment-generating function is \(E\{\exp(sV)\}=\exp\{s^2\operatorname{Var}(V)/2\}\). Differentiating with respect to \(s\) and evaluating at \(s=1\) yields \(E\{V\exp(V)\}=\operatorname{Var}(V)\exp\{\operatorname{Var}(V)/2\}\). Also, \(E(U)E\{\exp(V)\}=0\), so the covariance equals \(E\{U\exp(V)\}\). Substitution gives the stated result. If \(\operatorname{Var}(V)=0\), then \(V=0\) with probability one and both sides of the covariance identity are zero.
Worked Example: Checking the Shared Direction
Suppose a hypothetical model has two random effects, with
Calculate the covariance between the marker’s random component at this time and the event’s random log-hazard contribution. First,
Then
The marker random component and event random log-hazard contribution therefore have covariance \(0.020\), in the units implied by the chosen random effects and loadings. The value is positive but small relative to the variability of the two components. This calculation establishes a directional covariance; it does not by itself quantify the strength of association on a standardized scale or determine a causal effect.
Worked Example: Nonzero Loadings Do Not Ensure Association
Now suppose \(b_i\sim N_2(0,I)\), \(z_i(t)=(1,0)^T\), and \(a=(0,1)^T\). Both submodels use a nonzero loading, and both random-effect coordinates vary. The marker random component is \(U_i(t)=b_{i1}\), while the event random log-hazard contribution is \(V_i=b_{i2}\). Their covariance is
Because the random effects are jointly normal with identity covariance, \(b_{i1}\) and \(b_{i2}\) are independent. Thus the marker’s random deviation is independent of the event’s random log-hazard contribution, and also of its hazard multiplier \(\exp(b_{i2})\). The fact that both submodels contain nonzero random-effect terms is not enough: the directions are independent in this example.
Worked Example: From Latent Marker to Hazard Multiplier
Consider a hypothetical random-intercept model with \(b_i\sim N(0,0.25)\), latent trajectory \(m_i(t)=10+2t+b_i\), and event hazard \(h_i(t\mid b_i)=0.02\exp(0.8b_i)\) per month. At any time, the latent marker deviation is \(U_i(t)=b_i\), and the event random log-hazard contribution is \(V_i=0.8b_i\). Therefore,
The variance of \(V_i\) is \(0.8^2(0.25)=0.16\). The covariance between the latent marker deviation and the hazard multiplier is consequently
For example, if the observed biomarker is \(y_{ij}=m_i(t_{ij})+\epsilon_{ij}\), with independent mean-zero measurement error, then its covariance with the hazard multiplier is also \(0.2166\): the fixed part of \(m_i(t)\) contributes no covariance, and the independent measurement error contributes none. This is an association with the instantaneous hazard multiplier. It is not the probability of an event in a month, which also depends on the event-time process and its baseline hazard.
Assumptions, Diagnostics, and Alternatives
The covariance calculations rely on a correctly specified random-effects design and covariance matrix, finite second moments, and the same \(b_i\) appearing in both submodels. The hazard-multiplier formula additionally uses jointly Gaussian random effects. In a fitted model, the random-effects covariance matrix must be positive semidefinite; the model’s variance and covariance estimates also need to be plausible for the measurement scale and time units. These are structural and distributional assumptions, not facts guaranteed by observing repeated measurements.
A useful diagnostic is to examine the fitted projection \(z_i(t)^TDa\) over times and covariate patterns relevant to the study. It can change with \(t\), including in sign, when \(z_i(t)\) changes. For random-intercept-and-slope models, for instance, the marker’s direction combines the intercept and slope differently at different times. A single statement such as “the random effects are associated” may therefore conceal which trajectory component, and which time, is involved. Also check whether estimated random-effect variances are near zero or the covariance matrix is nearly singular: in such cases, some directions may be weakly identified, making directional association estimates uncertain.
The shared model is not the only possible approach. The comparison below concerns how each approach represents the link, not which is universally preferable.
| Approach | How it represents the link | Main caution |
|---|---|---|
| Shared random effects | Uses common latent subject effects in the marker and event submodels. | Association depends on the loaded directions and their covariance, not just on sharing a vector. |
| Separate random effects | Uses distinct latent effects for the two submodels. | If modeled as independent, it removes the dependence pathway represented by shared effects. |
| Observed marker as a predictor | Uses recorded measurements directly in the event model. | Recorded values include measurement error and may not represent the latent trajectory accurately. |
Shared effects have limitations. Their meaning depends on the chosen random-effects structure, and a poor longitudinal trajectory model can distort the event association. A Gaussian random-effects assumption can also be restrictive; outside the Gaussian case, a zero directional covariance does not rule out other forms of dependence. Finally, statistical association through a latent variable is not evidence that changing the biomarker would change event risk.
Common Pitfall
Wrong reasoning: “The biomarker model and event model both have nonzero random effects, so biomarker values must be associated with event risk.” This overlooks the covariance structure and the directions selected by the two design vectors. In the independent-coordinate example above, both submodels use varying random effects, yet \(z_i(t)^TDa=0\), and the relevant Gaussian components are independent.
Correction: Identify the longitudinal direction \(z_i(t)\), the event direction \(a\), and the covariance matrix \(D\). Calculate \(z_i(t)^TDa\). A nonzero value gives a nonzero covariance for the latent marker deviation and event random log-hazard contribution. A zero value means zero covariance; under joint normality it also means independence of these two linear components, but without that distributional assumption it does not generally establish independence.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- For \(D=\begin{pmatrix}0.5&0\\0&0.2\end{pmatrix}\), \(z=(1,1)^T\), and \(a=(0,1)^T\), calculate the covariance between the longitudinal random component and the event random log-hazard contribution.
- Under jointly Gaussian random effects, what does a zero value of \(z^TDa\) imply about the two linear random-effect components? What should not be concluded without Gaussianity?
- If \(U_i(t)\) is the marker random component and \(V_i=a^Tb_i\), state the formula for \(\operatorname{Cov}\{U_i(t),\exp(V_i)\}\) under the assumptions used in this tutorial.
- Why does a nonzero covariance with the hazard multiplier not equal a causal effect of the biomarker on event occurrence?
Solutions. (1) \(Da=(0,0.2)^T\), so \(z^TDa=(1,1)(0,0.2)^T=0.2\). (2) The two components are independent because they are jointly normal and have zero covariance. Without joint normality, zero covariance alone does not establish independence. (3) The covariance is \(\exp(a^TDa/2)z_i(t)^TDa\). (4) It describes statistical association with the model’s random contribution to the instantaneous hazard. It does not establish that intervening on the biomarker changes event risk, and it is not itself an event probability.