Tutorials › Quantitative Systems Pharmacology (QSP) › Hierarchical Priors for Between-Subject Variation

Bayesian Calibration and Uncertainty Quantification · Tutorial 637 of 799

Hierarchical Priors for Between-Subject Variation

Learn to formulate a hierarchical prior for subject-level parameters and interpret individual and population updates without confusing within-subject uncertainty with between-subject variation.

Advanced 12 min read

What You'll Learn

  • Define subject-specific parameters on a scale suited to their biological constraints.
  • Specify a population distribution and hyperpriors for its unknown quantities.
  • Interpret how a subject’s data and population information combine in a hierarchical posterior.
  • Derive individual and population updates in a simple normal example.
  • Recognize the exchangeability assumptions and diagnostics relevant to hierarchical QSP models.
  • Compare hierarchical partial pooling with complete pooling and no pooling.

Why Model Between-Subject Variation?

A QSP model may describe the same pathway in every subject while allowing parameters such as receptor abundance, clearance, or pathway potency to differ. A calibration that assigns a separate unrestricted value to every subject can be unstable when each subject has limited data. Conversely, forcing all subjects to share one value can hide real biological heterogeneity. A hierarchical prior represents both levels: variation among subject-specific parameters and uncertainty about the population distribution that describes that variation.

The central distinction is between individual uncertainty about a particular subject’s parameter and population uncertainty about quantities such as the population mean and between-subject standard deviation. Data from one subject directly inform that subject’s parameter; under a shared population model, they can also inform the population distribution, which in turn informs other subjects.

Definition: A hierarchical prior specifies a probability distribution for subject-level parameters conditional on population-level quantities, and assigns prior distributions (hyperpriors) to those population-level quantities. A between-subject standard deviation describes variation among subject parameters under the population distribution; it is not the measurement error for an individual observation.

A Hierarchical Model for a QSP Parameter

For a positive subject-specific parameter, such as a clearance rate, define a dimensionless log parameter \(\eta_i\) for subject \(i\) by \(\theta_i=\theta_{\mathrm{ref}}\exp(\eta_i)\), where \(\theta_{\mathrm{ref}}\) is a fixed reference value with the same units as \(\theta_i\). A simple population model is \(\eta_i\mid\mu,\omega\sim N(\mu,\omega^2)\). The parameters \(\mu\) and \(\omega\) describe the population distribution on the log scale.

$$ \begin{aligned} \eta_i\mid\mu,\omega &\sim N(\mu,\omega^2), \qquad i=1,\ldots,N,\\ \mu &\sim N(m_0,s_0^2),\\ \omega &\sim \operatorname{HalfNormal}(s_\omega), \qquad \omega>0,\\ \theta_i&=\theta_{\mathrm{ref}}\exp(\eta_i). \end{aligned} $$

Here \(N\) is the number of subjects. The half-normal hyperprior places probability only on nonnegative values of \(\omega\); its scale \(s_\omega\) must be chosen to represent plausible population spread. The prior on \(\mu\) and the hyperprior on \(\omega\) should be stated on the scale used in the model and checked for biological plausibility. Other hyperprior families can be appropriate, but they must also respect the parameter’s constraints and be justified.

The population mean \(\mu\) is the mean of the log-relative parameter, not the arithmetic mean of \(\theta_i\). Conditional on \(\mu\) and \(\omega\), the median of \(\theta_i\) is \(\theta_{\mathrm{ref}}\exp(\mu)\), while its arithmetic mean is \(\theta_{\mathrm{ref}}\exp(\mu+\omega^2/2)\). Thus, reporting \(\exp(\mu)\) as the arithmetic population mean would generally be incorrect when \(\omega>0\).

In a mechanistic calibration, each subject’s data \(D_i\) have a likelihood determined by the QSP model output using that subject’s parameter vector. To keep the hierarchy clear, write the likelihood for subject \(i\) as \(p(D_i\mid\eta_i,\psi)\), where \(\psi\) denotes other model quantities. A basic assumption is conditional independence of subjects’ data given their respective parameters and shared quantities. In this tutorial’s numerical illustrations, simple normal likelihoods are used to make the updating transparent; real biomarker observations require an observation model suited to their measurement process.

$$ p(\mu,\omega,\eta_1,\ldots,\eta_N\mid D) \propto p(\mu)p(\omega) \prod_{i=1}^{N}p(\eta_i\mid\mu,\omega)\,p(D_i\mid\eta_i,\psi). $$

This expression shows the two-way connection in the model: each subject’s data inform \(\eta_i\), and the collection of subject parameters informs \(\mu\) and \(\omega\). In a full analysis, the subject parameters are not known values plugged into a population calculation. Their uncertainty is retained when estimating the population quantities.

Worked Example: Interpreting a Lognormal Population Prior

Suppose the reference clearance is \(\theta_{\mathrm{ref}}=1\) L/h, the population location is \(\mu=\log(1.5)\), and the between-subject standard deviation on the log scale is \(\omega=0.30\). Interpret the resulting distribution of subject clearances, conditional on these population quantities.

The median clearance is \((1\text{ L/h})\exp(\mu)=1.50\) L/h. Because \(\eta_i\) is normal, \(\theta_i\) is lognormal. Its arithmetic mean is \((1\text{ L/h})\exp(\mu+\omega^2/2)=(1\text{ L/h})\exp(\log(1.5)+0.045)\approx1.569\) L/h.

A central 95% interval of the population distribution of individual clearances is obtained from the 2.5th and 97.5th percentiles of the normal log scale: \((1\text{ L/h})\exp(\log(1.5)\pm1.96(0.30))\). The log-scale endpoints are approximately \(-0.1825\) and \(0.9935\); exponentiating gives approximately \([0.833,2.701]\) L/h. This interval describes variation among subjects conditional on the stated \(\mu\) and \(\omega\). It is not a credible interval for the uncertain population median.

How an Individual’s Data Update Their Parameter

The hierarchy provides a population-informed prior for each subject. For a transparent derivation, suppose the subject-level quantity \(x_i\) is observed with a normal likelihood \(x_i\mid\eta_i\sim N(\eta_i,\tau^2)\), where \(\tau\) is known. Conditional on fixed \(\mu\) and \(\omega\), the prior is \(N(\mu,\omega^2)\). Multiplying the two normal densities and collecting the terms involving \(\eta_i\) gives a normal posterior. Its precision is the sum of the prior and likelihood precisions.

$$ \begin{aligned} \operatorname{Var}(\eta_i\mid x_i,\mu,\omega) &=\left(\frac{1}{\omega^2}+\frac{1}{\tau^2}\right)^{-1},\\ E(\eta_i\mid x_i,\mu,\omega) &=\left(\frac{1}{\omega^2}+\frac{1}{\tau^2}\right)^{-1} \left(\frac{\mu}{\omega^2}+\frac{x_i}{\tau^2}\right). \end{aligned} $$

Equivalently, the posterior mean is a precision-weighted average of the population location and the subject’s data value. If the subject data are precise, \(\tau^2\) is small and \(x_i\) receives more weight. If the population distribution is narrow, \(\omega^2\) is small and the subject estimate is pulled more strongly toward \(\mu\). This is called partial pooling: an individual estimate is informed by both that subject’s data and the shared population model.

Worked Example: Updating One Subject’s Log Parameter

For illustration, suppose the prior for one subject is \(\eta_i\sim N(0,0.40^2)\), and the subject’s data are summarized by \(x_i=0.30\) with likelihood \(x_i\mid\eta_i\sim N(\eta_i,0.20^2)\). These are hypothetical log-scale values, not raw biomarker measurements. Find the posterior for \(\eta_i\), conditional on the stated population quantities.

The posterior variance is \((1/0.40^2+1/0.20^2)^{-1}=(6.25+25)^{-1}=0.0320\), so the posterior standard deviation is \(\sqrt{0.0320}=0.1789\). The posterior mean is \(0.0320(0/0.16+0.30/0.04)=0.2400\).

The conditional posterior is therefore \(N(0.2400,0.0320)\). Its normal 95% credible interval for \(\eta_i\) is \(0.2400\pm1.96(0.1789)\), approximately \([-0.1106,0.5906]\). This interval summarizes posterior uncertainty about the subject’s log parameter under the specified model and fixed population quantities.

If \(\theta_{\mathrm{ref}}=1\) L/h, the posterior median of \(\theta_i\) is \((1\text{ L/h})\exp(0.2400)\approx1.271\) L/h. Transforming the endpoints gives an approximate 95% credible interval of \([0.895,1.805]\) L/h. It is asymmetric on the clearance scale because the transformation is exponential.

How Subjects Update the Population

Population quantities learn from the full set of subjects, but the strength of that learning depends on the amount of information about each subject. A simple calculation illustrates this distinction. Suppose each subject has a noisy log-scale summary \(x_i\), with \(x_i\mid\eta_i\sim N(\eta_i,\tau^2)\), and \(\eta_i\mid\mu,\omega\sim N(\mu,\omega^2)\). If \(\omega\) and \(\tau\) are fixed, integrating over the unobserved \(\eta_i\) gives \(x_i\mid\mu\sim N(\mu,\omega^2+\tau^2)\). The marginal variance includes both between-subject variation and uncertainty in the subject summary.

$$ x_i\mid\mu,\omega \sim N(\mu,\omega^2+\tau^2). $$

With a normal prior \(\mu\sim N(m_0,s_0^2)\), these marginal normal observations yield a normal posterior for \(\mu\). This conjugate calculation is useful for seeing the population update, although in a full QSP analysis subject likelihoods need not reduce to normal summaries and \(\omega\) is usually uncertain too.

Worked Example: Updating the Population Location

Suppose three hypothetical subjects have log-scale summaries \(x_1=0.10\), \(x_2=0.40\), and \(x_3=-0.10\), each with known within-subject standard error \(\tau=0.20\). Let the between-subject standard deviation be fixed at \(\omega=0.30\) for this calculation, and use the prior \(\mu\sim N(0,0.50^2)\). Find the posterior for \(\mu\).

After integrating over each \(\eta_i\), the variance of each \(x_i\) conditional on \(\mu\) is \(v=\omega^2+\tau^2=0.09+0.04=0.13\). The prior precision is \(1/0.25=4\), and the data precision is \(3/0.13=23.0769\). Thus the posterior variance is \((4+23.0769)^{-1}=0.03693\), with posterior standard deviation \(\sqrt{0.03693}=0.1922\).

The posterior mean is \(0.03693[0/0.25+(0.10+0.40-0.10)/0.13]=0.1136\). So \(\mu\mid x_1,x_2,x_3\sim N(0.1136,0.03693)\), conditional on the fixed \(\omega\) and \(\tau\). A normal 95% credible interval is approximately \(0.1136\pm1.96(0.1922)=[-0.2631,0.4903]\). The data move the population location above its prior mean of zero, but the interval still reflects substantial uncertainty. This calculation does not account for uncertainty in \(\omega\); a full hierarchy would estimate it jointly with the subject parameters and \(\mu\).

Assumptions, Diagnostics, and Alternatives

The normal hierarchy above assumes that subjects are exchangeable with respect to the modeled population: before observing their data, subject labels do not determine different distributions for \(\eta_i\). It also assumes the chosen log-scale distribution is a reasonable representation of heterogeneity and that the likelihood correctly links each subject’s parameter to that subject’s observations. Exchangeability does not mean subjects are biologically identical. It means systematic differences are not represented unless the model includes them.

Check whether the model’s assumptions are plausible rather than interpreting a fitted hierarchy mechanically. Useful checks include whether the prior permits biologically plausible subject values, whether subjects’ data show patterns inconsistent with one common population distribution, and whether the fitted spread is informed by the data or mainly determined by the hyperprior. The introductory material on prior predictive checks gives a way to assess implications of the prior before conditioning on data. With few subjects, the data may provide little information about \(\omega\), so a seemingly precise description of heterogeneity can be misleading.

  • Unmodeled structure: If treatment arm, disease severity, or another covariate systematically shifts the parameter, a single exchangeable distribution may misrepresent that structure. A population model with relevant covariates may be more appropriate.
  • Confounding of variation sources: Sparse measurements can make it difficult to distinguish true between-subject differences from uncertainty in each subject’s parameter. Do not interpret all apparent spread as biological variability.
  • Distribution mismatch: A normal distribution on the log scale implies a lognormal distribution on the original scale. Strongly skewed or multimodal biological populations may not be represented adequately by this assumption.
  • Hyperprior influence: When the number of subjects is small or individual data are weak, posterior conclusions about \(\omega\) can depend substantially on its hyperprior. State that limitation and examine whether the prior allows plausible variation.

A hierarchical model is not the only option. Complete pooling imposes one shared parameter across subjects and cannot represent between-subject variation. No pooling estimates every subject separately and does not let subjects inform one another; with sparse data, individual estimates may be unstable. Hierarchical partial pooling is a middle ground, but it is appropriate only when subjects can reasonably be treated as draws from a shared population after accounting for modeled differences.

A common mistake is to treat the estimated population location as every subject’s true parameter, or to call \(\omega\) a measurement-error standard deviation. The correction is to keep the levels distinct: \(\mu\) and \(\omega\) describe a distribution across subjects, while \(\eta_i\) describes subject \(i\). Measurement uncertainty belongs in the likelihood; it can affect how well \(\eta_i\) is known, but it is not interchangeable with population spread.

Key takeaway: A hierarchical prior links subject-level parameters through a population distribution. It allows subject data to update individual parameters and, collectively, the population quantities, while keeping individual uncertainty distinct from between-subject variation and hyperparameter uncertainty.

Check Your Understanding

Work through the questions, then compare your reasoning with the solutions.

  1. For \(\theta_i=\theta_{\mathrm{ref}}\exp(\eta_i)\), with \(\theta_{\mathrm{ref}}=2\) mg/h, \(\mu=0\), and \(\omega=0.20\), find the conditional population median and arithmetic mean of \(\theta_i\).
  2. Suppose \(\eta_i\sim N(0.10,0.40^2)\) and \(x_i\mid\eta_i\sim N(\eta_i,0.30^2)\), with observed \(x_i=0.20\). Find the conditional posterior mean and variance of \(\eta_i\).
  3. In the population-location example, why is the marginal variance of \(x_i\) equal to \(\omega^2+\tau^2\), rather than just \(\omega^2\)?
  4. What is the key distinction between complete pooling and no pooling, and how does partial pooling differ from both?

Solutions. (1) The median is \(2\exp(0)=2.00\) mg/h. The arithmetic mean is \(2\exp(0+0.20^2/2)=2\exp(0.02)\approx2.040\) mg/h. (2) The posterior variance is \((1/0.16+1/0.09)^{-1}=(6.25+11.1111)^{-1}=0.0576\). The posterior mean is \(0.0576(0.10/0.16+0.20/0.09)=0.1640\). (3) The random summary contains variation in \(\eta_i\) across subjects, with variance \(\omega^2\), plus within-subject summary error, with variance \(\tau^2\). These independent components add, giving \(\omega^2+\tau^2\). (4) Complete pooling forces all subjects to share one parameter; no pooling estimates each separately without shared population information. Partial pooling allows subject estimates to differ while linking them through a population distribution.

Clinical Biostats