Why Separate Occasions?
Repeated concentration data from one person can be more informative about that person’s pharmacokinetics than a single occasion. But the occasions may differ for reasons that do not represent a lasting change in the person’s PK: absorption conditions, temporary physiology, or other occasion-level variability can shift observed concentrations. If every shift is attributed to a stable individual parameter, the posterior for that parameter can become too certain or be pulled in the wrong direction.
The key modelling distinction is between a stable individual effect, shared across the person’s occasions, and an occasion-specific effect, which varies from one occasion to another. This tutorial focuses on representing both in the individual likelihood and on updating the stable parameter without treating temporary deviations as persistent. An occasion effect is not automatically evidence of a time trend.
A Hierarchical Model for Repeated PK Data
Let \(\theta_i\) denote a stable individual parameter for person \(i\), such as log clearance, and let \(\eta_{ij}\) denote an occasion-specific deviation for occasion \(j\). Write the concentration data from occasion \(j\) as \(y_{ij}\), and let \(d_{ij}\) represent the recorded dose history and sampling times used to calculate the PK model prediction. A general concentration model is
The distribution on the right is determined by the PK structural model and residual error model. For example, an occasion deviation might enter additively on the log-clearance scale, so that occasion \(j\)’s log clearance is \(\theta_i+\eta_{ij}\). Other scientifically justified structures are possible; the deviation must be attached to a defined parameter or model component rather than added mechanically to concentrations.
A common starting assumption is \(\eta_{ij}\sim N(0,\tau^2)\), independently across occasions conditional on \(\theta_i\), with occasion effects independent of residual errors. The mean-zero assumption makes \(\theta_i\) the centre of the person’s occasion-specific values on the modeled scale. The variance \(\tau^2\) describes variation between occasions, not residual measurement error. The individual parameter has a prior distribution, such as \(\theta_i\sim N(\mu,\omega^2)\), possibly informed by a population model. These assumptions should be checked against the setting and data; they are not guaranteed by having repeated measurements.
For all the person’s occasions, the stable-parameter posterior is proportional to the prior times a likelihood in which each occasion effect is integrated out:
Here \(y_i\) denotes the person’s data across occasions. This product assumes conditional independence of the occasion data given the stable parameter and the occasion effects. When that assumption is inappropriate—for example, if deviations are correlated across occasions—the dependence structure must be represented rather than ignored. In a nonlinear PK model, the integrals may require numerical methods such as posterior sampling. The essential point is that each occasion contributes information about \(\theta_i\) while retaining uncertainty about its own deviation.
A Gaussian Update and Its Justification
A simple model makes the effect of occasion variability transparent. Suppose each occasion supplies a log-scale summary \(z_{ij}\) that is approximately an unbiased observation of \(\theta_i+\eta_{ij}\), with residual error \(\epsilon_{ij}\):
Assume the occasion deviations and residual errors are mutually independent, and that \(\theta_i\sim N(\mu,\omega^2)\). Integrating out \(\eta_{ij}\) gives \(z_{ij}\mid\theta_i\sim N(\theta_i,\tau^2+\sigma^2)\). Thus the occasion effect adds uncertainty to the information an occasion provides about the stable parameter. The posterior is normal, with the following mean and variance for \(J\) occasions:
To justify the result, the prior density contributes a quadratic term \(-(\theta_i-\mu)^2/(2\omega^2)\) to the log posterior. Each integrated occasion likelihood contributes \(-(z_{ij}-\theta_i)^2/[2(\tau^2+\sigma^2)]\). Collecting the coefficients of \(\theta_i^2\) gives posterior precision \(1/\omega^2+J/(\tau^2+\sigma^2)\); collecting the linear terms gives the numerator in the posterior mean. Completing the square yields the normal distribution stated above. The formula applies to this Gaussian summary model, not automatically to an arbitrary nonlinear concentration likelihood.
Worked Example: Updating Stable Log Clearance Across Two Occasions
Suppose a hypothetical individual has a prior for log clearance \(\theta_i\sim N(1.60,0.20^2)\), with clearance expressed in the units used for this log scale. Two separate concentration profiles yield approximate log-clearance summaries \(z_{i1}=1.50\) and \(z_{i2}=1.90\). Assume the occasion standard deviation is \(\tau=0.10\), the residual standard deviation of each summary is \(\sigma=0.10\), and the Gaussian model assumptions above are reasonable for these summaries.
The variance of one occasion’s summary conditional on \(\theta_i\) is \(\tau^2+\sigma^2=0.10^2+0.10^2=0.0200\). The prior variance is \(0.20^2=0.0400\). Therefore the posterior precision is \(1/0.0400+2/0.0200=25+100=125\), and the posterior variance is \(1/125=0.008000\).
The posterior mean is
The posterior standard deviation is \(\sqrt{0.008000}=0.08944\) log-clearance units. Under this model, the two occasions jointly update the stable log-clearance estimate to 1.680 while allowing for occasion-to-occasion variability. The second summary’s higher value does not force the stable estimate to equal 1.90; the model treats part of the discrepancy between occasions as occasion-level variation.
What an Occasion Effect Means in the Posterior
An occasion effect can be estimated conditionally as well as integrated out. In the Gaussian example, if \(\theta_i\) is temporarily treated as fixed, then the conditional posterior for \(\eta_{ij}\) given \(z_{ij}\) and \(\theta_i\) is normal. Its mean is \(\tau^2(\tau^2+\sigma^2)^{-1}(z_{ij}-\theta_i)\), and its variance is \(\tau^2\sigma^2/(\tau^2+\sigma^2)\). This conditional result describes how the model allocates an occasion’s deviation between the occasion effect and residual error. When \(\theta_i\) is uncertain, the joint posterior must also account for that uncertainty and the dependence between \(\theta_i\) and \(\eta_{ij}\).
Worked Example: Separating an Occasion Deviation From Residual Error
Use the hypothetical values from the previous example and consider occasion 1, with \(z_{i1}=1.50\). To illustrate the conditional calculation, fix \(\theta_i=1.680\) and use \(\tau^2=\sigma^2=0.0100\).
The conditional posterior mean deviation is \((0.0100/0.0200)(1.50-1.680)=0.5(-0.180)=-0.0900\) log-clearance units. Its conditional variance is \((0.0100)(0.0100)/0.0200=0.005000\), so its conditional standard deviation is \(\sqrt{0.005000}=0.07071\) log-clearance units.
At this fixed value of the stable parameter, the model attributes part of the lower occasion summary to a negative occasion deviation, while retaining substantial uncertainty about that deviation. This is not the marginal posterior for \(\eta_{i1}\): allowing \(\theta_i\) to vary would change its uncertainty and dependence with the stable parameter. Nor does the calculation establish a biological cause for the deviation.
Checking the Model and Comparing Approaches
The model’s assumptions concern both the PK structure and the repeated-occasion hierarchy. Check that dose histories and sample times are correctly represented, that the chosen occasion effect acts on a scientifically meaningful scale, and that the residual error model is suitable for the concentrations. A normal, mean-zero occasion distribution may be a useful approximation, but strong skewness, outliers, or dependence between occasions can make it inadequate. Sparse sampling can also leave stable parameters and occasion effects weakly identified; posterior correlations, shrinkage, and prior-data conflict are relevant diagnostics in that situation.
A useful diagnostic in the Gaussian summary model is the standardized difference between two occasion summaries. Under the model, \(z_{i1}-z_{i2}\) has mean zero and variance \(2(\tau^2+\sigma^2)\). Differences much larger than this scale indicate that the assumed combined variability may not explain the observed between-occasion discrepancy. In a full PK analysis, posterior predictive checks can assess whether simulated data reproduce the observed patterns across occasions.
Worked Example: Assessing a Between-Occasion Difference
Suppose a second hypothetical individual has summaries \(z_{i1}=1.50\) and \(z_{i2}=1.90\), and the assumed values remain \(\tau=0.10\) and \(\sigma=0.10\). The observed difference is \(1.50-1.90=-0.400\). Under the occasion-aware model, its standard deviation is \(\sqrt{2(0.0100+0.0100)}=\sqrt{0.0400}=0.200\).
The standardized difference is \(-0.400/0.200=-2.00\). Under the stated normal model, this is a relatively large discrepancy: the two-sided probability of a difference at least this extreme is approximately 0.0455. This is a model-based diagnostic, not proof that an occasion effect exists or that the model is false. The probability is conditional on the assumed variances and independence; uncertainty in those quantities would need to be included for a fuller assessment.
The main alternatives clarify what the occasion model is doing. A model with no occasion effects sets \(\tau^2=0\), attributing all between-occasion differences to residual error and stable-parameter uncertainty. This may be appropriate if occasion variability is negligible, but it can make the stable posterior too precise when real occasion variation is present. At the other extreme, estimating a separate unrelated parameter for every occasion avoids pooling, but discards the shared information that motivates a stable individual parameter. The hierarchical model partially pools: each occasion informs the shared \(\theta_i\), while its own \(\eta_{ij}\) absorbs modeled occasion variation. A time-varying parameter model instead represents systematic evolution across time; a random occasion deviation alone does not specify such evolution.
Worked Example: The Cost of Ignoring Occasion Variability
Return to the first hypothetical individual. If the same prior and summaries are analyzed but occasion variability is incorrectly set to zero, each summary is assigned variance \(\sigma^2=0.0100\), rather than \(0.0200\). The resulting posterior precision is \(25+2/0.0100=225\), and the posterior mean is \((40+1.50/0.0100+1.90/0.0100)/225=380/225=1.689\). The posterior variance is \(1/225=0.004444\), giving standard deviation \(\sqrt{1/225}=0.06667\) log-clearance units.
Compared with the occasion-aware result, the no-occasion model gives a more concentrated posterior: its standard deviation is 0.06667 rather than 0.08944. It also shifts the mean toward the unweighted average of the two summaries, 1.70. This comparison is not evidence that the occasion-aware model is always better; it shows that setting \(\tau^2=0\) changes both the information attributed to each occasion and the resulting uncertainty.
Common Pitfalls and Limitations
- Pooling as if all observations were exchangeable residuals. This treats occasion shifts as measurement noise and can overstate precision. Include an occasion component when the scientific model and data support it.
- Calling every occasion deviation a lasting parameter change. A mean-zero occasion effect is a transient deviation under the model; it does not imply a trend or permanent change.
- Adding an effect without defining its scale. A deviation on log clearance has a different meaning from an additive concentration error. State which model component it modifies.
- Assuming the data can identify every variance component. With few occasions or sparse samples, \(\tau^2\), residual variance, and the stable parameter may be difficult to distinguish. Prior sensitivity and posterior dependence should be examined.
- Interpreting a posterior occasion effect causally. The effect summarizes variation under the model. It does not identify whether adherence, physiology, sampling, or another factor caused that variation.
Occasion-specific effects are most useful when repeated data plausibly contain both a persistent individual signal and occasion-level variation, and when there are enough data or informative prior assumptions to distinguish them. If the actual process has serial dependence, a changing mean, or an incorrect dose record, an independent mean-zero occasion effect may not be an adequate description. The model’s posterior is only as relevant as the assumptions and data representation that produce it.
Check Your Understanding
Answer each question using the model and assumptions stated here. Brief solutions follow the questions.
- In the Gaussian summary model, what is the variance of one occasion summary conditional on the stable parameter after integrating out the occasion effect?
- A prior has mean 2.0 and variance 0.04. One summary is 2.2, with \(\tau^2=0.01\) and \(\sigma^2=0.01\). Calculate the posterior mean and variance.
- Why does an occasion-aware model generally produce less information about the stable parameter from each occasion than a model that sets \(\tau^2=0\)?
- Under the Gaussian model, if two occasion summaries have variances \(\tau^2+\sigma^2=0.02\) each, what is the standard deviation of their difference?
- Give one reason why a large standardized difference between two occasions is a diagnostic signal rather than proof of a permanent PK change.
Solutions. (1) The conditional variance is \(\tau^2+\sigma^2\), because the independent occasion deviation and residual error variances add. (2) The posterior precision is \(1/0.04+1/0.02=25+50=75\). The posterior mean is \((2.0/0.04+2.2/0.02)/75=(50+110)/75=2.133\), and the posterior variance is \(1/75=0.01333\). (3) The occasion variance contributes to the total uncertainty of the summary, reducing its precision about the shared stable parameter. (4) The difference variance is \(0.02+0.02=0.04\), so its standard deviation is \(\sqrt{0.04}=0.200\). (5) The discrepancy is evaluated conditional on assumed variances, independence, and the chosen model. It could reflect model misspecification, sampling variability, or other unmodeled causes, and does not by itself identify a lasting change.