Tutorials › Population Pharmacokinetics › Adaptive Binning for Visual Predictive Checks

Predictive Checks · Tutorial 374 of 599

Adaptive Binning for Visual Predictive Checks

Learn to construct and assess adaptive VPC bins using sample counts, temporal resolution, and the effect of boundaries on concentration quantiles.

Intermediate 10 min read

What You'll Learn

  • Describe how adaptive binning balances observations per bin against time resolution.
  • Construct shared bin boundaries from sampling times and prespecified count rules.
  • Explain why observed and simulated data must use the same boundaries.
  • Assess how pooling times within a bin changes concentration quantiles.
  • Diagnose over-wide, underpopulated, and outcome-driven bins.

Why Adapt the Time Bins?

A visual predictive check (VPC) compares observed concentration quantiles over time with the corresponding quantiles from simulated data. The earlier material on choosing time bins for a VPC establishes that each plotted point summarizes observations within a time interval. Adaptive binning addresses a practical tension: narrow intervals preserve temporal detail, but may contain too few observations for stable quantiles; wide intervals provide more observations, but combine measurements made at meaningfully different times.

Adaptive binning lets interval widths vary across the time range. Where observations are dense, relatively narrow bins can retain detail. Where observations are sparse, wider bins can accumulate enough data to estimate quantiles more reliably. This is a design choice, not a guarantee that every resulting quantile is precise. The binning rule should be specified before examining concentration patterns, and its effect on the VPC should be assessed.

Definition: Adaptive binning is a rule for dividing the time range into intervals of unequal width, usually using sampling-time locations or counts to balance a prespecified minimum amount of information per bin against a desired level of temporal resolution. The resulting intervals are the bins; the time values that separate them are the bin boundaries.

For a bin \(B_j\), the observed \(p\)th concentration quantile is calculated from the observed concentrations whose sampling times fall in \(B_j\). In each simulated replicate, the corresponding quantile is calculated using that replicate’s concentrations at times in the same bin. The simulated quantiles across replicates form the reference distribution or envelope used in the VPC. The bins therefore define which observations are being summarized, not merely where points appear on a plot.

Rules for Constructing Adaptive Bins

There is no universal minimum count or single best adaptive algorithm. A useful rule makes the trade-off explicit. For example, an analyst may choose a target minimum number of records per bin, a maximum acceptable bin width, or both. The minimum should be chosen in light of the quantiles being plotted and the study’s sampling design. A tail quantile generally needs more information than a median to be estimated usefully.

A simple count-based procedure starts with sampling times in order and accumulates adjacent times until a bin reaches the target count. A boundary is then placed between that bin and the next time group. If the final bin falls below the target, it can be merged with its neighbor, provided the resulting width remains interpretable. With tied sampling times, keep all observations at a tied time together rather than splitting them arbitrarily. One possible boundary between distinct time values is their midpoint; another consistent convention is acceptable if stated and applied identically.

1
Choose the target and constraints.
Specify the quantiles of interest, a minimum count or subject contribution per bin, and any maximum width or clinically meaningful time resolution.
2
Form candidate intervals from time information.
Use sampling-time locations and counts, not the observed concentration values, to determine where intervals start and end.
3
Check counts and widths.
Merge or split adjacent intervals only when the prespecified rules allow it. Record any interval where the constraints cannot both be met.
4
Apply the same boundaries to every data source.
Calculate observed and simulated quantiles over the identical time intervals, then inspect whether the widths preserve the time pattern of interest.

The count used in the rule matters. A bin with many records may still have contributions from few distinct individuals, particularly with repeated measurements. Repeated observations from one person are not independent information about the population distribution. Thus, record counts are convenient for defining intervals, but the number of distinct subjects contributing to each bin is an important companion diagnostic. Depending on the study design and target, a rule based on subject contributions may be more informative than one based only on records.

The boundaries should ordinarily be determined from the observation schedule or sampling-time distribution and then held fixed across the observed data and all simulated replicates. If boundaries are selected separately for each simulated replicate, the simulated quantiles may summarize different time mixtures from the observed quantiles. If the boundaries are selected after viewing observed concentrations, outcome-driven choices can make the comparison misleading. Adaptive does not mean outcome-dependent.

Worked Example: Building Bins to Meet a Count Target

Suppose a hypothetical study has the following numbers of concentration records at six scheduled times. The analyst chooses a minimum of eight records per bin and uses adjacent time groups. Assume the records are the relevant count for this example; in an actual analysis, the number of distinct contributing subjects would also be checked.

Time (h)Record count
0.54
15
24
45
84
124

Accumulate adjacent times from the beginning. The first two groups contain \(4+5=9\) records, which reaches the target. The next two contain \(4+5=9\), and the final two contain \(4+4=8\). The three bins therefore meet the minimum without combining all six times.

$$ n_1=4+5=9,\qquad n_2=4+5=9,\qquad n_3=4+4=8 $$

Using midpoints between the last time in one group and the first time in the next gives boundaries at \((1+2)/2=1.5\) h and \((4+8)/2=6\) h. With intervals left-closed and right-open, the bins can be reported as \([0.5,1.5)\), \([1.5,6)\), and \([6,12]\) h over the observed time range. The widths are 1, 4.5, and 6 h. The count target is met, but the late bins are substantially wider, so the plotted late quantiles summarize concentrations over longer periods. The analyst should report that loss of temporal resolution rather than treating all three points as equally time-specific.

Why Boundaries Change Quantiles

A bin’s quantile is calculated from the pooled concentrations in that bin. It is not generally the average of the quantiles at the component times. To see why, suppose a bin combines time groups \(k=1,\ldots,K\), with \(n_k\) records in group \(k\). Its empirical distribution function is the weighted combination of the time-specific empirical distribution functions, with weights proportional to their record counts:

$$ \widehat{F}_{B}(c)=\sum_{k=1}^{K}\frac{n_k}{\sum_{\ell=1}^{K}n_\ell}\widehat{F}_{k}(c) $$

This follows directly from counting records with concentration at most \(c\): the total number below \(c\) is the sum of those counts across time groups, and dividing by the total number of records gives the displayed weighted sum. A quantile is obtained by finding where this combined distribution reaches the target probability. Because the weights and distributions both matter, shifting a boundary can change the quantile even when no concentration value changes.

The same issue applies to simulated data. If concentration changes rapidly within a wide bin, the bin’s observed quantile and simulated quantile can each represent a mixture of different times. A discrepancy may be diluted, exaggerated, or even masked by that mixture. Applying the same boundaries keeps the time mixtures comparable, but it does not restore detail that the bin width has removed.

Worked Example: A Wide Bin Can Hide Opposing Time Patterns

Consider hypothetical observed and simulated concentrations at two times, 2 h and 4 h. There are five records at each time. For clarity, define the empirical quantile here by the nearest-rank rule: for probability \(p\), sort \(n\) values and select the value at rank \(\lceil np\rceil\). At \(p=0.5\) with five values, this selects the third value.

Time (h)Observed concentrationsSimulated concentrations
210, 12, 14, 16, 188, 10, 12, 14, 16
42, 3, 4, 5, 67, 8, 9, 10, 11

With separate bins at 2 h and 4 h, the observed medians are 14 and 4, and the simulated medians are 12 and 9. The observed-minus-simulated median differences are therefore \(14-12=2\) concentration units at 2 h and \(4-9=-5\) concentration units at 4 h.

Now combine both times in one wide bin. The observed values in sorted order are \(2,3,4,5,6,10,12,14,16,18\). Under the stated nearest-rank rule, the median is the fifth value, 6. The simulated values sort to \(7,8,8,9,10,10,11,12,14,16\), giving a fifth value of 10. The pooled-bin difference is \(6-10=-4\) concentration units. That single summary does not show the positive difference at 2 h and negative difference at 4 h. The changed result is not an arithmetic error: the wide bin has changed the time mixture represented by the quantile.

Assessing and Reporting the Binning Choice

A binning rule should be assessed against both its numerical target and the time structure of the data. Useful checks include:

  • Counts and contributors: report the number of records and, where relevant, distinct subjects in each bin. Look for bins whose count target is met only because a small number of subjects contribute repeated records.
  • Widths and locations: inspect the actual boundaries and widths. A long interval may span a period of rapid concentration change, even if its count is adequate.
  • Endpoint behavior: check the first and last bins, where sparse times often leave a short or underfilled interval. State whether it was merged or left below target.
  • Boundary sensitivity: compare the main VPC with a reasonable alternative binning rule or modest boundary shifts. A conclusion that changes substantially should be described as bin-sensitive.
  • Consistency of summaries: confirm that observed values and every simulated replicate use the same time boundaries and the same quantile definition.

An informative report describes the rule, the target count, the boundary convention, the count and width of each bin, and any exceptions. A graph alone may conceal that one region has narrow bins with many subjects while another has a single broad bin with few contributors. If two plausible binning choices lead to materially different visual conclusions, present that sensitivity rather than selecting the more favorable plot.

Common Pitfalls and Limitations

  • Too few records are treated as a universal threshold. A count that is adequate for one quantile or design may be poor for another. State the rationale for the target and inspect the uncertainty or instability evident in the summaries.
  • More records are assumed to mean more independent information. Repeated measures from the same individuals are correlated. Record counts do not by themselves measure the number of independent subjects supporting a population quantile.
  • Observed and simulated data use separate adaptive boundaries. This changes the time mixture being compared. Determine boundaries once from the design or observed sampling-time structure and apply them consistently.
  • Concentrations determine the boundaries. Choosing intervals to emphasize a feature in the observed results risks a misleading comparison. Base the rule on time and sampling information, not on whether the resulting VPC looks favorable.
  • Meeting the count target is taken as proof of good resolution. A bin can contain many records and still be too wide to represent a meaningful time-specific pattern. Count and width are competing constraints, not substitutes.

Adaptive binning is a compromise, not a remedy for every limitation of a VPC. It cannot create observations in an unobserved time region, make a broad time interval locally precise, or remove bias from a sampling process that does not represent the intended target. If sparse times force very wide bins, the VPC should be interpreted at that coarser temporal scale. The binning choice should make that limitation visible.

Key takeaway: Choose adaptive boundaries using a prespecified rule based on time and sampling information, balance count against width, and apply the same boundaries to observed and simulated concentrations. Then assess whether pooling within each bin changes the quantile pattern relevant to the model check.

Check Your Understanding

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

  1. A count-based rule requires at least 12 records per bin. Two adjacent time groups contain 7 and 6 records. What count criterion do they meet if combined, and what additional feature must be checked before accepting the merged bin?
  2. Why should a simulated replicate not be assigned its own adaptive bin boundaries when it is being compared with observed quantiles?
  3. In a bin combining two time groups, one group contributes 20 records and the other contributes 5. What are their weights in the pooled empirical distribution?
  4. Suppose a bin reaches its record target, but most records come from two subjects with repeated measurements. What diagnostic concern should be reported?

Solutions. (1) The merged count is \(7+6=13\), so it meets the minimum of 12. Check the resulting bin width and whether it combines times over which concentration changes meaningfully; also inspect distinct subject contributions. (2) Separate boundaries can make observed and simulated quantiles summarize different time mixtures, confounding the comparison. Use identical boundaries. (3) The weights are \(20/(20+5)=0.8\) and \(5/(20+5)=0.2\). The pooled empirical distribution gives the first group four times the record weight of the second. (4) Although the record count meets its target, the effective support across individuals may be limited because repeated measurements from two subjects are correlated. Report the distinct-subject count and qualify the apparent support for a population quantile.

Clinical Biostats