From an Oral PK Model to a Bayesian HMC Fit
A Bayesian HMC analysis links three pieces: the concentration-time model, the population distribution of individual parameters, and the observed-data likelihood. For an oral dose, clearance, volume, and absorption all influence the concentration curve. Their individual values may also vary together across people. HMC can sample the resulting joint posterior, but a set of numerical estimates is informative only if the model is stated clearly and the chains explore that posterior adequately.
The worked analysis below is entirely hypothetical. It illustrates a single-dose, one-compartment model with first-order absorption and elimination, known dose, and complete bioavailability fixed at \(F=1\). The example is deliberately small enough to follow by hand; it is not a substitute for fitting and checking a real data set.
The expression follows from the standard amount balance for first-order absorption: the gut amount declines at rate \(k_{a,i}\), while the central amount receives absorbed drug and loses drug by elimination at rate \(k_i\). With \(A_g(0)=D_i\) and central amount \(A_c(0)=0\), solving these linear differential equations gives \(A_c(t)=D_i k_{a,i}\{\exp(-k_i t)-\exp(-k_{a,i}t)\}/(k_{a,i}-k_i)\). Dividing by \(V_i\) gives the stated concentration. The limiting expression for equal rates follows by taking the limit as \(k_{a,i}\) approaches \(k_i\), or by applying the derivative of the exponential term.
Population Effects, Correlation, and Observation Model
A convenient population model places normal distributions on the logarithms of the three positive individual parameters. This guarantees positive individual clearance, volume, and absorption rates. Let \(\eta_i=(\eta_{CL,i},\eta_{V,i},\eta_{ka,i})^\mathsf{T}\) be a subject’s random-effect vector. Its components are allowed to be correlated.
Here \(\mu_{CL},\mu_V,\mu_{ka}\) are population means on the log scale; exponentiating one gives the population median (often called the typical value) of that parameter under this model. The vector \(\omega\) contains the three random-effect standard deviations, and \(R\) is their correlation matrix. Thus, for example, \(R_{CL,V}<0\) means subjects with above-typical log clearance tend, in this model, to have below-typical log volume. It does not establish a causal relationship.
For positive concentration measurements, suppose the residual error is proportional on the original scale, or equivalently normal and additive on the log scale:
The residuals are assumed conditionally independent across observations given the individual effects and model parameters. This model presumes positive measured concentrations and does not include a separate additive-error component or below-quantification observations. A Bayesian fit combines this likelihood with proper priors for the population parameters, random-effect scales, correlation matrix, and residual scale. In the example, the priors are centered on plausible positive PK values; random-effect standard deviations and \(\sigma\) have half-normal priors, and \(R\) has an LKJ prior favoring but not forcing moderate correlations. Priors must be specified on the scale actually used and checked for plausible implications for predicted concentrations.
Worked Example: Predicting a Concentration After an Oral Dose
For a hypothetical subject, take \(D=400\) mg, \(CL=5.00\) L/h, \(V=40.0\) L, and \(k_a=1.20\) h\(^{-1}\). At \(t=2.00\) h, calculate the predicted concentration. Assume the model conditions above, with known dose and \(F=1\).
First, \(k=CL/V=(5.00\ \mathrm{L/h})/(40.0\ \mathrm{L})=0.125\) h\(^{-1}\). Substitution into the oral concentration formula gives
The prefactor is \(480/43=11.1628\) mg/L. The exponential difference is \(\exp(-0.25)-\exp(-2.40)=0.778801-0.090718=0.688083\). Therefore \(C(2)=11.1628(0.688083)=7.6809\) mg/L, or \(7.68\) mg/L when reported to three significant figures. Both rates are positive and distinct, so the formula’s rate condition is satisfied.
Likelihood Contribution and HMC Sampling
For a given set of parameters and random effects, the likelihood compares each observed concentration with its model prediction. Under the lognormal observation model, the log-scale residual is \(r_{ij}=\log(Y_{ij}/C_{ij})\). Its conditional distribution is normal with mean zero and standard deviation \(\sigma\). Because the data are modeled as concentrations rather than log concentrations, the density on the concentration scale also includes the lognormal Jacobian factor \(1/Y_{ij}\); omitting it would change the likelihood used for inference.
Worked Example: Checking a Log-Scale Residual
Suppose the hypothetical observed concentration at the time in the preceding calculation is \(Y=7.90\) mg/L. Using the reported prediction \(C=7.68\) mg/L, calculate the log-scale residual and, if \(\sigma=0.150\), its standardized value. The proportional lognormal error model is appropriate here because the concentration is positive.
The residual is \(r=\log(Y/C)=\log(7.90/7.68)=\log(1.0286458)=0.02824\). It is dimensionless: the units cancel in the ratio. The standardized residual is \(r/\sigma=0.02824/0.150=0.1883\). Thus this observation is about \(0.188\) residual standard deviations above the prediction on the log scale, a small discrepancy relative to the assumed residual variability. Using the unrounded prediction instead would change only the final rounded residual slightly.
HMC samples the joint posterior over population parameters, random effects, and error parameters by using gradients of the log posterior. In practice, positive parameters are represented through unconstrained transformations, and the correlation matrix is parameterized so that sampled values remain valid correlation matrices. The sampling target is the posterior implied by the specified likelihood and priors; HMC does not verify that the PK model or priors are scientifically adequate.
For a worked hypothetical data set, suppose six subjects each receive a single 400 mg oral dose and have concentrations measured at 0.5, 1, 2, 4, and 8 hours. Assume the times and doses are known, all recorded concentrations are positive, and there are no missing or below-quantification values. A fit might use four chains, each with 1,000 warmup iterations followed by 2,000 retained iterations. Warmup adapts the numerical integration settings; those draws are not included in posterior summaries.
Worked Example: Reading a Hypothetical HMC Run
Suppose the retained draws give rank-normalized \(\widehat R\) values of 1.00–1.01 for the population parameters, bulk effective sample sizes from 1,200 to 3,500, tail effective sample sizes from 900 to 2,800, no divergent transitions, and no transitions that reach the maximum tree depth. These are hypothetical diagnostic results, not results from an actual study.
The four chains appear to have mixed adequately for the parameters summarized, and the effective sample sizes indicate that the 8,000 retained draws are not 8,000 independent draws. The absence of divergences and tree-depth warnings is reassuring for this run, but does not prove that every posterior region was explored or that the model is correct. Trace plots should also show chains overlapping and moving through the same regions rather than remaining separated or drifting.
If instead the chains show separated ranges, large \(\widehat R\), very small effective sample sizes, or divergences, posterior medians and intervals should not be treated as dependable summaries. Investigate the geometry, parameterization, priors, and model specification before interpreting estimates. These checks concern computation; poor predictive fit or systematic residual patterns concern the model’s adequacy and require separate assessment.
Summarizing Population and Correlation Results
Assume the hypothetical run has posterior medians and central 90% credible intervals as shown below. Each interval is a posterior interval conditional on the model, priors, and data. It is not a statement that the parameter has a 90% frequentist coverage probability, nor is it a probability that a fixed parameter changes value.
| Quantity | Posterior median | 90% credible interval | Scale and interpretation |
|---|---|---|---|
| \(\exp(\mu_{CL})\) | 5.30 L/h | 4.40 to 6.40 L/h | Population-typical clearance |
| \(\exp(\mu_V)\) | 41.0 L | 34.0 to 50.0 L | Population-typical volume |
| \(\exp(\mu_{ka})\) | 1.18 h\(^{-1}\) | 0.88 to 1.56 h\(^{-1}\) | Population-typical absorption rate |
| \(R_{CL,V}\) | -0.35 | -0.68 to 0.10 | Correlation of log clearance and log volume effects |
Worked Example: Converting a Log-Scale Posterior Summary
Suppose the posterior median of \(\mu_{CL}\) is 1.6677, with a 90% interval from 1.4816 to 1.8563. Convert these values to clearance units and interpret the result. The model defines \(\mu_{CL}\) as the mean log clearance, so exponentiation yields the population median clearance.
Exponentiating gives \(\exp(1.6677)=5.30\) L/h, \(\exp(1.4816)=4.40\) L/h, and \(\exp(1.8563)=6.40\) L/h, to the shown precision. Thus the posterior median of the population-typical clearance is 5.30 L/h, with a 90% credible interval of 4.40–6.40 L/h under this model and prior. The result is about a population log-scale location, not a claim that every subject’s clearance lies in that interval; individuals vary according to the random-effects distribution.
The correlation interval spans zero, so this hypothetical fit does not sharply determine the direction of the clearance-volume random-effect association. A negative posterior median alone is not strong evidence that the population correlation is negative. The uncertainty in a correlation can be substantial, especially when the number of subjects is small or the individual parameters are weakly identified by the sampling times.
Diagnostics, Alternatives, and Limitations
A useful review separates sampling diagnostics from model checks. HMC diagnostics ask whether the algorithm appears to explore the target posterior. Model checks ask whether that posterior model can reproduce relevant features of the data. For the hypothetical oral PK fit, inspect trace plots and convergence summaries, then compare observed concentrations with posterior predictive concentrations across subjects and time. Residual patterns that systematically rise or fall with time may indicate a misspecified structural or residual model even when chains mix well.
The model also has substantive limitations. Fixing \(F=1\) treats bioavailability as known; with oral data alone, \(F\) and \(V\) can be difficult to distinguish because concentration depends on their ratio. A single dose and sparse sampling may not separately identify absorption, elimination, and variability. The one-compartment, first-order absorption structure excludes distribution phases, lag time, time-varying clearance, and more complex residual error. The posterior is conditional on these simplifications and on the priors.
Bayesian HMC provides joint posterior distributions and directly represents uncertainty and dependence among parameters. Point-estimation alternatives such as likelihood-based FOCE or SAEM can be computationally efficient and familiar in population PK workflows, but typically report estimates and approximations to uncertainty rather than the full Bayesian posterior. Neither approach rescues a weakly informative design or a poor structural model; estimates from either should be checked against the data and scientific assumptions.
Check Your Understanding
Answer each question using the model and conventions developed above. Short solutions follow so that the calculations can be checked.
- If \(CL_i=6.0\) L/h and \(V_i=30\) L, what is \(k_i\), and what are its units?
- What does \(\exp(\mu_V)\) represent in the lognormal random-effects model?
- What does a 90% posterior credible interval for population-typical clearance mean, and what does it not mean?
- A run has no divergences but shows separated chain traces for \(\mu_{ka}\). Is the absorption summary ready to report? Why?
- Can a negative posterior median for \(R_{CL,V}\), by itself, establish a clearly negative association in the population?
Solutions. (1) \(k_i=CL_i/V_i=(6.0\ \mathrm{L/h})/(30\ \mathrm{L})=0.200\) h\(^{-1}\). (2) It is the population median, or typical value, of volume, because individual log volumes have mean \(\mu_V\) under the model. (3) Conditional on the model and prior, the posterior probability that the fixed population-typical clearance lies in that interval is 0.90; it is not a statement that there is a 90% chance the parameter changes or that 90% of individual clearances lie there. (4) No. Separated traces suggest the chains may not have explored a common posterior region, so inspect and address convergence and mixing before relying on that summary. (5) No. The interval and posterior uncertainty matter; if the interval includes zero, the direction is not well determined by these results.