Tutorials › Population Pharmacokinetics › Choosing Time Bins for a VPC

Predictive Checks · Tutorial 373 of 599

Choosing Time Bins for a VPC

Learn how to choose and defend VPC time bins by balancing the stability of within-bin quantiles against the ability to resolve meaningful changes over time.

Intermediate 11 min read

What You'll Learn

  • Define how a VPC summarizes observed and simulated concentrations within time bins.
  • Compare equal-width, equal-count, and clinically defined binning.
  • Explain why small bin counts make empirical quantiles less stable.
  • Evaluate the trade-off between quantile stability and time resolution.
  • Recognize diagnostics and pitfalls that can make a binned VPC misleading.
  • Choose bins that are interpretable and appropriate to the predictive-check target.

Why Time Bins Matter in a VPC

A visual predictive check (VPC) compares observed data with replicate data simulated from a fitted population pharmacokinetic model. To display the comparison over time, the data are commonly grouped into time bins, and statistics such as the median or selected percentiles are calculated within each bin. The bin boundaries are therefore part of the display’s design: they determine which observations contribute to each summary and how finely the check can show a time-dependent pattern.

A bin that contains few observations may produce a noisy empirical quantile. A bin that spans a long interval may be more stable but can conceal a change that occurs within it. Bin choice is a balance, not a search for a universally optimal number of bins. The bins should support the predictive-check target and make clinically relevant patterns visible without presenting unstable summaries as precise evidence.

Definition: A time bin is an interval of sampling time used to group observed records and corresponding simulated records for a VPC summary. For a specified quantile, the observed quantile is calculated from the observed records in that bin. The same quantile is calculated for each simulated replicate in that bin; the distribution of replicate quantiles provides the simulation reference for the observed summary.

The VPC’s interpretation depends on the target and simulation design, as described in the earlier material on predictive checks. Here the focus is narrower: how the time intervals used for the summaries affect their stability and temporal resolution. The count in a bin is usually a count of records, not necessarily a count of distinct individuals. Repeated records from the same individual are not independent, so simple calculations based on independent observations are useful for understanding the direction of the effect, but not as exact uncertainty estimates for every VPC.

Three Ways to Define Time Bins

With equal-width bins, the time range is divided into intervals of the same duration. For example, a 24-hour range could be split into four 6-hour intervals. This approach gives a consistent time scale and makes it straightforward to compare how the summary changes from one interval to the next. Its weakness is that sampling may be uneven over time: some bins can contain many records while others contain very few.

With equal-count bins, boundaries are chosen so that each bin contains roughly the same number of observed records. This can make the number of records contributing to each quantile more even. The resulting bins generally have different widths: dense sampling times lead to narrow bins, and sparse times lead to wide bins. A wide bin can average over a substantial change in concentration.

With clinically defined bins, boundaries are chosen to separate time periods that have meaning for the intended interpretation—for example, an early post-dose period, a later distribution period, and a terminal period. The durations and record counts can vary. This approach can make the summaries easier to interpret, but a clinically meaningful boundary does not guarantee that the corresponding quantile is well supported by the available data.

ApproachPrimary advantagePrimary riskUseful question
Equal widthConsistent time resolutionUneven counts and unstable summaries in sparse periodsDoes the summary change steadily across time?
Equal countMore even numbers of records per binWide bins can obscure changes; boundaries may be hard to interpretCan summaries be made more stable while retaining useful resolution?
Clinically definedIntervals align with meaningful periodsUnequal or small counts; boundaries may miss a pattern within a periodDoes the model reproduce summaries in clinically relevant phases?

For any approach, specify a consistent rule for assigning observations on a boundary—for example, include the left endpoint and exclude the right endpoint, except for the final interval. If many records share a sampling time, an equal-count rule may not be able to divide them exactly across bins; keeping tied times together may be preferable to creating misleadingly fine boundaries.

Why Counts Affect Quantile Stability

The effect of bin size on a quantile can be explained using a standard large-sample approximation. Suppose a bin contains \(m\) independent observations from a continuous distribution with density \(f\) at its \(p\)-quantile \(q_p\), and assume \(f(q_p)>0\). Under these conditions, the empirical \(p\)-quantile has approximate standard error

$$ SE(\hat{q}_p) \approx \sqrt{\frac{p(1-p)}{m f(q_p)^2}}. $$

This expression is not a VPC-specific confidence interval. It provides a justification for two practical points: increasing the number of records tends to stabilize a quantile, and quantiles are less stable where the distribution has low density near the target quantile. For clustered pharmacokinetic records, the independence assumption is generally not exact. Repeated observations from the same individual can reduce the effective information relative to what the raw record count suggests.

To see the count effect, take \(p=0.5\), so \(p(1-p)=0.25\), and suppose the density near the median is \(0.10\) concentration units per mg/L. With \(m=18\),

$$ SE(\hat{q}_{0.5}) \approx \sqrt{\frac{0.25}{18(0.10)^2}} = \sqrt{1.3889} \approx 1.179\ \text{mg/L}. $$

With \(m=108\) and the same hypothetical density, the approximation is

$$ SE(\hat{q}_{0.5}) \approx \sqrt{\frac{0.25}{108(0.10)^2}} = \sqrt{0.2315} \approx 0.481\ \text{mg/L}. $$

The second bin has six times as many records, and the approximate standard error is smaller by a factor of \(\sqrt{6}\). The calculation illustrates why sparse bins can yield visibly jagged empirical quantiles. It does not establish that any particular bin count is adequate: the density, dependence among records, sampling design, and purpose of the display also matter.

Worked Example: Equal-Width Bins With Uneven Sampling

Hypothetical data. A VPC covers 0 to 24 hours after a dose. Four equal-width bins are chosen: 0–6, 6–12, 12–18, and 18–24 hours. The observed record counts are 18, 72, 108, and 22, respectively. Each bin is 6 hours wide, and the total is \(18+72+108+22=220\) records.

Suppose the intended display includes the median, and the distribution near the median is similar across these bins. The first bin’s count is 18, while the third bin’s count is 108. Using the approximation above with \(f(q_{0.5})=0.10\) per mg/L gives an approximate median standard error of 1.179 mg/L for the first bin and 0.481 mg/L for the third. Thus, equal widths preserve comparable time intervals, but the early and late median summaries are expected to be less stable than the summary in the well-populated third bin.

Interpretation. If the first bin’s observed median appears to depart from the simulation reference, that departure should be read with the small record count in mind. It could reflect a real mismatch, sampling variability, or both. Equal-width bins have not failed; rather, this design makes the sparse support visible and warns against treating all plotted quantiles as equally precise. The approximation is only illustrative because records may be clustered within individuals.

Worked Example: Equal-Count Bins and Lost Time Resolution

Hypothetical data. Suppose 160 observed records occur from 0 to 24 hours, with sampling especially dense during the first 2 hours. Four equal-count bins are formed from observed sampling times, with 40 records in each. After assigning tied times consistently, the resulting boundaries are approximately 0, 0.5, 2, 8, and 24 hours.

The bin widths are \(0.5-0=0.5\), \(2-0.5=1.5\), \(8-2=6\), and \(24-8=16\) hours. The record counts are balanced, but the last bin spans 16 hours. If the median concentration falls quickly between 2 and 5 hours and then declines more slowly, a single median for 2–8 hours combines both patterns. It can therefore conceal where the change occurs.

Interpretation. Equal-count binning has addressed one issue—uneven record counts—but has not made the time resolution uniform. The boundary at 8 hours may also be a poor match to a clinically important transition at, say, 4 hours. The design is defensible if the priority is to stabilize summaries across the full time range and the wide-bin averaging is acceptable; it is less suitable when the location of a rapid change is central to the question.

Worked Example: Clinically Defined Periods

Hypothetical data. A team defines four periods before examining the VPC: 0–1, 1–4, 4–12, and 12–24 hours. The record counts are 26, 74, 68, and 32, totaling \(26+74+68+32=200\). The observed medians are 8.0, 4.0, 1.5, and 0.45 mg/L. The median of the replicate medians in the simulation reference is 7.5, 3.8, 1.6, and 0.50 mg/L.

For each period, subtract the simulated-reference median from the observed median. The differences are \(8.0-7.5=0.50\), \(4.0-3.8=0.20\), \(1.5-1.6=-0.10\), and \(0.45-0.50=-0.05\) mg/L. These differences describe the direction and size of the observed median’s displacement from the center of the simulated medians in each period; they are not p-values or formal tests.

Interpretation. The selected periods are easy to relate to the intended clinical phases, but their widths and counts differ. The 0–1-hour summary has only 26 records, so its apparent 0.50 mg/L displacement deserves more caution than the difference alone might suggest. The later periods also average across longer intervals. Clinical meaning helps organize interpretation; it does not remove the need to inspect the time span and data support of each bin.

Choosing and Checking a Binning Strategy

A practical choice begins with the question the VPC is meant to address. If the aim is to inspect a pattern at a consistent temporal scale, equal-width bins are a natural starting point, provided sparse bins are identified. If the main concern is that some within-bin summaries are based on too few records, equal-count bins may help, provided their widths do not blur important time variation. If the interpretation depends on prespecified clinical phases, clinically defined bins can make the comparison more direct, provided each period has adequate support.

The following checks help reveal when a binning choice is undermining the display:

  • Report bin boundaries and record counts. A VPC without this information makes it difficult to judge either the time resolution or the support for a quantile.
  • Look for very small bins and abrupt count changes. Large fluctuations in observed summaries may be caused by unstable empirical quantiles, especially where counts are low.
  • Check whether a bin spans a plausible rapid change. A smooth-looking summary over a broad interval may simply average over distinct time patterns.
  • Review tied times and boundary assignments. Confirm that observations at a boundary are assigned consistently and that a mass of records at one time has not been split in a way that complicates interpretation.
  • Compare the binning choice with the target. A design chosen to show broad clinical phases may not be appropriate for detecting a short-lived temporal departure.

It is often useful to examine whether the substantive reading changes under a reasonable alternative binning scheme. This is a sensitivity check, not permission to select whichever display looks most favorable. Bin definitions should be defensible in relation to the purpose of the predictive check, and any additional display should be interpreted alongside its own counts and time widths.

Common Pitfall and Limitations

A common mistake is to assume that equal-count bins automatically make every VPC summary reliable. Equal counts balance the number of records, but do not guarantee independence, sufficient information in the tails, or suitable time resolution. For example, 40 records in a bin do not represent 40 independent individuals if many records come from a small number of participants. Nor does a count of 40 make a 16-hour bin informative about the precise timing of a change within that interval.

The correction is to consider both the record support and the time width, alongside the sampling design and the quantile being plotted. Tail quantiles can be especially unstable in small bins because relatively few observations determine the empirical tail. Simulation-based reference envelopes also have finite Monte Carlo precision, so a visually irregular reference should not automatically be attributed to binning alone.

No binning scheme can recover time detail that the observed sampling design does not support. Conversely, making bins narrower than the available data support can create unstable summaries rather than genuine resolution. The goal is a transparent, interpretable compromise. State the boundaries, counts, and rationale, and do not over-interpret a local feature that depends strongly on one sparsely populated bin.

Key takeaway: Equal-width bins prioritize consistent time resolution, equal-count bins prioritize more even record counts, and clinically defined bins prioritize interpretable periods. None is universally best. Choose boundaries to match the predictive-check question, then assess both quantile stability and the amount of time each summary represents.

Check Your Understanding

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

  1. A 12-hour equal-width VPC uses three 4-hour bins with counts 12, 60, and 30. Which bin is most likely to have the least stable empirical median, and why?
  2. Equal-count bins each contain 50 records, but one spans 30 minutes and another spans 10 hours. What trade-off does this show?
  3. Why can 40 records in a bin provide less information than 40 independent individuals?
  4. A clinically defined bin spans a period in which concentration is expected to change rapidly. What interpretive limitation should be considered?
  5. What information should accompany a VPC so a reader can assess the consequences of the chosen bins?

Solutions. (1) The bin with 12 records is most likely to have the least stable median, because small samples generally produce more variable empirical quantiles. (2) Equal counts can improve balance in record numbers while producing unequal time resolution; a wide bin may average over changes that a narrow bin can distinguish. (3) If multiple records come from the same individual, the observations are clustered rather than independent, so the raw record count can overstate the amount of independent information. (4) The bin may combine meaningfully different concentration levels and conceal when the rapid change occurs; the summary describes the whole interval rather than a specific time within it. (5) Report the time boundaries, record counts, and rationale for the binning, and interpret the summaries in light of the widths and sampling design.

Clinical Biostats