Tutorials › Nonlinear Mixed-Effects Models (NLME) › Covariance Signatures of Subject, Occasion, and Residual Effects

Between-Subject, Between-Occasion and Residual Variability · Tutorial 107 of 797

Covariance Signatures of Subject, Occasion, and Residual Effects

Use covariance within and across occasions, together with replicated samples, to distinguish persistent subject variability from occasion variability and residual error.

Intermediate 10 min read

What You'll Learn

  • State a repeated-measure model that separates subject, occasion, and residual contributions.
  • Derive the covariance expected for observations from the same or different occasions.
  • Use matched-time covariance summaries to estimate variance components.
  • Explain why occasion replication and within-occasion replication provide different information.
  • Recognize when time-varying pharmacokinetic effects or residual correlation undermine a simple covariance interpretation.

Why covariance reveals where variability lives

Two concentration measurements can vary together for different reasons. Measurements from the same subject may be similar because that subject has persistently different pharmacokinetic parameters from other subjects. Measurements from the same dosing occasion may share an additional occasion-specific deviation. And each individual measurement can contain residual error. The key distinction is how long each source of variation is shared: across a subject’s occasions, within one occasion, or only for one observation.

Covariance summarizes this sharing. If two measurements tend to be high or low together across subjects, their covariance is positive. Comparing covariance for pairs with different sharing structures can therefore reveal which variability components are present. The interpretation requires care: concentration is a nonlinear function of time and pharmacokinetic parameters, so a simple additive covariance pattern is a useful local or simplified representation, not a universal description of raw concentrations.

Definition: Let \(Z_{ijm}\) be a concentration observation for subject \(i\), occasion \(j\), and sample \(m\), after subtracting the population prediction at its sampling time. In a simple additive decomposition, \(Z_{ijm}=B_i+O_{ij}+E_{ijm}\), where \(B_i\) is a persistent subject contribution, \(O_{ij}\) is an occasion-specific contribution, and \(E_{ijm}\) is residual error. Assume these terms have mean zero, are mutually independent, and have variances \(\sigma_B^2\), \(\sigma_O^2\), and \(\sigma_E^2\), respectively. Occasion effects are independent across occasions, and residual errors are independent across observations.

Here \(Z\), \(B\), \(O\), and \(E\) are expressed on the concentration scale, so their variances and covariances have units of concentration squared. This representation is particularly transparent when comparing observations at the same sampling time and when a random contribution acts approximately like an additive shift. It is not a claim that all pharmacokinetic random effects are additive concentration shifts. In an NLME model, a subject-level effect such as an eta on a parameter can change the predicted concentration differently at different times.

Covariance patterns under the simple decomposition

For any observation, all three components contribute to its variance. For two distinct observations from the same subject and the same occasion, the subject and occasion terms are shared, but the residual terms are not. For observations from the same subject on different occasions, only the subject term is shared. Observations from different subjects share none of the random terms. These statements give the covariance signatures directly.

$$ \begin{aligned} \operatorname{Var}(Z_{ijm}) &= \sigma_B^2+\sigma_O^2+\sigma_E^2,\\ \operatorname{Cov}(Z_{ijm},Z_{ijn}) &= \sigma_B^2+\sigma_O^2 \quad (m\ne n),\\ \operatorname{Cov}(Z_{ijm},Z_{ikn}) &= \sigma_B^2 \quad (j\ne k),\\ \operatorname{Cov}(Z_{ijm},Z_{k\ell n}) &= 0 \quad (i\ne k). \end{aligned} $$

The third line is the persistent-subject signature: covariance remains between different occasions for the same subject. The difference between same-occasion covariance and cross-occasion covariance is the occasion variance. The difference between the observation variance and same-occasion covariance is the residual variance. In population terms,

$$ \sigma_B^2=C_{\text{different occasions}},\qquad \sigma_O^2=C_{\text{same occasion}}-C_{\text{different occasions}},\qquad \sigma_E^2=V-C_{\text{same occasion}}, $$

where \(V\) is the variance of an observation, and the \(C\) terms refer to the corresponding covariances. These equalities depend on the stated independence and equal-variance assumptions. With finite data, estimated differences need not be nonnegative; a negative difference can signal sampling uncertainty, a poor covariance model, or both.

Worked covariance calculations

Worked Example: Predicting the Three Covariance Levels

Suppose hypothetical matched-time concentration deviations follow the additive decomposition, with \(\sigma_B^2=4.0\), \(\sigma_O^2=1.5\), and \(\sigma_E^2=2.0\) \((\text{mg/L})^2\). Assume distinct samples have independent residual errors. Find the observation variance, same-occasion covariance, and cross-occasion covariance for one subject.

For one observation, all three independent components contribute: \(4.0+1.5+2.0=7.5\;(\text{mg/L})^2\). Thus \(\operatorname{Var}(Z_{ijm})=7.5\;(\text{mg/L})^2\).

For two distinct samples from the same occasion, the shared components are \(B_i\) and \(O_{ij}\). Their covariance is \(4.0+1.5=5.5\;(\text{mg/L})^2\). For samples from two different occasions of that subject, only \(B_i\) is shared, so the covariance is \(4.0\;(\text{mg/L})^2\).

The resulting ordering, \(7.5>5.5>4.0\), matches the model: adding an observation-specific residual raises variance above covariance, while sharing an occasion adds covariance beyond the persistent subject component.

Worked Example: Estimating a Persistent Component Across Occasions

Consider four hypothetical subjects with matched-time, mean-centered deviations recorded on two occasions. The values, in mg/L, are: subject 1, \(2\) and \(1\); subject 2, \(-2\) and \(-1\); subject 3, \(1\) and \(2\); subject 4, \(-1\) and \(-2\). Use the sample covariance across the two occasions to estimate the persistent covariance pattern.

Each occasion’s sample mean is zero. The sample covariance uses denominator \(n-1=3\): \[ s_{12}=\frac{\sum_{i=1}^{4}(Z_{i1}-\bar Z_1)(Z_{i2}-\bar Z_2)}{3} =\frac{(2)(1)+(-2)(-1)+(1)(2)+(-1)(-2)}{3} =\frac{8}{3}=2.667\;(\text{mg/L})^2. \]

Because the observations are from different occasions of the same subject, the model says their population covariance is \(\sigma_B^2\), provided occasion effects are independent across occasions and residuals are independent. Thus \(2.667\;(\text{mg/L})^2\) is a sample estimate of the persistent subject covariance, not proof that the true component equals that value. With only four subjects, sampling uncertainty is substantial. This calculation also relies on the matched-time deviations being comparable across the two occasions.

Worked Example: Separating All Three Components From Replication

Suppose a hypothetical study provides matched-time covariance summaries, all in \((\text{mg/L})^2\): observation variance \(V=9.0\), covariance for two distinct samples in the same occasion \(C_{\text{same}}=7.0\), and covariance for samples from different occasions of the same subject \(C_{\text{different}}=5.0\). Under the simple decomposition, calculate the three components.

The persistent subject component is the cross-occasion covariance: \(\widehat{\sigma_B^2}=5.0\;(\text{mg/L})^2\).

Same-occasion covariance contains both the subject and occasion components, so \(\widehat{\sigma_O^2}=7.0-5.0=2.0\;(\text{mg/L})^2\).

Observation variance additionally contains residual variance, giving \(\widehat{\sigma_E^2}=9.0-7.0=2.0\;(\text{mg/L})^2\). The reconstructed variance is \(5.0+2.0+2.0=9.0\;(\text{mg/L})^2\), which agrees with the supplied observation variance. This arithmetic illustrates the identification logic; in a real analysis, covariance summaries are estimated with uncertainty, and a full likelihood-based model may be preferable.

Why the covariance identities hold

The result follows from expanding covariance and using independence. For example, consider two different observations from the same occasion. Their covariance is \(\operatorname{Cov}(B_i+O_{ij}+E_{ijm},B_i+O_{ij}+E_{ijn})\). By bilinearity, this is the sum of the nine pairwise covariances between terms in the first and second arguments. Independence and zero means make every cross-component covariance zero. The shared subject term contributes \(\operatorname{Var}(B_i)=\sigma_B^2\), the shared occasion term contributes \(\operatorname{Var}(O_{ij})=\sigma_O^2\), and the distinct independent residuals contribute zero covariance. Therefore the result is \(\sigma_B^2+\sigma_O^2\).

For different occasions, replace the second occasion term with \(O_{ik}\), where \(k\ne j\). Occasion effects are independent across occasions, so their covariance is zero; the residual terms are also independent. Only \(B_i\) remains shared, yielding \(\operatorname{Cov}(Z_{ijm},Z_{ikn})=\sigma_B^2\). For one observation, variance adds because the three components are independent, giving the sum of all three variances. These derivations explain why the design must include the relevant kinds of pairs: without cross-occasion pairs, subject and occasion covariance are not separated by these identities.

Applying the signatures to concentration-time data

The decomposition gives a conceptual guide for interpreting repeated concentration measurements, but the expected pattern depends on the observation model. The additive form is most direct when measurements are compared at the same nominal time, after accounting for the population concentration-time curve, and when the random deviations can reasonably be treated as additive with similar loadings. If a subject effect changes clearance or volume, its effect on concentration can vary over time: it may be small at one sampling time and larger at another. Consequently, raw concentration covariance need not be constant across time, even when the underlying subject effect is persistent.

Residual error also need not have constant variance. For example, an observation model may imply residual variability that changes with the predicted concentration. Serially correlated assay or sampling deviations would likewise make the covariance of two residuals nonzero. In either case, a difference such as \(C_{\text{same}}-C_{\text{different}}\) no longer isolates occasion variance without adjustment. The earlier material on separating parameter variability from residual error motivates this distinction: the covariance comparison is about the pattern of shared contributions, not a shortcut around specifying the observation model.

In practice, examine covariance patterns among appropriately matched observations and inspect whether the assumed mean curve and residual structure are plausible. Important warning signs include:

  • Cross-occasion covariance changes markedly with sampling time, suggesting that a constant additive subject contribution is inadequate or that the mean curve has not been properly accounted for.
  • Same-occasion covariance does not exceed cross-occasion covariance, beyond what sampling uncertainty could explain, despite a proposed positive occasion variance.
  • Residual plots show changing spread with predicted concentration, or paired residuals show serial dependence, contradicting independent equal-variance residual assumptions.
  • Estimated variance differences are negative or highly unstable. Variance components cannot be negative in the model, so such raw differences signal estimation noise or a mismatch between the summaries and assumed structure—not a negative physical variance.

Design, alternatives, and limitations

Replication determines which signatures can be observed. Multiple occasions per subject permit cross-occasion covariance to inform persistent subject variability. Multiple distinct observations within an occasion make it possible, in principle, to compare same-occasion covariance with cross-occasion covariance. If each occasion contributes only one observation, there is no within-occasion pair of distinct samples; residual and occasion contributions may then be difficult or impossible to separate using this simple covariance comparison alone.

Covariance contrasts are an explanatory tool, not the only estimation strategy. A nonlinear mixed-effects model can estimate variance components by fitting the concentration-time predictions and observation model jointly, using the full sampling schedule rather than only matched-time covariance summaries. A simpler analysis of occasion averages may be easier to communicate, but averaging changes the residual contribution and can discard information. Neither alternative removes the need for an appropriate mean model, a defensible residual model, and enough replication to distinguish the components.

The additive signatures also rely on independence, mean-zero effects, and a consistent comparison scale. Correlated occasion effects, correlated residuals, unequal residual variance, or random effects that alter the curve shape can all change the pattern. In such settings, covariance remains informative, but its terms must be derived from the specified model rather than assigned by the simple formulas above. Covariance patterns can indicate which effects a design may distinguish; they do not, by themselves, guarantee that a complex NLME model is identifiable or that its estimates are precise.

A common interpretation mistake

Common pitfall: “The covariance between two concentrations from the same occasion is the occasion variance.” This is wrong because those observations also share the subject contribution. Under the stated model, same-occasion covariance is \(\sigma_B^2+\sigma_O^2\). Occasion variance is isolated only by subtracting the cross-occasion covariance, which estimates \(\sigma_B^2\), and only when the assumptions for those covariance identities hold.

The useful question is not simply whether repeated measurements are correlated. Ask which components each pair shares. A pair on different occasions from one subject shares the persistent subject contribution; a pair within one occasion shares that contribution plus the occasion contribution; an individual observation additionally contains its own residual error. This sharing map is the covariance signature.

Check Your Understanding

Answer each question using the simple additive model and its stated independence assumptions. Brief solutions follow the questions.

  1. If cross-occasion covariance is \(3.2\;(\text{mg/L})^2\) and same-occasion covariance is \(4.1\;(\text{mg/L})^2\), what is the implied occasion variance?
  2. Which components contribute to the covariance of two distinct observations from the same occasion?
  3. Why can a persistent subject effect produce a time-dependent covariance pattern in raw concentration data?
  4. What feature of a study design is needed to compare same-occasion covariance with cross-occasion covariance?
  5. Under the simple model, an estimated observation variance is \(8.0\;(\text{mg/L})^2\) and same-occasion covariance is \(8.6\;(\text{mg/L})^2\). Does the resulting negative residual variance establish a physically negative error variance?

Solutions. (1) \(4.1-3.2=0.9\;(\text{mg/L})^2\), subject to the model assumptions. (2) The persistent subject and occasion contributions; independent residuals do not contribute to covariance. (3) A subject-level parameter effect can alter predicted concentrations by different amounts at different sampling times. (4) The design needs repeated occasions per subject and distinct observations within occasions, with comparable observations for the covariance comparisons. (5) No. The subtraction gives \(\widehat{\sigma_E^2}=8.0-8.6=-0.6\;(\text{mg/L})^2\), which is incompatible with a variance component and indicates sampling variability or model/summary mismatch, not a negative physical variance.