Why Sample Individual Effects?
In a nonlinear mixed-effects model, each subject’s observations inform both population-level parameters and that subject’s latent random effect. Bayesian MCMC represents uncertainty about these quantities with posterior draws. Sampling an individual effect is therefore not the same as estimating a fixed subject-specific value once: it means drawing repeatedly from that effect’s conditional posterior while accounting for the subject’s data and the current population parameters.
This tutorial develops the update for individual clearance in a one-compartment intravenous bolus model. The population and residual parameters are treated as fixed at their current MCMC values during this update. Other updates in the full MCMC algorithm move those parameters in turn.
Model and Conditional Target
Suppose subject \(i\) receives an intravenous bolus dose \(D_i\), has known volume of distribution \(V_i\), and has clearance \(CL_i\). Under one-compartment elimination, the predicted concentration at time \(t_{ij}\) is
Here \(CL_{\mathrm{pop}}\) is the population typical clearance, and \(\eta_i\) is dimensionless. For this example, assume \(\eta_i\sim N(0,\omega^2)\) and \(y_{ij}\mid\eta_i,\psi\sim N(\mu_{ij}(\eta_i),\sigma^2)\). The assumptions are that the random effects are independent across subjects conditional on the population parameters, observations are conditionally independent given the effects and model parameters, and the stated concentration model and error distribution are adequate. The update also conditions on the current values of \(CL_{\mathrm{pop}},\omega,\sigma\), and any other fixed parameters.
Bayes’ rule gives the subject-specific conditional target up to a normalizing constant. With independent Gaussian residuals and the Gaussian random-effect prior, its log density, omitting terms that do not depend on \(\eta_i\), is
The first term rewards values of \(\eta_i\) that predict the subject’s repeated concentrations well. The second term regularizes the effect toward zero according to the population variability. Because the predictions depend nonlinearly on \(\eta_i\), this conditional distribution generally is not a standard distribution from which a direct draw is available.
A Metropolis Update for One Subject
A straightforward option is a random-walk Metropolis update. Given the current effect \(\eta_i\), propose \(\eta_i'\) from a symmetric distribution centered at \(\eta_i\), such as a normal distribution with a chosen proposal standard deviation. Evaluate the conditional target at both values. For a symmetric proposal, the proposal densities cancel in the acceptance ratio, leaving
where \(\ell\) is the log target with constants omitted. Draw \(u\sim\text{Uniform}(0,1)\). Accept the proposal if \(u<a\); otherwise retain the current effect. This rule allows proposals with lower posterior density to be accepted sometimes, which is necessary for the chain to represent the full target rather than becoming trapped at a local high-density value.
Worked Example: Evaluating the Conditional Target
Consider one hypothetical subject given a 50 mg intravenous bolus. Let \(V=5\) L and \(CL_{\mathrm{pop}}=5\) L/h, so the population elimination rate is \(CL_{\mathrm{pop}}/V=1\) h\(^{-1}\), and the initial concentration is \(50/5=10\) mg/L. The subject’s measured concentrations are 5.8 mg/L at 0.5 h and 3.5 mg/L at 1 h. For this update, take \(\sigma=0.5\) mg/L and \(\omega=0.4\) on the log-clearance scale. These are hypothetical data and parameter values.
At \(\eta=0.1\), the individual elimination rate is \(1\times\exp(0.1)=1.10517\) h\(^{-1}\). The predicted concentrations are
Using the unrounded predictions, the sum of squared residuals is approximately \((5.8-5.75460)^2+(3.5-3.311545)^2=0.00206+0.03551=0.03757\) \((\text{mg/L})^2\). The log target, with constants omitted, is therefore
At \(\eta=0\), the predicted concentrations are \(10\exp(-0.5)=6.0653\) mg/L and \(10\exp(-1)=3.6788\) mg/L. Using unrounded model predictions, the squared residuals are approximately \(0.07039\) and \(0.03197\) \((\text{mg/L})^2\), giving a total of \(0.10236\) \((\text{mg/L})^2\). The prior term is zero, so \(\ell(0)=-0.10236/[2(0.5)^2]\approx-0.2047\).
The data fit somewhat better at \(\eta=0.1\), and the prior also slightly favors \(\eta=0\). The combined target values incorporate both contributions; neither the data fit nor the prior alone determines the update.
Worked Example: Accepting or Rejecting a Proposed Effect
Continue with the same hypothetical subject and parameter values. Suppose the current effect is \(\eta=0.1\), and a symmetric random-walk proposal happens to be \(\eta'=0\). The log-target difference, computed from the unrounded model quantities, is approximately
Thus the acceptance probability is \(a=\min\{1,\exp(-0.0983)\}\approx0.9064\). If the uniform draw for this iteration is \(u=0.50\), then \(u<a\), so accept the proposal and set the next effect to zero. If instead \(u=0.95\), reject it and keep the current effect at 0.1. The decision is stochastic even though the target values and proposal are the same.
The accepted state is a draw in an MCMC sequence, not a declaration that the subject’s true effect is zero. Repeated updates produce a sequence whose distribution, after the chain has reached its stationary regime, targets the conditional posterior.
From Log-Effects to Individual Clearances
The sampled random effect is on the log scale, while the pharmacometric quantity of interest may be clearance in L/h. Transform each retained draw using \(CL_i=CL_{\mathrm{pop}}\exp(\eta_i)\). The transformation preserves positivity and means that zero random effect corresponds to typical population clearance, not zero clearance.
Worked Example: Transforming Posterior Effect Draws
Suppose, for illustration, four retained hypothetical draws for a subject are \(-0.2, 0, 0.1,\) and \(0.3\), with \(CL_{\mathrm{pop}}=5\) L/h. Transform each draw:
The arithmetic mean of these four transformed values is \((4.094+5.000+5.526+6.749)/4=5.342\) L/h. This is the mean of these four illustrative draws only. In an actual analysis, posterior summaries should use enough retained draws to give adequate Monte Carlo precision, and uncertainty in \(CL_{\mathrm{pop}}\) must also be propagated by transforming each draw with its corresponding population-parameter draw.
In general, the posterior mean clearance is not \(CL_{\mathrm{pop}}\exp\{\text{posterior mean of }\eta_i\}\), because exponentiation is nonlinear. Transform the draws first, then compute the desired summary on the clearance scale.
How the Update Fits into MCMC
A basic cycle can update each subject effect conditional on the current population parameters, then update population and residual parameters conditional on the current effects. The exact order and update method depend on the implementation. Conditional on the population parameters, each subject’s likelihood and random-effect prior involve that subject’s own observations and effect. This permits subject effects to be updated individually or in blocks, but it does not imply that their posterior draws are independent across iterations or independent of uncertain population parameters.
The conditional target should include every observation for the subject, not just one selected time point. Repeated measurements jointly constrain the effect through the concentration-time profile. For example, a value of clearance that fits the early concentration may fit the later one poorly; the sum in the likelihood accounts for both.
| Approach | How it handles the individual effect | Main consideration |
|---|---|---|
| Random-walk Metropolis | Proposes a nearby effect and accepts or rejects using the conditional target. | Simple to implement, but proposal scale affects movement and acceptance. |
| Direct conditional sampling | Draws directly if the full conditional has a tractable known form. | Often unavailable for nonlinear concentration models with Gaussian additive error. |
| Alternative proposal or block update | Uses a more tailored proposal or updates several related unknowns together. | May improve movement, but requires a correct proposal ratio and careful implementation. |
| Marginal approach | Integrates over subject effects in the likelihood rather than explicitly sampling each effect at every step. | Can change computational demands and does not directly provide a sequence of individual-effect draws without subsequent conditional sampling. |
Diagnostics, Assumptions, and Common Pitfalls
A correct acceptance formula cannot rescue a misspecified observation model. Check that the chosen residual model is plausible for the concentration scale and that the dose, sampling times, and units are represented consistently. The Gaussian additive-error model used here assumes a common residual standard deviation in mg/L; it can be inappropriate when variability is primarily proportional to concentration or when the data require a different error structure.
During computation, inspect whether subject effects move through a plausible range rather than remaining fixed for long stretches. A very low acceptance rate can indicate proposals that are too large; an extremely high rate accompanied by tiny movements can indicate proposals that are too small. Neither acceptance rate alone establishes adequate sampling. Compare chains and examine trace behavior and posterior summaries for subjects with sparse or weakly informative data. Implausible clearance draws, strong sensitivity to the prior, or poor prediction of repeated concentrations can indicate weak information or a mismatch between model and data.
- Using only one measurement. Updating from a single concentration discards information in the rest of the subject’s profile. Include all relevant observations in the conditional likelihood.
- Forgetting the random-effect prior. A likelihood-only update does not sample from the stated posterior. Include the \(-\eta_i^2/(2\omega^2)\) contribution.
- Treating a sampled effect as known. One accepted value is one state in a chain, not a precise individual estimate. Summaries should represent the distribution of retained draws.
- Transforming a posterior summary instead of the draws. Because the exponential is nonlinear, transform every draw before calculating clearance summaries.
- Using the symmetric-proposal formula for an asymmetric proposal. If proposal densities do not cancel, the acceptance ratio must include their reverse-to-forward density ratio.
The main limitation of this simple update is computational: a poorly scaled proposal may explore the conditional posterior inefficiently, particularly when the data weakly identify an individual effect. Alternative parameterizations and tailored sampling methods can help, but all must preserve the intended joint posterior. The centered log-effect formulation here makes the subject-specific likelihood and prior contributions explicit.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the model \(CL_i=CL_{\mathrm{pop}}\exp(\eta_i)\), what clearance corresponds to \(\eta_i=0\)?
- Why does the conditional log target include both a residual sum-of-squares term and a random-effect term?
- For a symmetric proposal with log-target difference \(\ell(\eta_i')-\ell(\eta_i)=-0.4\), calculate the acceptance probability.
- Why should clearance be calculated for each posterior draw before computing the posterior mean clearance?
Solutions. (1) \(CL_i=CL_{\mathrm{pop}}\exp(0)=CL_{\mathrm{pop}}\). (2) Bayes’ rule combines the likelihood of all of the subject’s observations with the prior distribution of the random effect. (3) \(a=\min\{1,\exp(-0.4)\}=\exp(-0.4)\approx0.6703\). (4) Exponentiation is nonlinear, so the mean of transformed draws need not equal the exponential of the mean effect; transforming each draw also keeps the summary on the clearance scale in L/h.