Why Unequal Follow-Up Is Not a Structural Problem
Longitudinal studies rarely produce a perfectly rectangular data set. One participant may attend every scheduled visit, another may miss several visits, and a third may have measurements at times that differ from the nominal schedule. A linear mixed model can use these records without requiring every subject to have the same number of observations. The key is to describe each subject’s observed measurement times and outcomes with that subject’s own design matrices.
This flexibility is not a guarantee that every pattern of missing measurements is harmless. The model accounts for the correlation among outcomes that are observed; by itself, it does not explain why some outcomes or visits are absent. Thus, two questions must be kept separate: can the likelihood be constructed for the observed data, and do the assumptions about the observation process support the intended inference?
Subject-Specific Data and the Marginal Likelihood
For subject \(i\), let \(n_i\) be the number of observed biomarker measurements. Write the observed outcomes as the \(n_i\)-vector \(y_i\), and let \(X_i\) and \(Z_i\) be the fixed-effect and random-effect design matrices evaluated at that subject’s observed times and covariates. A standard linear mixed model is
Here \(\beta\) is the vector of fixed effects, \(b_i\) is the subject-specific random-effects vector, \(D\) is its covariance matrix, and \(R_i\) is the within-subject residual covariance matrix. The usual Gaussian mixed-model likelihood assumes that the random effects and residuals are independent, and that different subjects are independent. The matrices \(X_i\), \(Z_i\), and \(R_i\) can differ across subjects; their dimensions reflect \(n_i\).
Integrating out \(b_i\) gives the marginal distribution of the observed outcomes:
Consequently, the contribution of subject \(i\) to the marginal log likelihood is
and the total log likelihood is \(\ell=\sum_i\ell_i\). The dimensions of the matrices inside each contribution match that subject’s observed data. There is no requirement to fill absent visits with invented outcomes or to make the observed-data vectors equal in length.
Worked Example: Building Designs for Unequal Visit Schedules
Suppose a biomarker model has a fixed linear time trend and a subject-specific random intercept and slope. Subject A is observed at months 0, 1, and 3; subject B is observed at months 0 and 2. For this model, the fixed and random time designs both have rows \((1,t)\).
For subject A, \(n_A=3\), and the time design is
For subject B, \(n_B=2\), and
The fixed-effect and random-effect vectors have length 2 for both subjects, but the designs have three rows for A and two for B. If the residual covariance is \(\sigma^2 I_{n_i}\), the covariance matrices are \(V_A=Z_A D Z_A^\mathsf{T}+\sigma^2 I_3\) and \(V_B=Z_B D Z_B^\mathsf{T}+\sigma^2 I_2\). Each observed vector is evaluated with its own covariance matrix. Subject B’s unobserved month-1 outcome is not needed to define either contribution.
The actual times matter: changing B’s second visit from month 2 to month 4 changes the second rows of \(X_B\) and \(Z_B\), and therefore changes the mean and, when slopes are random, the covariance structure. The visit times are part of the model input, not merely labels attached after fitting.
A Likelihood Calculation With Different Numbers of Measurements
The following calculation isolates how the likelihood handles unequal counts. Consider a random-intercept model with residual variance 1 and random-intercept variance 4. For a subject with \(n_i\) measurements, the marginal covariance is \(V_i=I_{n_i}+4\mathbf{1}\mathbf{1}^\mathsf{T}\). Evaluate the likelihood at specified fitted means; this calculation illustrates contributions at those parameter values, rather than estimating a model from two subjects.
Worked Example: Two Subjects, Three and Two Measurements
Subject A has three observed outcomes, with fitted means \((10,10,10)\) and residual vector \(e_A=y_A-X_A\beta=(1,-1,0)^\mathsf{T}\). Subject B has two observed outcomes, with fitted means \((20,20)\) and residual vector \(e_B=(1,-1)^\mathsf{T}\). The times can differ; under this random-intercept-only covariance, the covariance depends on the number of measurements, not their spacing.
For a random-intercept covariance \(I_n+4\mathbf{1}\mathbf{1}^\mathsf{T}\), the determinant is \(1+4n\): the eigenvalue in the direction of \(\mathbf{1}\) is \(1+4n\), and the other \(n-1\) eigenvalues are 1. Thus \(|V_A|=13\) and \(|V_B|=9\). Both residual vectors sum to zero, so they lie in directions with covariance eigenvalue 1; hence \(e_A^\mathsf{T}V_A^{-1}e_A=2\) and \(e_B^\mathsf{T}V_B^{-1}e_B=2\).
Substituting \(n_A=3\), \(|V_A|=13\), and the quadratic form 2 into the Gaussian log likelihood gives
For subject B, the corresponding calculation is
The total log likelihood for these two subjects at the specified parameter values is \(\ell_A+\ell_B\approx-8.976\). The contributions have different normalizing terms because the observed vectors have different lengths. Neither subject’s contribution should be padded to a common length or calculated using the other subject’s covariance dimension.
Why Visit Timing Can Change the Covariance
A random-intercept model gives all measurements from the same subject the same random-intercept covariance contribution, regardless of how far apart their times are. With random slopes, timing affects both the mean design and the covariance. This distinction is important when irregular visits are analyzed: using the correct count but the wrong time values can still give the wrong likelihood.
Worked Example: A Random Slope at Irregular Times
Suppose \(b_i=(b_{0i},b_{1i})^\mathsf{T}\) has covariance \(D=\operatorname{diag}(1,0.25)\), the residual variance is \(0.75\), and residuals at distinct visits are independent. A subject is observed at times 0 and 2, with fixed fitted means 5 and 6 and outcomes 6 and 5. The residual vector is \(e=(1,-1)^\mathsf{T}\), and
The determinant is \(|V|=(1.75)(2.75)-1=3.8125\). The quadratic form is
Therefore the contribution is
The off-diagonal covariance of 1 arises because both observations share the random intercept and the random slope. If the second visit were at a different time, the second row of \(Z\), and thus the covariance and likelihood contribution, would change. This computation assumes the stated Gaussian model and independent residual errors; it is not a diagnostic that those assumptions are appropriate.
Observation-Process Assumptions and Diagnostics
Likelihood-based estimation can use an unbalanced observed-data set under the model for the outcomes, provided the observation process does not introduce unaccounted selection that invalidates the likelihood for the target inference. A common sufficient framework is that missingness is missing at random conditional on observed data included in the analysis, together with parameter distinctness between the outcome model and missingness mechanism. Informally, after conditioning on the observed information used by the model, whether a measurement is missing must not depend on its unobserved value. A fixed or externally determined visit schedule is a simpler case.
This condition is not established merely because software successfully fits the model. If subjects leave follow-up because of an unobserved current biomarker value, or if the timing of visits responds to unrecorded worsening, the observation process may be informative. The ordinary longitudinal likelihood may then give misleading estimates. Modeling the observation or dropout process, using an appropriate joint model, or conducting sensitivity analyses may be needed. Including observed history can make a missing-at-random assumption more plausible, but cannot prove it.
Useful checks include tabulating the number and timing of measurements by subject and by important baseline groups; checking whether particular time ranges or covariate groups have sparse follow-up; and examining residual diagnostics at observed visits. Residual plots and covariance checks can reveal a poor outcome model, such as an inadequate time trend or residual correlation. They cannot by themselves establish that missingness is ignorable. Also distinguish ordinary unbalance from a model that is poorly identified: very few observations at late times, or few subjects with repeated measurements, may leave slope or covariance parameters weakly estimated.
| Approach | How it handles unequal follow-up | Main concern |
|---|---|---|
| Likelihood-based linear mixed model | Uses each subject’s observed vector and its own design and covariance matrices | Requires a suitable outcome model and defensible assumptions about missingness |
| Complete-case analysis | Restricts analysis to subjects with all required visits | Can discard substantial information and can be biased if complete cases are selected |
| Padding to a rectangular table | Fills absent visits with placeholders | Placeholder values are not observations; treating them as data distorts the likelihood |
| Separate analysis at each visit | Uses whoever is observed at each time | Does not directly model within-subject trajectories and can compare changing subsets |
Common Mistakes and Practical Limits
- Assuming unequal counts prevent likelihood estimation. They do not: each subject’s contribution has its own dimension.
- Entering missing outcomes as zeros or other placeholders. This changes the data and creates false contributions. Leave unobserved outcomes out of the observed-data vector.
- Ignoring actual measurement times. In time-varying fixed effects or random-slope models, the rows of the design matrices must use the times at which outcomes were measured.
- Equating successful convergence with valid inference. Convergence does not verify the covariance structure, the missingness assumption, or adequate information for all parameters.
- Assuming all irregular follow-up is ignorable. A flexible outcome likelihood handles unequal observed vectors; it does not automatically model outcome-dependent visit or dropout processes.
Unequal follow-up is therefore primarily a data-structure issue for likelihood construction, not a reason to discard subjects. The method’s strength is that it can retain observed measurements without requiring a balanced panel. Its limitation is equally important: estimates still depend on the specified mean and covariance models and on assumptions connecting the observed records to the outcomes that were not measured.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Two subjects have 4 and 2 observed biomarker values. Must their outcome vectors be padded to length 4 to fit a Gaussian mixed model?
- In a random-intercept and random-slope model, what changes if one subject’s second visit occurs at month 5 rather than month 3?
- State one condition that supports likelihood inference when some outcomes are missing, and one example of a process that may violate it.
- Why can residual diagnostics not establish that the missingness mechanism is ignorable?
Solutions. (1) No. Each subject contributes a vector and covariance matrix with dimensions matching that subject’s observed count. (2) The corresponding rows of the time-dependent fixed- and random-effect designs change; the fitted mean and, with a random slope, the marginal covariance can change. (3) One sufficient framework is missing at random conditional on observed information used in the analysis, with distinct outcome and missingness parameters. Dropout driven by an unobserved current biomarker value may violate this condition. (4) Residual diagnostics assess the outcome model among observed measurements; they do not reveal whether unobserved outcomes influenced which measurements were missing.