Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › PD Diagnostics With Sparse and Irregular Sampling

Model Diagnostics Specific to PD · Tutorial 471 of 598

PD Diagnostics With Sparse and Irregular Sampling

Learn to interpret PD residuals and predictive checks when observations are sparse, irregularly timed, and unevenly distributed across the response trajectory.

Advanced 12 min read

What You'll Learn

  • Define observation-level PD residuals and standardized residuals with an explicit sign convention
  • Explain why pooled summaries can be dominated by densely sampled subjects or phases
  • Compare phase-specific, subject-balanced, and schedule-matched predictive checks
  • Calculate a simple uncertainty measure for a sparse predictive check
  • Recognize when sparse observations cannot distinguish competing trajectory patterns

Why Sampling Structure Changes a Diagnostic

A PD model may describe a response that rises, reaches a maximum, and declines, while the data contain only a few observations at widely separated times. Another study may collect measurements at irregular times, with some participants contributing many observations and others only one or two. In either case, a residual plot or predictive check does not contain the same amount of information everywhere along the trajectory. A pattern based on many densely sampled observations can look more convincing than a pattern supported by only a few observations, even when the latter occurs in a scientifically important phase.

The goal is not to treat every sparse-data diagnostic as unreliable. It is to state what the diagnostic summarizes, which observations contribute to it, and how much independent information supports the interpretation. Residual-versus-time plots and predictive checks remain useful, but their display and summary should reflect the actual observation schedule.

Definition: For subject \(i\) at observation time \(t_{ij}\), let \(y_{ij}\) be the observed PD response and let \(\mu_{ij}\) be the model-predicted conditional mean on the same response scale. Define the raw residual as \(e_{ij}=y_{ij}-\mu_{ij}\). A positive residual means the observation exceeds the predicted mean; a negative residual means the predicted mean exceeds the observation. If the residual standard deviation is \(\sigma_{ij}>0\), the standardized residual is \(r_{ij}=e_{ij}/\sigma_{ij}\).

Here, “conditional” indicates that the prediction is calculated at the conditioning level chosen for the diagnostic, such as using the subject’s estimated random effects for an individual fit. A population-level prediction instead averages over the relevant between-subject variation. Those two predictions answer different questions and should not be mixed within one residual plot without explanation. For non-Gaussian responses, use residuals appropriate to the observation distribution, such as simulation-based residuals, rather than assuming that a raw difference has constant variance or a standard normal distribution.

A time phase is a prespecified interval or scientifically meaningful part of the response trajectory, such as early response, peak, or late response. The boundaries should be chosen using the design or scientific question, not selected after inspecting residuals to make a pattern appear stronger. With sparse data, a phase may contain very few observations; that limitation should be visible in the summary.

What Uneven Information Does to Summaries

A pooled residual mean is an observation-weighted average. If phase \(k\) contains \(n_k\) observations and has residual mean \(\bar e_k\), the overall mean is

$$ \bar e_{\mathrm{all}}=\frac{\sum_k n_k\bar e_k}{\sum_k n_k}. $$

Thus, phases with more recorded observations contribute more to the pooled value. If observations are clustered within subjects, a subject with many measurements can also dominate. This may be appropriate when the target is the average residual among the observations actually collected. It is not automatically appropriate when the question concerns average performance across subjects or across the response trajectory.

A subject-balanced summary first calculates a summary within each subject and then averages those subject summaries, giving each subject equal weight. A phase-balanced summary can likewise give each prespecified phase equal weight. These answer different questions from the observation-weighted mean. No weighting scheme is universally correct: the diagnostic should match the target of interpretation, and the number of subjects and observations supporting each component should be reported.

Worked Example: A Late-Phase Residual Pattern

Suppose a hypothetical continuous PD analysis has nine observations across three phases. The residuals, in response units, are \(0.2,-0.1,0.3,-0.2\) in the early phase; \(0.4,-0.4\) in the middle phase; and \(-1.2,-0.9,-1.5\) in the late phase. Calculate the phase means and the pooled mean.

Early phase. The sum is \(0.2-0.1+0.3-0.2=0.2\), so \(\bar e_{\mathrm{early}}=0.2/4=0.0500\) response units.

Middle phase. The sum is \(0.4-0.4=0\), so \(\bar e_{\mathrm{middle}}=0/2=0\) response units.

Late phase. The sum is \(-1.2-0.9-1.5=-3.6\), so \(\bar e_{\mathrm{late}}=-3.6/3=-1.20\) response units. Given the stated residual convention, this negative mean indicates that the model-predicted means exceed the observations by an average of 1.20 response units in this small late-phase sample. It suggests possible overprediction or another phase-specific mismatch; it is not evidence of underprediction.

Pooled mean. The total residual sum is \(0.2+0-3.6=-3.4\), so \(\bar e_{\mathrm{all}}=-3.4/9=-0.378\) response units. The phase means and observation counts make clear why the pooled value is not a substitute for a phase-specific display. In particular, the late-phase pattern is based on only three observations and should be treated as a signal to inspect, not as a precise estimate of a general late-phase bias.

Reading Residual Plots When Times Are Irregular

A residual-versus-time plot should show the actual observation times, rather than placing observations into equally spaced positions that imply a regular schedule. When several observations come from one subject, distinguish subjects visually or summarize within subject as well as across observations. Otherwise, a dense cluster from one person can look like broad evidence for a population-level time pattern.

Useful displays for sparse or irregular designs include plotting all residuals against actual time, showing the number of observations or subjects in each time interval, and displaying phase-specific summaries with their underlying counts. Standardized residuals can help when residual variability changes with time or predicted response, but standardization does not create information where few observations exist. A standardized residual retains its sign because its divisor, \(\sigma_{ij}\), is positive.

Time bins can make a display easier to read, but the binning decision matters. Wide bins may combine different response phases and hide a localized mismatch; narrow bins may contain too few observations to summarize meaningfully. Where observations fall at distinct planned times, displaying those times directly may be more informative than imposing bins. If bins are used, state their boundaries and show how many observations and subjects contribute to each.

Worked Example: Observation-Weighted and Subject-Balanced Summaries

In a hypothetical study, subject A has four early-phase residuals of \(0.2,0.1,0.3,0.2\) response units and one late-phase residual of \(-1.0\). Subject B has one early-phase residual of \(0\) and one late-phase residual of \(-1.0\). Compare the pooled early-phase mean with the mean of the two subjects’ early-phase means.

Pooled early-phase mean. There are five early observations, with sum \(0.2+0.1+0.3+0.2+0=0.8\). The pooled mean is \(0.8/5=0.160\) response units.

Subject-balanced early-phase mean. Subject A’s early mean is \(0.8/4=0.200\) response units; subject B’s is \(0/1=0\). Giving each subject equal weight gives \((0.200+0)/2=0.100\) response units.

The two values differ because subject A contributes four of the five early observations. The pooled mean describes the average among recorded early observations; the subject-balanced mean describes the average of these two subject-level means. Neither is inherently wrong. If the diagnostic question is whether a typical subject shows a phase-specific pattern, the subject-balanced value may be more relevant, but with only two subjects it is itself highly uncertain. The data should be plotted and the chosen target stated rather than interpreting either summary as a definitive population result.

Predictive Checks Must Respect the Observation Schedule

A predictive check compares observed responses with responses generated under the fitted model. To interpret it when sampling is sparse or irregular, generate replicated data at the actual observation times and for the same subjects or design structure as the observed data. A check on a dense, regular grid may be useful for visualizing a model-implied trajectory, but it does not show how well the model predicts the sparse observations that were actually collected.

For continuous PD, visual predictive checks can compare observed summaries with corresponding summaries from simulated data. With uneven sampling, compute those summaries within meaningful time regions and display the number of observed data points contributing to each region. If the scientific target gives equal importance to subjects, summarize or resample at the subject level rather than allowing densely observed subjects to determine the entire check. Population-level and individual-conditional predictions should also be kept distinct: the former assesses population predictions, while the latter assesses predictions conditional on individual information.

Sparse checks are especially uncertain in regions with few independent subjects. One can make that limitation concrete for a simple percentile check. If a continuous predictive distribution is calibrated, an observation has probability \(0.10\) of falling below its 10th percentile. For \(m\) independent subjects evaluated once each at a specified phase, the number \(K\) below that percentile follows a binomial distribution with \(m\) trials and probability \(0.10\). This calculation is not appropriate if the observations are dependent in a way ignored by the model; repeated measurements from the same subject should not be counted as independent trials.

Worked Example: Interpreting a Sparse Predictive Check

At a prespecified late phase, suppose four independent subjects each contribute one observed response. Under the fitted predictive distributions, three of the four observations fall below their respective simulated 10th percentiles. Calculate the probability of seeing at least three such observations if the predictive distributions are calibrated.

Under the stated calibration and independence assumptions, \(K\sim\operatorname{Binomial}(4,0.10)\). The probability is

$$ P(K\geq 3)=\binom{4}{3}(0.10)^3(0.90)+(0.10)^4 =4(0.001)(0.90)+0.0001=0.00370. $$

The observed count, three, is larger than the expected count \(4(0.10)=0.400\), and the calculated tail probability is 0.00370 under this simplified reference. This is a notable discrepancy that warrants checking the late-phase predictions and model assumptions. It is not the probability that the model is true or false, and it is not a definitive formal test of the entire PD model. The conclusion is also limited by the small number of subjects and by the assumption that the four evaluations are independent and correctly calibrated.

A Practical Diagnostic Sequence

1
Map the design.
Plot actual observation times and identify the subjects and phases represented. Record how many observations and subjects contribute to each region.
2
Choose the prediction target.
Decide whether the check concerns population predictions or individual-conditional predictions, and use a consistent prediction type.
3
Inspect residuals by time and subject.
Use the explicit residual sign convention, show the data rather than only smooth summaries, and look for patterns that are repeated across subjects rather than driven by one dense schedule.
4
Match the summary to the question.
Report observation-weighted, subject-balanced, or phase-specific summaries as appropriate, with counts and uncertainty. Generate predictive replicates at the observed schedule.
5
Qualify the conclusion.
Describe what is suggested by the available observations and what remains unresolved because of sparse coverage, clustering, or limited support in a phase.

Common Failure Modes and Alternatives

A frequent mistake is to treat each plotted point as an independent piece of evidence. When one subject supplies many measurements, the plotted point count can greatly exceed the number of independent subjects. The correction is to show subject identity and, where relevant, summarize at the subject level or use predictive simulations that preserve within-subject dependence.

Another mistake is to interpret a smooth curve through sparse residuals as a well-supported time trend. A smoother can interpolate between observed times, but it cannot establish what happened in a long unobserved interval. Show raw observations and support counts; interpret trends between sparse times cautiously. This is particularly important when competing response shapes would differ mainly between observation times.

A third mistake is to compare observations with predictive envelopes calculated under a different schedule or a different level of conditioning. The correction is to simulate the design actually observed and to label whether predictions are population-level or conditional on subject information. A further error is to read a negative residual as underprediction: with \(e_{ij}=y_{ij}-\mu_{ij}\), a negative value means the predicted mean is above the observed response.

Alternative summaries have complementary strengths. Raw residual plots preserve timing and individual patterns but can be visually crowded. Time-bin summaries are compact but depend on bin boundaries and may conceal variation within a bin. Subject-balanced summaries reduce dominance by dense schedules but may be noisy when subjects contribute few observations. Schedule-matched predictive checks incorporate the model and design, but they can still have low diagnostic power when few subjects are observed in a critical phase. Combining these views is generally more informative than choosing one as universally best.

Key takeaway: Sparse and irregular PD data call for diagnostics that expose where information comes from. Preserve actual times, distinguish subjects, match summaries and simulations to the intended prediction target, and state how limited phase-specific evidence constrains the conclusion.

Check Your Understanding

Answer each question using the residual convention and sampling principles in this tutorial. Solutions follow the questions.

  1. If \(y_{ij}=8.0\) response units and \(\mu_{ij}=8.7\) response units, what is the residual and what does its sign indicate?
  2. A phase has 12 observations from one subject and 2 from each of 6 other subjects. Why might its pooled mean not represent the average subject’s pattern?
  3. Why should simulated predictive checks use the actual irregular observation times?
  4. Under calibration, if five independent subjects each contribute one value at a specified phase, what is the expected number below their predictive 10th percentiles?

Solutions. (1) \(e_{ij}=8.0-8.7=-0.700\) response units; the prediction exceeds the observation. (2) The first subject contributes 12 of 24 observations, half the pooled data, so that subject receives much greater weight than any of the other six. A subject-balanced summary gives each subject equal weight, though it may be uncertain. (3) The model should be assessed against the times at which responses were actually observed; simulations on a different grid can change which parts of the trajectory contribute and can misrepresent the design. (4) The expected count is \(5(0.10)=0.500\) observations below the predictive 10th percentile, under the stated calibration and independence assumptions.

Clinical Biostats