Why Allow Both Intercepts and Slopes to Vary?
A random-intercept model allows subjects to have different marker levels while assuming their trajectories have a common rate of change. That can be too restrictive when subjects also differ in how quickly their marker rises or falls. A random-slope term allows those subject-specific rates to vary. In a joint model, both features can matter for the event process: a subject’s underlying marker level and its rate of change help define the latent marker trajectory used in the hazard.
The important modeling step is to connect the two random effects without treating noisy observed measurements as the true marker. The longitudinal submodel describes the latent trajectory; the event submodel uses that trajectory, conditional on the same subject-specific random effects.
Model Definition and Assumptions
For subject \(i\), let \(Y_{ij}\) be the marker measurement recorded at time \(t_{ij}\), for \(j=1,\ldots,n_i\). Let \(x_i\) denote longitudinal-submodel covariates, and let \(T_i\) and \(\delta_i\) denote the event or censoring time and event indicator. A random-intercept-and-slope longitudinal model is
Here \(m_i(t)\) is the subject’s latent marker value at time \(t\), rather than a directly observed quantity. The terms \(b_{0i}\) and \(b_{1i}\) are the subject-specific deviations in intercept and slope. The measurement errors are commonly assumed to be independent across observations, with \(\varepsilon_{ij}\sim N(0,\sigma^2)\). They are independent of the random effects.
The corresponding event submodel can be written
where \(h_0(t)\) is the baseline hazard, \(w_i\) contains event-submodel covariates, \(\gamma\) is their coefficient vector, and \(\alpha\) is the association parameter for the latent marker. The hazard is conditional on the shared random effects. Given those effects and included covariates, the longitudinal and event processes are assumed conditionally independent; the random effects connect the two submodels. This specification also assumes that the chosen linear trajectory in time is an adequate description of the latent marker over the modeled period.
Deriving the Latent Trajectory and Its Covariance
The latent trajectory follows by grouping the fixed and random parts:
Thus the subject-specific intercept is \(\beta_0+\beta_x^\top x_i+b_{0i}\), and the subject-specific slope is \(\beta_1+b_{1i}\). Since \(E(b_i)=0\), the population mean trajectory conditional on \(x_i\) is \(\beta_0+\beta_x^\top x_i+\beta_1t\). The random-effects covariance gives the latent trajectory’s between-subject covariance at two times:
To see this, the random part of \(m_i(t)\) is \(b_{0i}+t b_{1i}\). Expanding its covariance with \(b_{0i}+s b_{1i}\) gives \(\operatorname{Var}(b_{0i})+t\operatorname{Cov}(b_{1i},b_{0i})+s\operatorname{Cov}(b_{0i},b_{1i})+st\operatorname{Var}(b_{1i})\), which is the displayed expression. In particular, the latent-marker variance at time \(t\) is \(\tau_{00}+2t\tau_{01}+t^2\tau_{11}\). This variance can change with time even though the random-effects distribution does not.
Worked Example: Interpreting a Correlated Random-Effects Distribution
Suppose the random-effects covariance matrix is \(D=\begin{pmatrix}0.16&0.018\\0.018&0.01\end{pmatrix}\). The intercept deviation is measured in marker units and the slope deviation in marker units per year. Find the random-effects correlation and the latent-marker variance at year 2.
The standard deviations are \(\sqrt{0.16}=0.4\) marker units and \(\sqrt{0.01}=0.1\) marker units per year. Therefore,
The positive correlation means that higher-than-average subject intercepts tend, in this model, to occur with higher-than-average slopes. It does not mean that every subject with a higher intercept must have a higher slope. At year 2, the between-subject variance of the latent marker is
This calculation concerns variation in the latent marker across subjects, not the measurement-error variance \(\sigma^2\).
Substituting the Trajectory into the Event Hazard
The shared-effects link is obtained by substituting the longitudinal expression for \(m_i(t)\) into the event submodel. The result makes explicit how both subject-specific effects can influence the hazard:
For fixed covariates and time, a change in the latent marker of one marker unit corresponds to a conditional hazard ratio of \(\exp(\alpha)\). The random slope matters because its contribution to the marker is \(b_{1i}t\): as time changes, the random-effects contribution to the linear predictor changes too. This is a conditional interpretation for subjects’ specified random effects, not a claim about a marginal hazard after averaging over their distribution.
Worked Example: Calculating a Conditional Hazard
Consider a hypothetical subject with \(x_i\) absent from the model, \(\beta_0=0.8\) marker units, \(\beta_1=0.25\) marker units per year, \(b_{0i}=0.20\) marker units, and \(b_{1i}=0.0875\) marker units per year. At year 2, suppose \(h_0(2)=0.04\) per year and \(\alpha=1\) per marker unit. There are no additional event covariates. Find the latent marker and conditional hazard at year 2.
First calculate the latent marker:
Substitute this value into the hazard model. The exponent is \(\alpha m_i(2)=(1)(1.675)=1.675\), so
This is the model-based hazard conditional on the stated random effects at year 2. It is not an event probability over a year; a hazard is an instantaneous rate.
Worked Example: Separating Intercept and Slope Contributions
Use the same hypothetical random effects, \(b_{0i}=0.20\) and \(b_{1i}=0.0875\), with \(\alpha=1\). Compare this subject’s conditional hazard with the hazard for a subject having \(b_{0i}=b_{1i}=0\), holding the fixed trajectory, covariates, baseline hazard, and time unchanged.
The conditional hazard ratio due to the random effects at time \(t\) is
At time zero, the random slope contributes nothing to the marker, and the ratio is
At year 2, the random-effects contribution is \(0.20+(0.0875)(2)=0.375\) marker units, giving
Under this model, the subject’s conditional hazard is about 1.221 times the zero-random-effects subject’s hazard at time zero and about 1.455 times that subject’s hazard at year 2. The difference arises because the random slope’s contribution accumulates with time.
Model Checks, Alternatives, and Limitations
A random slope adds flexibility, but it also adds parameters and depends on a chosen trajectory form. Before relying on this specification, examine whether the data and fitted model support it.
- Check the time scale and origin. The intercept is defined at \(t=0\). If that time is far outside the observed measurement range, the intercept may be hard to interpret and its estimated correlation with the slope may be unstable. Centering time at a meaningful reference changes the intercept’s interpretation and the reported intercept-slope covariance.
- Check trajectory adequacy. Systematic curvature in residuals over time, or consistent patterns in subject-specific residual plots, may indicate that a linear latent trajectory is inadequate. A random slope does not by itself model nonlinear change.
- Check the random-effects covariance estimate. Estimates near a zero variance or a correlation near \(1\) or \(-1\) can signal weak information, an overly complex random-effects structure, or numerical difficulty. A valid covariance matrix must be positive definite.
- Check measurement-error assumptions. Strong serial dependence or changing residual variance can undermine the assumed error model. The random slope describes between-subject trajectory variation; it does not automatically account for correlated measurement errors.
- Check the event-model specification. The conditional hazard relies on the chosen baseline hazard, covariates, and link to \(m_i(t)\). The estimated association should not be treated as proof that marker change causes events.
A random-intercept-only model is a simpler alternative when subjects plausibly differ in level but share a common slope. It is more parsimonious, but it cannot represent genuine between-subject variation in rate of change. A model using observed marker values directly in the hazard is another possible analysis, but it does not represent the latent trajectory with measurement error separated from underlying marker variation. The shared-random-effects specification instead links the hazard to the latent marker. Its limitations include reliance on the distributional assumptions for \(b_i\), the assumed trajectory shape, and adequate repeated measurements to estimate subject-level slope variation.
The random-intercept-and-slope joint model is useful when both starting level and rate of marker change may be related to event risk. Its main benefit is a coherent way to represent those subject-specific trajectories and link them to the event process; its main responsibility is to ensure the trajectory, covariance, and hazard assumptions are reasonable for the data and scientific question.
Check Your Understanding
Answer each question, then compare your work with the solutions.
- If \(\tau_{00}=0.25\), \(\tau_{01}=-0.02\), and \(\tau_{11}=0.04\), what is the latent-marker variance at time \(t=1\)?
- In \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\), what does \(b_{1i}\) represent, and what are its units if time is in years?
- If \(\alpha=0.5\) per marker unit, what conditional hazard ratio corresponds to a one-unit increase in the latent marker?
- Why is an intercept-slope correlation not necessarily the same after changing the time origin?
Solutions. (1) \(\operatorname{Var}\{m_i(1)\}=\tau_{00}+2\tau_{01}+\tau_{11}=0.25-0.04+0.04=0.25\) marker units squared. (2) \(b_{1i}\) is subject \(i\)’s deviation from the population slope; its units are marker units per year. (3) The conditional hazard ratio is \(\exp(0.5)\approx1.649\), for a one-marker-unit increase, holding the other terms fixed. (4) Changing the time origin changes which combination of the original intercept and slope is the new intercept. Consequently, the covariance between the new intercept and slope can differ from the original covariance, and their correlation can change as well.