Tutorials › Model-Informed Drug Development (MIDD) › Simulating Correlated PK and PD Variability

Clinical Trial Simulation · Tutorial 278 of 596

Simulating Correlated PK and PD Variability

Build a correlated PK/PD simulation that preserves subject-level variability across visits, then verify that the simulated parameters and responses show the intended dependence.

Advanced 13 min read

What You'll Learn

  • Construct a covariance matrix and use a Cholesky factor to generate correlated subject effects.
  • Translate correlated log-scale effects into individual PK and PD parameters.
  • Simulate concentrations, pharmacodynamic responses, and repeated observations with residual error.
  • Distinguish between-subject dependence from within-subject residual variability.
  • Check whether simulated parameter and response correlations match the model’s intent.
  • Identify common errors such as resampling subject effects at every visit or using an invalid covariance matrix.

Why Correlation Matters in Virtual Participants

A simulated participant is more than a collection of independently sampled parameters. Clearance, volume, potency, and other subject-level characteristics may vary together. If the simulation ignores that dependence, it can generate plausible marginal distributions but implausible combinations of characteristics. Those combinations can alter predicted concentrations, responses, and the range of trajectories across participants.

The goal here is to specify and simulate correlated PK and PD variability, including repeated observations within each participant. The correlation structure is an assumption about the joint distribution of subject effects; it is not something that should be added merely to make a simulation look more realistic. Its scale, direction, and consequences should be explicit and checked.

Definition: A subject-level random effect is a participant-specific deviation from a population parameter. A vector of subject-level effects is correlated when at least one pair has nonzero covariance. A residual error is observation-level variation around the model-predicted response, conditional on that participant’s parameters and covariates.

Specify the Joint Distribution Before Simulating

For a simple PK/PD model, let \(\eta_{CL,i}\) and \(\eta_{EC50,i}\) be participant \(i\)'s random effects on clearance and the concentration producing half-maximal response. A common specification is a bivariate normal distribution with mean zero and covariance matrix \(\Omega\). The diagonal entries are variances; the off-diagonal entries are covariances.

$$ \begin{pmatrix} \eta_{CL,i}\\ \eta_{EC50,i} \end{pmatrix} \sim N\left( \begin{pmatrix}0\\0\end{pmatrix}, \begin{pmatrix} \omega_{CL}^{2} & \rho\,\omega_{CL}\omega_{EC50}\\ \rho\,\omega_{CL}\omega_{EC50} & \omega_{EC50}^{2} \end{pmatrix} \right) $$

Here \(\omega_{CL}\) and \(\omega_{EC50}\) are the standard deviations of the effects on their respective model scales, and \(\rho\) is their correlation, between \(-1\) and \(1\). The covariance matrix must be positive semidefinite. For this two-effect matrix, that condition requires \(|\rho|\leq 1\); in larger systems, all eigenvalues of the covariance matrix must be nonnegative. A Cholesky factorization is available when the matrix is positive definite.

For positive parameters, a lognormal parameterization keeps individual values positive:

$$ CL_i=CL_{\mathrm{pop}}\exp(\eta_{CL,i}), \qquad EC50_i=EC50_{\mathrm{pop}}\exp(\eta_{EC50,i}) $$

In this parameterization, \(CL_{\mathrm{pop}}\) and \(EC50_{\mathrm{pop}}\) are typical values: with mean-zero normal effects, they are medians of the individual parameter distributions, not generally their arithmetic means. Correlation is specified between the normal effects on the log scale. The resulting correlation between the positive individual parameters need not equal \(\rho\).

To generate the effects, draw independent standard normal values \(Z_1,Z_2\), then form:

$$ \eta_{CL,i}=\omega_{CL}Z_1,\qquad \eta_{EC50,i}=\omega_{EC50}\left(\rho Z_1+\sqrt{1-\rho^2}\,Z_2\right) $$

The shared \(Z_1\) term induces the intended correlation. For more effects, the same idea is applied using a matrix factor: if \(\Omega=LL^\mathsf{T}\) and \(Z\) is a vector of independent standard normal draws, then \(\eta=LZ\) has covariance \(\Omega\). Generate this vector once per participant and retain it for that participant’s entire trajectory.

Worked Example: Generating One Correlated Participant

Suppose the hypothetical model uses \(CL_{\mathrm{pop}}=10.0\) L/h, \(EC50_{\mathrm{pop}}=2.00\) mg/L, \(\omega_{CL}=0.30\), \(\omega_{EC50}=0.40\), and \(\rho=0.50\). For one participant, take the illustrative standard-normal draws \(Z_1=1.00\) and \(Z_2=-0.500\).

First calculate the effects:

$$ \eta_{CL}=0.30(1.00)=0.300,\qquad \eta_{EC50}=0.40\left[0.50(1.00)+\sqrt{0.75}(-0.500)\right]=0.02679 $$

Then transform them to individual parameters:

$$ CL_i=10.0e^{0.300}=13.50\ \text{L/h},\qquad EC50_i=2.00e^{0.02679}=2.054\ \text{mg/L} $$

The effects are positively associated in the population model, but this one participant’s effect values do not need to be equal or even have the same magnitude. They are one draw from the joint distribution, not a demonstration of the population correlation by themselves.

From Subject Effects to Repeated PK and PD Observations

For illustration, consider a one-compartment model after an intravenous bolus dose \(D\), with fixed volume \(V\) and no additional structural complexity. The concentration at time \(t\) is:

$$ C_i(t)=\frac{D}{V}\exp\left(-\frac{CL_i}{V}t\right) $$

Let the concentration-driven response follow an \(E_{\max}\) model, with maximum response \(E_{\max}\) and baseline \(E_0\):

$$ m_i(t)=E_0+E_{\max}\frac{C_i(t)}{EC50_i+C_i(t)},\qquad Y_{ij}=m_i(t_{ij})+\epsilon_{ij} $$

Here \(m_i(t)\) is the model-predicted response, \(Y_{ij}\) is the observed response at visit \(j\), and \(\epsilon_{ij}\) is residual error. In the example below, residuals are assumed independent across visits and participants, normally distributed with mean zero and standard deviation \(\sigma\), conditional on the participant’s parameters. This is a modeling assumption, not a universal property of repeated measurements. If residuals are serially correlated or have a concentration-dependent variance, that structure must be specified rather than silently replaced by independent constant-variance error.

Worked Example: Simulating Two Visits for One Participant

Suppose, hypothetically, that a participant has \(CL_i=10.0\) L/h and \(EC50_i=2.00\) mg/L, with \(D=100\) mg, \(V=20.0\) L, \(E_0=0\), and \(E_{\max}=100\) response units. The participant has measurements at \(t=1\) h and \(t=2\) h. Assume additive residual error with \(\sigma=5.00\) response units, and use illustrative residual draws of \(+3.00\) and \(-4.00\) response units.

At one hour, the predicted concentration and response are:

$$ C_i(1)=\frac{100}{20.0}e^{-(10.0/20.0)(1)}=5e^{-0.5}=3.033\ \text{mg/L} $$
$$ m_i(1)=100\frac{3.033}{2.00+3.033}=60.26\ \text{response units} $$

Adding the residual draw gives \(Y_{i1}=60.26+3.00=63.26\) response units. At two hours:

$$ C_i(2)=5e^{-1}=1.839\ \text{mg/L},\qquad m_i(2)=100\frac{1.839}{2.00+1.839}=47.91\ \text{response units} $$

Thus \(Y_{i2}=47.91-4.00=43.91\) response units. The same individual clearance and potency determine both predicted values; only the visit-specific residual draws differ. A new clearance or \(EC50\) draw at the second visit would represent a different participant, not another measurement on this one.

Why Observations Become Dependent

Even when residual errors are independent across visits, repeated observations from the same participant are generally dependent because they share the same random effects. The law of total covariance makes this distinction precise. Let \(Y_{i1}\) and \(Y_{i2}\) be two observations. Conditional on the subject effects, suppose their residual errors are independent. Then their conditional covariance is zero, and:

$$ \operatorname{Cov}(Y_{i1},Y_{i2}) = \operatorname{Cov}\left(m_i(t_{i1}),m_i(t_{i2})\right) + E\left[\operatorname{Cov}(Y_{i1},Y_{i2}\mid\eta_i)\right] = \operatorname{Cov}\left(m_i(t_{i1}),m_i(t_{i2})\right) $$

The first equality decomposes total covariance into covariance of conditional means plus expected conditional covariance. The second uses the stated conditional independence assumption. Since both predicted responses depend on the same \(\eta_i\), their means will often covary. The direction and size depend on the model, time points, parameter effects, and nonlinear response function. If residuals are themselves correlated, the expected conditional covariance term is not zero and must be included.

Correlation between PK and PD effects also does not imply that every PK measure and every PD outcome will have that same correlation. For example, the PD response depends on concentration, which depends on PK parameters; the nonlinear concentration-response function transforms the joint variability. The observed response correlation can therefore differ in magnitude, and sometimes in direction, from the correlation between any two underlying random effects.

Check the Dependence You Actually Induced

The covariance matrix describes a model input. A simulated data set is a finite random sample, so its empirical correlations will not equal the specified values exactly. Useful checks compare the intended structure with both generated subject parameters and repeated observations. Check on the scale where the model defines the effects, then also inspect the scales and outcomes relevant to the simulation.

For two jointly normal effects with standard deviations \(\omega_1,\omega_2\) and correlation \(\rho\), the corresponding lognormal parameters \(P_1=P_{1,\mathrm{pop}}e^{\eta_1}\) and \(P_2=P_{2,\mathrm{pop}}e^{\eta_2}\) have correlation:

$$ \operatorname{Corr}(P_1,P_2)= \frac{\exp(\rho\omega_1\omega_2)-1} {\sqrt{\left[\exp(\omega_1^2)-1\right]\left[\exp(\omega_2^2)-1\right]}} $$

This result follows from the normal moment-generating function: \(E[e^{\eta_k}]=e^{\omega_k^2/2}\), and \(E[e^{\eta_1+\eta_2}]=e^{(\omega_1^2+\omega_2^2+2\rho\omega_1\omega_2)/2}\). Subtracting the product of the means gives the covariance; dividing by the two lognormal standard deviations gives the stated correlation. It provides a reference for checking transformed parameters, not a substitute for checking the generated sample.

Worked Example: Checking the Correlation on the Parameter Scale

Use the hypothetical random-effects model above, with \(\omega_{CL}=0.30\), \(\omega_{EC50}=0.40\), and \(\rho=0.50\). The covariance of the log-scale effects is \(0.50(0.30)(0.40)=0.0600\). The correlation between the positive individual parameters is therefore:

$$ \operatorname{Corr}(CL_i,EC50_i)= \frac{e^{0.0600}-1} {\sqrt{(e^{0.0900}-1)(e^{0.160}-1)}} = \frac{0.06184}{\sqrt{(0.09417)(0.1735)}}\approx 0.484 $$

The requested correlation on the log-effect scale is \(0.500\), while the corresponding population correlation between the exponentiated parameters is about \(0.484\). In a finite simulated cohort, the sample correlation will vary around this population value. A check should also examine whether each effect has approximately the intended mean and variance on its specified scale, and whether repeated observations retain participant-level trajectories rather than independently varying parameters at each visit.

Diagnostics, Alternatives, and Limitations

A practical check is to simulate a large set of participants before running the full trial simulation. Examine the random-effects scatterplot and covariance or correlation matrix, then inspect the marginal distributions of individual parameters. For repeated data, plot trajectories by participant and compare within-participant variation with between-participant variation. If the model assumes independent residuals, residuals after accounting for the predicted trajectory should not show an unmodeled pattern across visits. These checks can reveal implementation errors; they cannot establish that the assumed correlation structure is empirically correct.

ApproachWhat it representsMain caution
Independent random effectsZero covariance between specified subject effectsMay omit meaningful dependence and create unrealistic parameter combinations
Correlated normal effectsJoint dependence on the model’s random-effect scaleRequires a valid covariance matrix and a scale-appropriate interpretation
Correlated effects plus residual errorBetween-subject variability and observation-level variationResidual assumptions must match the measurement process and repeated-data structure

Common implementation failures include entering a correlation where a covariance is required, using a matrix that is not positive semidefinite, and drawing each random effect independently despite specifying a nonzero correlation. Another frequent error is generating new subject effects at every visit. That destroys the intended stable between-participant heterogeneity and produces trajectories that do not correspond to persistent individual parameters.

A further pitfall is to infer that the simulated response correlation must equal the input random-effect correlation. That is wrong because response is a nonlinear function of concentration and PD parameters, and residual error adds further variation. The correction is to state which scale the input correlation describes, derive or simulate the implications on the outcome scale, and check those implications directly. Correlation alone also does not establish a biological mechanism; it is a joint-distribution assumption in the model.

Key takeaway: Draw correlated subject effects once per participant, transform them through the PK and PD models, and add residual errors at the observation level. Verify the intended dependence on both the random-effect scale and the simulated trajectory scale.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. If the model specifies a correlation of zero between two normal random effects, does that make their exponentiated parameters independent? Under what additional condition would independence follow?
  2. A participant has three scheduled visits. Which quantities should ordinarily be drawn once for that participant, and which may be drawn separately at each visit?
  3. Why can the correlation between individual clearance and \(EC50\) differ from the correlation specified between their normal random effects?
  4. Suppose repeated residuals are conditionally independent, but two visits share the same subject effects. What is the source of their total covariance?
  5. A simulated sample correlation is \(0.45\) when the model specifies \(0.50\). Does this alone show the code is wrong? Name two additional checks.

Solutions. (1) For jointly normal effects, zero correlation implies independence; applying separate exponentials preserves independence. Zero correlation alone does not imply independence for general, non-normal effects. (2) Draw subject-level effects and other stable participant parameters once; draw observation-level residuals at each visit under the stated residual model. (3) Exponentiation changes the marginal distributions and the correlation scale; nonlinear transformations do not generally preserve correlation. (4) Their predicted conditional means vary together across the shared random effects, so the covariance of those means induces total covariance. (5) No: finite samples fluctuate. Check the generated random-effect correlation and marginal variances, and verify that participant effects are held fixed across visits and the covariance matrix is implemented correctly.