Why a Longitudinal Submodel Is Needed
A biomarker measured repeatedly on the same person is not a collection of unrelated observations. Measurements from one person tend to resemble one another because they share a trajectory, while measurement noise and short-term deviations cause observed values to differ from that trajectory. A longitudinal submodel represents both features: systematic change over time and subject-to-subject variation in that change.
In a joint model, this submodel describes the longitudinal measurements. Its central task here is to state how the recorded biomarker values relate to a population trajectory, subject-specific deviations, and residual error. The event-time portion is not needed to define this longitudinal model.
Fixed Effects, Random Effects, and Residual Errors
The fixed effects \(\beta\) describe the systematic trajectory associated with the population and measured covariates. The entries of \(x_{ij}\) determine which fixed effects apply to a particular visit. For example, a linear time trend has fixed design vector \(x_{ij}=(1,t_{ij})^T\), with \(\beta=(\beta_0,\beta_1)^T\). In that model, \(\beta_0\) is the population mean at time zero and \(\beta_1\) is the population mean change per unit time, subject to any additional covariates in the model.
The random effects \(b_i\) represent how subject \(i\)'s trajectory differs from the population trajectory. A random intercept allows subjects to start at different levels; a random slope allows their rates of change to differ. For a random-intercept-and-slope model, \(z_{ij}=(1,t_{ij})^T\) and \(b_i=(b_{0i},b_{1i})^T\). The subject-specific trajectory is then \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\).
The residual error \(\epsilon_{ij}\) is the remaining measurement-level deviation from that subject’s trajectory at that visit. It is distinct from a random effect: a random slope shifts the subject’s trajectory over time, whereas residual error affects one observed value around that trajectory. The model’s predicted latent trajectory \(m_i(t_{ij})\) is therefore not generally identical to the observed value \(y_{ij}\).
The zero mean for \(b_i\) makes the fixed-effects trajectory the population mean trajectory under the model. The covariance matrix \(D\) describes the variation of random effects and their association. For instance, a negative intercept–slope covariance means that subjects with higher-than-average intercepts tend, in this model, to have lower-than-average slopes. It does not by itself establish a causal relationship.
Worked Example: Constructing a Subject-Specific Trajectory
Suppose a hypothetical biomarker is measured in mg/L, and time is measured in months from baseline. The fixed-effects trajectory is \(10+0.8t\) mg/L. For one subject, suppose the random intercept is \(-1.2\) mg/L and the random slope is \(-0.15\) mg/L per month. Find the latent trajectory at month 4 and an observed value if the residual at that visit is \(0.5\) mg/L.
With a random intercept and slope, \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\). Substituting the hypothetical values at \(t=4\), $$ m_i(4)=10+(0.8)(4)-1.2+(-0.15)(4) =10+3.2-1.2-0.6 =11.4\ \text{mg/L}. $$
The observed response includes the residual: $$ y_{i}(4)=m_i(4)+\epsilon_i(4)=11.4+0.5=11.9\ \text{mg/L}. $$ The population mean at month 4 is \(10+(0.8)(4)=13.2\) mg/L. This subject’s latent value is lower because their random intercept and slope both contribute negative deviations. The observed value is above that subject-specific latent value because the residual in this example is positive.
Distribution and Covariance of Repeated Measurements
It is useful to express the model for all visits from one subject at once. Let \(y_i\) be the vector of that subject’s \(n_i\) observed responses, \(X_i\) the matrix with rows \(x_{ij}^T\), and \(Z_i\) the matrix with rows \(z_{ij}^T\). Let \(\epsilon_i\) be the residual vector. Then \(y_i=X_i\beta+Z_ib_i+\epsilon_i\). Under the assumptions above, the conditional distribution given \(b_i\) and the design is $$ y_i\mid b_i \sim N_{n_i}(X_i\beta+Z_ib_i,\ \sigma^2 I_{n_i}). $$
Because \(E(b_i)=0\) and \(E(\epsilon_i)=0\), the marginal mean is \(E(y_i)=X_i\beta\). The marginal covariance includes both subject-level variation and residual variation: $$ \operatorname{Var}(y_i)=Z_iDZ_i^T+\sigma^2 I_{n_i}. $$
This covariance explains why repeated observations on one subject are generally correlated even when the residual errors are independent. Their shared random effects create dependence. Measurements from different subjects have zero covariance under the basic model’s independent-subject assumption.
Worked Example: Variances and Correlation Under a Random Slope Model
Suppose the hypothetical random intercept and slope have covariance matrix $$ D= \begin{pmatrix} 4.00 & -0.30\\ -0.30 & 0.0900 \end{pmatrix}, $$ where the intercept is measured in mg/L and the slope in mg/L per month. Let the residual variance be \(\sigma^2=1.00\) (mg/L)\(^2\). Calculate the variances at months 0 and 2, and the correlation between the observed measurements at those times.
At time \(t\), the random-effects design vector is \(z(t)=(1,t)^T\). At baseline, the random-effects contribution to variance is \(4.00\); adding residual variance gives \(\operatorname{Var}\{y_i(0)\}=4.00+1.00=5.00\) (mg/L)\(^2\).
At month 2, the random-effects contribution is $$ z(2)^TDz(2) =4.00+2(2)(-0.30)+(2^2)(0.0900) =4.00-1.20+0.360 =3.16\ (\text{mg/L})^2. $$ Thus \(\operatorname{Var}\{y_i(2)\}=3.16+1.00=4.16\) (mg/L)\(^2\).
The covariance between measurements at months 0 and 2 comes only from the shared random effects: $$ \operatorname{Cov}\{y_i(0),y_i(2)\} =4.00+2(-0.30)=3.40\ (\text{mg/L})^2. $$ Consequently, $$ \operatorname{Corr}\{y_i(0),y_i(2)\} =\frac{3.40}{\sqrt{(5.00)(4.16)}} =\frac{3.40}{\sqrt{20.8}} \approx 0.7455. $$ The model therefore implies a positive correlation of about 0.7455 between these two repeated measurements. As a check on the specified random-effects covariance, \(D\) has positive diagonal entries and determinant \((4.00)(0.0900)-(-0.30)^2=0.270>0\), so it is positive definite.
Checking the Model and Choosing Its Complexity
The model’s assumptions should be considered against the observed data and the scientific setting. Common checks include plotting residuals against fitted values and time, examining whether residual spread changes systematically, and using a normal quantile plot to assess marked departures from the assumed Gaussian residual distribution. Subject-level plots can reveal trajectories whose curvature or patterns are not captured by the chosen fixed and random effects. These checks can identify warning signs; they do not prove that the assumptions hold.
The random-effects structure also needs scrutiny. A random-intercept model assumes subjects can differ in level but share the same modeled time trend. It is a simpler alternative when there is little support for subject-specific slopes. A random-intercept-and-slope model allows both levels and rates of change to vary, but requires enough information to estimate the additional variance and covariance parameters. Implausibly large estimates, a covariance estimate near a boundary, or unstable fits can indicate that the data do not support the chosen complexity. A covariance matrix used in the model must be positive semidefinite.
An ordinary regression that treats every repeated measurement as independent ignores the shared subject effects and generally gives an incorrect covariance structure. Conversely, adding random effects that the data cannot estimate reliably may produce unstable estimates. The choice is not simply “more random effects is better”: the design, number and timing of visits, and scientific question all matter.
A straight-line time effect is also a substantive assumption. If biomarker change is curved, a linear trajectory may leave systematic residual patterns. A different fixed-effects time basis may be needed, and the random-effects structure should be chosen to match the amount of trajectory variation the data can support. The basic Gaussian model can be inappropriate when the biomarker is strongly skewed, bounded, or has markedly nonconstant measurement variability; transformations or other outcome distributions may then be considered.
Worked Example: Separating a Residual From a Trajectory Deviation
Consider a hypothetical subject measured at months 0, 1, and 2. Suppose \(\beta_0=8\) mg/L, \(\beta_1=0.5\) mg/L per month, \(b_{0i}=1.4\) mg/L, and \(b_{1i}=-0.2\) mg/L per month. The residuals at the three visits are \(-0.1\), \(0.2\), and \(-0.3\) mg/L. Calculate the latent and observed values at each visit.
At month 0, \(m_i(0)=8+(0.5)(0)+1.4+(-0.2)(0)=9.4\) mg/L, so \(y_i(0)=9.4-0.1=9.3\) mg/L.
At month 1, \(m_i(1)=8+(0.5)(1)+1.4+(-0.2)(1)=9.7\) mg/L, so \(y_i(1)=9.7+0.2=9.9\) mg/L.
At month 2, \(m_i(2)=8+(0.5)(2)+1.4+(-0.2)(2)=10.0\) mg/L, so \(y_i(2)=10.0-0.3=9.7\) mg/L. The latent trajectory rises over these visits, while the last observed value is lower than the latent value because its residual is negative. The residuals change individual observations; they are not additional random slopes.
Common Mistakes and Practical Limits
- Calling the observed value the latent trajectory. The model states \(y_{ij}=m_i(t_{ij})+\epsilon_{ij}\); an observed measurement includes residual error.
- Confusing random effects with residual errors. Random effects induce subject-level trajectory differences and dependence across visits. Independent residual errors contribute visit-specific variation.
- Forgetting residual variance when computing an observed variance. \(z_{ij}^TDz_{ij}\) is only the random-effects contribution; add \(\sigma^2\) for the observed response variance under this model.
- Interpreting a random slope as the population slope. The population slope is a fixed-effect coefficient. A subject’s slope is the applicable fixed slope plus that subject’s random-slope contribution.
- Assuming a model is adequate because it converged. Convergence does not establish normality, a suitable time trend, constant residual variance, or a defensible random-effects structure.
The basic model is valuable because it clearly separates population-level trends, subject-specific trajectory variation, and measurement-level noise. Its simplicity also sets limits: it depends on the chosen trajectory form and distributional assumptions, and it may not capture every feature of real biomarker data. Careful interpretation keeps these model components distinct.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- In a random-intercept-and-slope model, which quantity represents the population slope, and which represents subject \(i\)'s slope?
- If \(z_{ij}^TDz_{ij}=2.5\) and \(\sigma^2=0.7\), what is the model-implied variance of the observed response at that visit?
- Why can measurements at two visits be correlated even if their residual errors are independent?
- What is the predicted observed value when the latent trajectory is 12 mg/L and the residual is \(-0.4\) mg/L?
- Name one diagnostic pattern that might suggest a straight-line time trajectory is inadequate.
Solutions. (1) The population slope is the fixed coefficient \(\beta_1\). Subject \(i\)'s slope is \(\beta_1+b_{1i}\). (2) Add the random-effects and residual contributions: \(2.5+0.7=3.2\) in the response units squared. (3) The shared random effects contribute covariance \(z_{ij}^TDz_{ik}\) across visits, even though the residual covariance is zero for distinct visits. (4) \(y=12+(-0.4)=11.6\) mg/L. (5) For example, residuals that show a systematic curved pattern over time rather than random scatter would call the straight-line time trend into question.