Why Variance-Model Details Matter
In repeated pharmacokinetic (PK) data, a variance model does more than describe how widely concentrations vary. It specifies which observations share sources of variability, the scale on which variability is measured, and whether the expected size of an error changes with concentration. A model can have plausible-looking variance estimates yet represent the data incorrectly if any of these features are mishandled.
This tutorial focuses on three recurring errors: assigning an occasion effect to individual observations instead of occasions, interpreting a log-scale variance as a coefficient of variation, and assuming constant residual precision when error depends on predicted concentration. The examples use hypothetical data.
Set the Indices Before the Variance Components
Let \(i\) index subjects, \(j\) index occasions within subject, and \(k\) index observations within an occasion. Write \(Y_{ijk}\) for the observed concentration and \(F_{ijk}\) for its positive structural prediction before subject, occasion, and residual deviations. For illustration, consider the log-scale model
Here \(\eta_i\) is a subject-level effect, \(\kappa_{ij}\) is an occasion-level effect for subject \(i\) on occasion \(j\), and \(\epsilon_{ijk}\) is an observation-level residual. Suppose the effects have mean zero and are mutually independent, with
The subscripts encode the sharing pattern. All samples from the same subject share \(\eta_i\); samples from the same subject and occasion share \(\kappa_{ij}\); each observation has its own \(\epsilon_{ijk}\). These are assumptions, not consequences of the indices: independence across subjects and occasions, for example, should be scientifically defensible. The model is also a simplified illustration; a real structural prediction may depend on dose, time, and other covariates.
Worked Example: What Does an Occasion Effect Make Correlated?
Suppose two log concentrations from the same subject and occasion have \(\omega_O^2=0.04\) and \(\sigma^2=0.01\). Condition on the subject effect and the structural predictions. Find the variance of each log concentration and their correlation under the model above.
Each log concentration contains the same \(\kappa_{ij}\), but has a separate residual. Thus,
The covariance between the two log concentrations is the variance of their shared occasion effect. The independent residuals contribute no covariance:
Therefore their correlation is \(0.04/\sqrt{0.05(0.05)}=0.80\). If the observations instead came from different occasions of the same subject, their occasion effects would be independent under the stated assumptions. Conditional on \(\eta_i\), the covariance would then be zero. Without conditioning on \(\eta_i\), same-subject observations on different occasions would share the subject effect, contributing covariance \(\omega_B^2\).
Pitfall 1: Giving an Occasion Effect the Wrong Index
A frequent coding or notation error is to write an occasion effect as \(\kappa_{ijk}\), making it different for every observation. That is not the same model as \(\kappa_{ij}\). With \(\kappa_{ijk}\), two samples from one occasion do not share the occasion effect; it behaves like another observation-level source of variability. Conversely, writing \(\kappa_j\) when occasions are specific to each subject makes every subject’s occasion \(j\) share one effect, a global occasion effect rather than within-subject occasion variability.
The distinction is visible in covariance, not necessarily in the variance of an individual observation. In the worked example, replacing the shared occasion effect with an independent effect for each sample still gives a marginal log-scale variance of \(0.05\) per observation. But the covariance between two samples from the same occasion changes from \(0.04\) to zero. A model that matches marginal spread can therefore still fail to represent the repeated-data structure.
Before fitting a model, write down which records should share each random effect. Then check the indices against that sharing pattern. This is a structural check; estimating a variance cannot repair a component assigned to the wrong unit.
Pitfall 2: Treating a Log-Scale Variance as a CV
A variance for a normally distributed log effect is not a coefficient of variation (CV). To see the conversion, let \(R=\exp(Z)\), where \(Z\sim N(0,\omega^2)\). Then \(R\) is lognormal, with \(E(R)=\exp(\omega^2/2)\) and \(\operatorname{Var}(R)=\exp(\omega^2)\{\exp(\omega^2)-1\}\). Since a CV is standard deviation divided by mean,
This exact conversion applies to a mean-zero normal effect exponentiated as a multiplicative factor. It is also common to report the corresponding percentage by multiplying the CV by 100. For small \(\omega^2\), \(\sqrt{\exp(\omega^2)-1}\) is approximately \(\omega\), the log-scale standard deviation—not the log-scale variance \(\omega^2\).
Worked Example: Converting a Log-Scale Variance to a CV
A hypothetical subject-level log effect has estimated variance \(\omega_B^2=0.09\). Calculate the CV of its exponentiated multiplicative factor.
First use the exact conversion:
The CV is about \(30.7\%\). The log-scale standard deviation is \(\sqrt{0.09}=0.30\), or 30% as a rough approximation to the CV. Reporting the variance itself as a 9% CV is incorrect: variance, standard deviation, and CV are different quantities. Also, an exponentiated mean-zero normal effect has median 1 but arithmetic mean \(\exp(0.09/2)\approx1.046\); “centered at one” must therefore be understood on the log scale or in terms of the median, not the arithmetic mean.
Pitfall 3: Ignoring Concentration-Dependent Residual Error
A constant additive residual variance assumes the same spread in concentration units across the prediction range. That may be inappropriate when measurement error grows with concentration. One commonly used variance function for additive-plus-proportional error is
Here \(\sigma_{\mathrm{add}}\) has concentration units, while \(\sigma_{\mathrm{prop}}\) is dimensionless. The model’s residual standard deviation is the square root of the variance. An additive model sets the proportional contribution to zero; a proportional model sets the additive contribution to zero. These alternatives encode different assumptions about how residual spread changes with prediction.
Worked Example: Checking Residual Scale at Two Concentrations
Suppose hypothetical predictions are \(F=0.10\) and \(F=1.00\) mg/L, and the fitted combined-error model has \(\sigma_{\mathrm{add}}=0.020\) mg/L and \(\sigma_{\mathrm{prop}}=0.15\). Calculate the residual standard deviation at each prediction. Then standardize an observed residual of \(0.040\) mg/L at each concentration.
At \(F=0.10\) mg/L,
The standardized residual is \(0.040/0.0250=1.60\). At \(F=1.00\) mg/L,
The standardized residual is \(0.040/0.1513\approx0.264\). The same raw error is much larger relative to the modeled residual spread at low concentration. This illustrates why residual plots and diagnostics should be examined across predicted concentrations rather than summarized by one overall spread.
Diagnostics, Alternatives, and Limits
The earlier material on residual variance misspecification and residual error patterns across predicted concentrations provides the broader diagnostic context. For these particular pitfalls, useful checks include the following:
- Check the data hierarchy. Tabulate subjects, occasions per subject, and samples per occasion. Confirm that each random effect is shared by exactly the records it is meant to represent.
- Inspect within-occasion dependence. After accounting for subject effects and predictions, samples from one occasion may remain more similar than samples from different occasions. A model with an incorrectly observation-indexed occasion effect cannot represent that shared variation.
- Plot residuals against predictions. A fan-shaped pattern in raw residuals can indicate changing spread. Standardized residuals should be assessed using the variance function actually specified; persistent trends or changing spread suggest misspecification.
- Check units and transformations. Additive residual standard deviations must use concentration units. Log-scale variances are dimensionless and require a transformation before being reported as CVs.
The main alternatives are not interchangeable fixes. A subject-only effect describes between-subject differences but does not by itself represent occasion-to-occasion changes within a subject. An occasion effect describes shared within-occasion variation, while an observation-level residual describes remaining sample-specific variation. For residual error, additive, proportional, and combined variance functions imply different concentration patterns; selection should be guided by the measurement process and diagnostics, not by preference for a more complicated model.
These checks have limits. A residual pattern can arise from a wrong structural prediction as well as a wrong variance function, and an apparent occasion effect can be difficult to distinguish from other shared within-occasion influences. Sparse repeated sampling may provide little information about which source generated the observed variation. The variance components should therefore be interpreted in light of the design and scientific assumptions, not as automatic labels for every observed difference.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the model above, which observations share \(\kappa_{ij}\)?
- A log-scale variance is \(0.04\). Calculate the exact CV of its exponentiated mean-zero normal effect.
- For an additive-plus-proportional model with \(\sigma_{\mathrm{add}}=0.03\) mg/L, \(\sigma_{\mathrm{prop}}=0.10\), and \(F=0.50\) mg/L, calculate the residual standard deviation.
- Why can an observation-indexed occasion term produce the correct marginal variance but the wrong repeated-data structure?
Solutions. (1) All observations from the same subject \(i\) and occasion \(j\) share \(\kappa_{ij}\); observations from another occasion do not share that term under the stated independence assumption. (2) \(\operatorname{CV}=\sqrt{\exp(0.04)-1}=\sqrt{0.04081}\approx0.2020\), or about \(20.2\%\). (3) \(SD=\sqrt{0.03^2+(0.10\times0.50)^2}=\sqrt{0.0009+0.0025}=\sqrt{0.0034}\approx0.0583\) mg/L. (4) Giving each observation its own occasion term can preserve the per-observation variance, but removes the covariance that should arise when observations share an occasion. The indices determine which records share variability.