Tutorials › Nonlinear Mixed-Effects Models (NLME) › Continuous-Time Correlation for Unequally Spaced Samples

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

Continuous-Time Correlation for Unequally Spaced Samples

Learn how an exponential residual correlation model represents dependence across unequal time gaps, and calculate its correlations and covariances in pharmacometric examples.

Intermediate 12 min read

What You'll Learn

  • State the assumptions behind a continuous-time exponential residual correlation model.
  • Derive the exponential correlation function from a stationary Ornstein–Uhlenbeck process.
  • Calculate residual correlations using elapsed time rather than observation-number lag.
  • Convert correlations to covariances when residual standard deviations differ.
  • Check whether the model’s assumptions and implied correlation pattern are plausible.

Why elapsed time matters

Repeated pharmacokinetic samples are not always collected at equal intervals. A residual correlation that depends only on how many observations apart two measurements occur can therefore misrepresent their dependence: two adjacent measurements might be separated by minutes in one part of a schedule and hours in another. A continuous-time model instead makes correlation a function of the actual elapsed time.

The focus here is the exponential correlation function. It gives a simple, interpretable way to describe residual dependence that decays as observations become farther apart. The model concerns within-subject residuals after accounting for the structural prediction and, when appropriate, the subject-specific random effects. It is not itself a model for between-subject or between-occasion variation.

Definition: Let \(e_i(t)\) denote the residual for subject \(i\) at time \(t\), conditional on the model’s predictions and random effects. A stationary exponential residual correlation model assumes that, for two observations from the same residual process, $$ \operatorname{Corr}\{e_i(t),e_i(s)\}=\exp\{-\lambda |t-s|\}, \qquad \lambda>0. $$ The parameter \(\lambda\) is the decay rate, measured in inverse units of time. Equivalently, define the correlation time \(\tau=1/\lambda\), measured in units of time, so that the correlation is \(\exp\{-|t-s|/\tau\}\).

The correlation is 1 at zero time separation and decreases toward 0 as the separation increases. It remains positive at every finite time gap under this model. The parameter \(\tau\) is the time gap at which the correlation has fallen to \(e^{-1}\), approximately 0.3679. A larger \(\tau\) means slower decay and more persistent residual correlation; a larger \(\lambda\) means faster decay.

Deriving the continuous-time form

One standard justification is a stationary Ornstein–Uhlenbeck residual process. Suppose \(U_i(t)\) has mean zero and follows the stochastic differential equation $$ dU_i(t)=-\lambda U_i(t)\,dt+\sqrt{2\lambda}\,\sigma_e\,dW_i(t), $$ where \(W_i(t)\) is Brownian motion, \(\lambda>0\), and \(\sigma_e^2\) is the stationary residual variance. Assume separate subjects have independent processes, and that the process is in its stationary distribution. These assumptions imply a constant variance over time and an exponential correlation depending only on the time gap.

For \(h\geq 0\), the solution over an interval of length \(h\) is

$$ U_i(t+h)=e^{-\lambda h}U_i(t)+ \sqrt{2\lambda}\,\sigma_e\int_t^{t+h}e^{-\lambda(t+h-u)}\,dW_i(u). $$

The integral is independent of \(U_i(t)\), because it uses Brownian increments after time \(t\). Its mean is zero. Thus the covariance between \(U_i(t+h)\) and \(U_i(t)\) is determined by the first term:

$$ \operatorname{Cov}\{U_i(t+h),U_i(t)\} =e^{-\lambda h}\operatorname{Var}\{U_i(t)\} =e^{-\lambda h}\sigma_e^2. $$

Dividing by the common standard deviation \(\sigma_e\) at each time gives \(\operatorname{Corr}\{U_i(t+h),U_i(t)\}=e^{-\lambda h}\). Replacing \(h\) by \(|t-s|\) yields the stated function for any pair of times. This derivation also shows why the process is a continuous-time analogue of a decaying, first-order dependence model: over a gap \(h\), the earlier residual contributes to the later residual with multiplier \(e^{-\lambda h}\).

For \(n_i\) observation times \(t_{i1},\ldots,t_{in_i}\), define the residual correlation matrix \(R_i\) by

$$ (R_i)_{jk}=\exp\{-\lambda |t_{ij}-t_{ik}|\}. $$

This construction gives a valid positive-semidefinite correlation matrix for any set of observation times, including irregularly spaced times. If residual variances differ by observation, let \(s_{ij}\) be the residual standard deviation specified by the observation model. Then the residual covariance is

$$ \operatorname{Cov}(e_{ij},e_{ik})= s_{ij}s_{ik}\exp\{-\lambda |t_{ij}-t_{ik}|\}. $$

In matrix form, this is \(D_iR_iD_i\), where \(D_i\) is diagonal with entries \(s_{ij}\). The correlation function determines the standardized dependence; the residual variance model determines the scale. If all residual standard deviations are the same, \(s_{ij}=\sigma_e\), the covariance becomes \(\sigma_e^2(R_i)_{jk}\).

Worked Example: Correlations Across Unequal Time Gaps

Suppose a hypothetical subject has samples at 0, 1, and 4 hours, and the assumed correlation time is \(\tau=2\) hours. The decay rate is \(\lambda=1/\tau=0.5\) per hour. Calculate the correlation for each pair.

For the samples at 0 and 1 hour, the gap is 1 hour:

$$ \rho(1)=e^{-0.5(1)}=e^{-0.5}=0.6065. $$

For the samples at 1 and 4 hours, the gap is 3 hours:

$$ \rho(3)=e^{-0.5(3)}=e^{-1.5}=0.2231. $$

For the samples at 0 and 4 hours, the gap is 4 hours:

$$ \rho(4)=e^{-0.5(4)}=e^{-2}=0.1353. $$

The resulting correlation matrix, with rows and columns ordered by time, is

$$ R_i= \begin{pmatrix} 1 & 0.6065 & 0.1353\\ 0.6065 & 1 & 0.2231\\ 0.1353 & 0.2231 & 1 \end{pmatrix}. $$

The 0-to-1-hour and 1-to-4-hour pairs are each adjacent in observation order, but their correlations differ because their gaps differ. This is precisely why the time separation, not the observation-number lag, is used.

Using the correlation with residual variances

The exponential function specifies correlation, not covariance. To obtain a covariance, multiply the correlation by the standard deviations of the two residuals. This distinction matters when the observation model has concentration-dependent residual variability: two residuals can have the same correlation with other pairs but different covariances because their scales differ.

Worked Example: Converting Correlations to Covariances

Consider two hypothetical residuals from the same subject, 2 hours apart. Their residual standard deviations, based on the specified variance model, are 0.8 mg/L and 1.2 mg/L. Suppose \(\tau=3\) hours. Calculate their correlation and covariance.

First, \(\lambda=1/3\) per hour. The correlation is

$$ \rho=e^{-(1/3)(2)}=e^{-2/3}=0.5134. $$

The covariance is the correlation multiplied by both standard deviations:

$$ \operatorname{Cov}(e_{ij},e_{ik}) =(0.8\ \text{mg/L})(1.2\ \text{mg/L})(0.5134) =0.4929\ (\text{mg/L})^2. $$

The covariance has squared concentration units, whereas the correlation is dimensionless. Using \(0.5134\) as the covariance would be incorrect; it omits the two residual scales.

Worked Example: Comparing Two Correlation Times

A hypothetical schedule includes two samples separated by 6 hours. Compare their model-implied correlation under \(\tau=2\) hours and \(\tau=6\) hours. The elapsed time is the same in both calculations.

For \(\tau=2\) hours, \(\lambda=0.5\) per hour:

$$ \rho=e^{-6/2}=e^{-3}=0.04979. $$

For \(\tau=6\) hours, \(\lambda=1/6\) per hour:

$$ \rho=e^{-6/6}=e^{-1}=0.3679. $$

The longer correlation time implies substantially more persistent dependence across this 6-hour gap. Neither value is a probability that the residuals are equal or that one residual predicts the other exactly; each is a model-implied linear correlation conditional on the specified assumptions.

Assumptions, checks, and alternatives

The exponential structure is useful only when its assumptions are reasonable. In the basic formulation, residuals have mean zero after conditioning on the model predictions and random effects; the standardized process is stationary over the time range being modeled; dependence is determined by elapsed time through one positive decay rate; and residual processes are independent across subjects. If a single process is meant to describe one dosing occasion, observations from distinct occasions should not automatically be treated as continuous parts of the same process. The cross-occasion dependence must match the design and model assumptions.

Practical checks include plotting appropriately standardized residuals against time and examining residual pairs grouped by their time separation. Under the model, pairs with similar time gaps should have broadly similar correlation patterns, regardless of where in the schedule they occur. Estimated or empirical correlations should generally decline with increasing gap. These checks are informative rather than definitive: noisy residual estimates, few subjects, and unevenly represented time gaps can obscure the pattern.

Warning signs include a clear change in residual variance over time after standardization, correlations that depend on the location in the schedule as well as the gap, or substantial negative correlations that the positive exponential function cannot represent. A fitted decay rate near zero implies correlations close to 1 over the observed time range and can make the covariance structure difficult to distinguish from a shared offset. A very large rate implies near-independence except for extremely close samples. In either case, the observation schedule may contain too little information to estimate the decay scale reliably.

The main simple alternative is independent residual error: its correlation is 1 for a measurement with itself and 0 for distinct measurements. It is appropriate when remaining residual dependence is negligible, but can understate dependence when nearby measurements share short-term fluctuations. A discrete-time autoregressive structure instead makes dependence a function of integer observation lag, often using a common lag parameter. That can be suitable for regularly spaced samples, but treats equal index gaps alike even when the actual time gaps differ. The continuous-time exponential model naturally handles irregular schedules, at the cost of assuming a particular stationary decay shape.

Common mistake: Assigning the same correlation to every adjacent pair because each pair is one observation apart ignores the sampling times. Under continuous-time exponential correlation, a pair 15 minutes apart and a pair 5 hours apart have different correlations: use \(\exp\{-\lambda\Delta t\}\) with each pair’s actual elapsed time \(\Delta t\). Also, correlation is not covariance; multiply by both residual standard deviations to obtain covariance.

The model is parsimonious, but that simplicity is also a limitation. It cannot represent oscillating or negative correlation, multiple decay time scales, or nonstationarity without extensions. Nor does a fitted residual correlation automatically identify its scientific source: it summarizes remaining dependence under the specified mean, random-effect, and variance models. It should not be used as a substitute for checking whether those other parts of the model are adequate.

1
Specify the residual scale.
State the residual standard deviation for each observation, or state that it is constant.
2
Use actual times.
For every within-process pair, calculate \(\Delta t=|t_{ij}-t_{ik}|\) in the time units used for \(\lambda\).
3
Calculate dependence.
Set correlation to \(e^{-\lambda\Delta t}\), then multiply by both residual standard deviations if covariance is needed.
4
Check plausibility.
Confirm that the implied decay, stationarity, and occasion boundaries are compatible with the sampling design and residual patterns.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For \(\tau=4\) hours, what correlation does the model imply for two samples 4 hours apart?
  2. For \(\lambda=0.2\) per minute, calculate the correlation between samples 5 minutes apart.
  3. Two residuals 3 hours apart have standard deviations 0.5 mg/L and 2 mg/L, and their correlation is 0.4. What is their covariance, including units?
  4. Why might a discrete-time lag model be unsuitable for samples with unequal time gaps?
  5. Name one pattern that the stationary positive exponential model cannot represent, and explain why.

Solutions. (1) \(\lambda=1/4\) per hour, so \(\rho=e^{-(1/4)(4)}=e^{-1}=0.3679\). (2) \(\rho=e^{-0.2(5)}=e^{-1}=0.3679\). The rate is per minute, so the gap must be in minutes. (3) \(\operatorname{Cov}=0.5(2)(0.4)=0.400\ (\text{mg/L})^2\). (4) A lag model assigns dependence by observation-number separation, so it can give the same correlation to pairs with very different elapsed times. (5) It cannot represent negative correlation: for \(\lambda>0\), \(e^{-\lambda\Delta t}>0\) for every finite gap.