Documentation

11.1 Why quality control precedes modeling

A pharmacometric model can converge on the wrong data. Optimization answers, “Which parameters best fit the supplied records under this model?” It does not answer, “Were doses assigned to the right subject?” or “Did a blank DV become a fitted zero?” Dataset QC must therefore precede estimation, covariate selection, VPC, simulation and exposure-response work.

What makes pharmacometric data unusual

One table mixes several kinds of row. An observation row contributes a DV to the likelihood. A dose row changes the compartment state. A reset can clear state. An excluded sample remains part of the timeline but does not contribute a DV. Two rows with the same TIME can have different meaning according to file order.

This is why ordinary spreadsheet checks are insufficient. A column can be entirely numeric while the event story is impossible—for example, ADDL=2 with II=0, or MDV=0 on a dose record.

The cost of late discovery

If an error is found after modeling, every dependent artifact may need regeneration: exploratory plots, NCA, initial estimates, fits, diagnostics, covariate models, VPCs, simulations, reports and decisions. Early QC is both safer and faster.

Run QC again whenever the data change. A “small” correction to one subject can alter observation counts, covariate medians, categorical reference levels, BLQ fractions, dose summaries and model likelihood.

A beginner's sequence

  1. Freeze the received dataset and calculate its hash.
  2. Write down expected columns, units, codes and protocol ranges.
  3. Run qc-data with a reviewed .qcd file.
  4. Fix failures before interpreting warnings.
  5. Verify every correction against an authoritative source.
  6. Save a new dataset version and rerun all checks.
  7. Archive the final QC bundle beside the model inputs.

Common mistakes

  • Starting model fitting because the CSV opens in Excel.
  • Assuming convergence proves event records are correct.
  • Running QC only once, before later data corrections.
  • Treating warnings as inconveniences rather than questions.

Checklist

  • Identify the authoritative dataset and its version.
  • Record expected event, unit and coding conventions.
  • Complete QC before downstream analyses.
  • Rerun QC after every data change.

Further reading

See the governing dataset questions, event classification and what QC cannot prove.