Documentation

41.25 Case 6: a prediction-corrected VPC of the final model

A prediction-corrected VPC of the final covariate model

What you will learn

  • State what a visual predictive check compares, and what the simulated intervals mean.
  • Reproduce the observed percentiles and the prediction correction from the stored tables.
  • Count outside-the-interval percentiles against what chance alone would give.
  • Read a single marginal exceedance without over- or under-reacting.

Prerequisites: 41.24 and the evaluation chapters (27 and 28).

The question: does the final covariate model reproduce the distribution of the observed concentrations over time, not just their average?

The evidence: the Chapter 27 bundle primary_pcvpc, run on the model refitted in Chapter 26 (fitted_covariate_model, OFV −1157.8135), with the data of Case 5.

The command

nlmx vpc <run26.ctl> --results-dir <fitted_covariate_model> --samples 300 --seed 27001 \
         --plots --plot-format both --write-sims --x-title "Time after dose (h)" --y-title "Concentration" \
         --output results/primary_pcvpc

The summary header states what was done: 300 simulated replicates of the whole 60-subject study, with the parameters fixed at their estimates; the x axis is TIME; the bins are chosen automatically (one-dimensional k-means with at least 10 observations per bin, at most 20 bins), which here gives one bin per sampling time (eight bins of 60 observations each); percentiles 5, 50 and 95, each with the 95 % interval of the simulated percentiles. The check type is the default, a prediction-corrected VPC.

What is being compared

For each bin, the program computes the 5th, 50th and 95th percentiles of the observed concentrations. It then computes the same three percentiles in each of the 300 simulated studies. Those 300 values per percentile form a distribution, and its 2.5th to 97.5th percentile range is the simulated 95 % interval. If the model is adequate, an observed percentile should fall inside its interval about 95 % of the time.

Because subjects differ in covariates, observations at the same time have different typical predictions, which widens the observed distribution for reasons the model already knows about. The prediction correction removes this:

DV_corrected = lb + (DV − lb) · (PRED_bin − lb) / (PRED − lb), with lb = 0,

where PRED is the observation's population prediction and PRED_bin the median prediction in its bin. The same transformation is applied to the simulated data. A reader can check it on a stored row: for subject 1 at 0.5 h, DV = 0.82218, PRED = 0.85111 and PRED_bin = 0.95409, so DV_corrected = 0.82218 × 0.95409 / 0.85111 = 0.92165, the value in the file vpc_observations.csv.

The table behind the plot

Bin (h) n Observed p5 [sim 95 % CI] Observed p50 [sim 95 % CI] Observed p95 [sim 95 % CI]
0.25 60 0.382 [0.333, 0.430] 0.558 [0.516, 0.591] 0.792 [0.702, 0.880]
0.5 60 0.656 [0.565, 0.744] 1.018 [0.878, 1.016] * 1.351 [1.216, 1.485]
1 60 0.937 [0.854, 1.110] 1.490 [1.333, 1.526] 2.005 [1.831, 2.211]
2 60 1.207 [1.063, 1.333] 1.745 [1.622, 1.856] 2.381 [2.154, 2.663]
4 60 1.144 [1.013, 1.257] 1.522 [1.501, 1.693] 2.134 [1.992, 2.414]
8 60 0.814 [0.683, 0.873] 1.117 [1.041, 1.181] 1.555 [1.404, 1.687]
12 60 0.454 [0.401, 0.560] 0.810 [0.717, 0.842] 1.159 [1.013, 1.273]
24 60 0.085 [0.059, 0.131] 0.256 [0.211, 0.290] 0.487 [0.404, 0.588]

The observed columns are reproducible from the stored per-observation file: taking the corrected values of each bin and computing their 5th, 50th and 95th percentiles gives these 24 numbers exactly.

How to read the result

Count the exceedances against chance. There are 8 × 3 = 24 observed percentiles; with a 95 % interval each, about 24 × 0.05 = 1.2 would fall outside by chance even for a correct model. The summary reports 1 of 24. That is what a correct model produces. (The percentiles are correlated, so the count is a guide rather than a test.)

Look at the one that is outside. It is the median at 0.5 h: observed 1.0185, interval 0.8777 to 1.0162. It exceeds the upper end by 0.0022, or 0.2 % of the value. A reader should neither celebrate nor panic: a one-bin, one-percentile excursion of this size on an early, steep part of the curve is within what the Monte Carlo noise of 300 replicates can do.

Look for patterns, not points. The difference between the observed and the simulated median is +0.008, +0.070, +0.072, +0.010, −0.081, +0.006, +0.032, +0.008 across the eight bins. The observed median is above the model's in the two earliest informative bins and below it at 4 h. A rise faster than modelled and a fall slightly earlier would give that shape, but each difference is inside its own interval (apart from the one above), so this is a question to ask about the absorption phase (is a lag or an absorption model of a different shape worth testing?), not a finding. It would be a finding if it persisted with more subjects or in a stratum.

The tails behave. The 5th and 95th percentile lines run inside their intervals in all eight bins. The observed variability, which depends on OMEGA and the residual error, is neither too wide nor too narrow at any time.

The numerical check

The summary also gives the numerical predictive check for the same run: the share of observations below and above each prediction interval, against the share a correct model gives.

PI Below, observed (expected) Above, observed (expected)
0 % (median) 46.9 % (50) 53.1 % (50)
50 % 25.4 % (25) 27.7 % (25)
90 % 6.0 % (5) 5.2 % (5)
95 % 2.7 % (2.5) 2.1 % (2.5)

Every observed percentage lies within its simulated interval for all eight PI levels. For example at the 90 % PI the observed 29 observations below (6.0 %) lie within the simulated 2.7–7.5 %. The 480 observations' median split of 225 below and 255 above (46.9 % and 53.1 %) is within 44.5–57.1 % and 42.9–55.5 %.

What was kept for later

--write-sims stores the 300 simulated studies (vpc_simulations.csv, about 7 MB), so a reviewer can recompute any interval; vpc_settings.vpc stores the exact settings as a configuration file, so the check can be rerun to the same seed (nlmx vpc -c vpc_settings.vpc --output <new folder>); and checksums.sha256 covers the folder.

The decision

Question Evidence Decision Reversible?
Does the model describe the central tendency and spread over time? 1 of 24 percentiles outside (1.2 expected); NPC inside at all levels yes yes
Is there a reason to change the absorption model? a faint early-high, 4 h-low pattern, each point inside its interval no change; watch in the stratified checks (next page) yes

What this case does not show

A pooled VPC averages over every subject type; a structure that affects one subgroup can leave it unchanged, which the next page demonstrates on the base model. It is also a check of a model on the data it was fitted to. It cannot say how the model predicts a new study. And the simulation holds the parameters fixed at their estimates: it does not include parameter uncertainty (page 41.27).

Review checklist

  • Can you say what the simulated interval is the interval of?
  • Did you count outside percentiles and compare with 5 % of the total?
  • Did you look at the size of each exceedance, and at the pattern across bins?
  • Are the simulations, settings and seed stored with the check?

See the previous page, the next page and the complete case-study reference.