Tutorials › Pharmacometric Workflows and Reproducible Modeling › Unit Mismatches Behind Implausible Estimates

Debugging Model Failures · Tutorial 146 of 399

Unit Mismatches Behind Implausible Estimates

Learn a practical, equation-based workflow for tracing suspicious estimates and convergence failures to unit mismatches before changing the model or optimizer.

Advanced 11 min read

What You'll Learn

  • Check dimensional consistency in pharmacometric model equations.
  • Trace time-unit mismatches to apparent clearance and rate-constant errors.
  • Diagnose concentration-unit mismatches that distort volume estimates.
  • Distinguish unit correction from parameter rescaling or reparameterization.
  • Use predictions and unit ledgers to verify a corrected model.

Why Units Belong in Estimation Diagnostics

An optimizer can converge to a numerical solution even when the model inputs use incompatible units. That solution may have a finite objective value and apparently precise parameter estimates, yet describe the wrong physical system. Other mismatches distort the objective enough to cause unstable steps or convergence failure. In both cases, a useful first question is not simply whether an estimate is “too large,” but whether the quantities in the model equation can be combined with the units they actually carry.

This matters because pharmacometric models combine measurements and parameters on several scales: dose, concentration, time, clearance, volume, and rates. Unit mistakes can masquerade as an unusual biological result or as an optimization problem. A dimensional audit is therefore a model-debugging step, not a cosmetic data-cleaning step.

Definition: A model is dimensionally consistent when each equation combines quantities with compatible physical dimensions, and both sides of an equation have the same dimension. A unit mismatch occurs when a value is used as though it were expressed in a different unit from the one it actually has, or when a parameter definition and the model equation use different unit conventions.

Consider a hypothetical one-compartment model after an intravenous bolus:

$$ C(t)=\frac{D}{V}\exp\left(-\frac{CL}{V}t\right) $$

Here \(D\) is dose, \(V\) is volume of distribution, \(CL\) is clearance, \(t\) is elapsed time, and \(C(t)\) is concentration. If dose is in mg, volume in L, clearance in L/h, and time in h, then \(D/V\) is in mg/L and \((CL/V)t\) is dimensionless: \((\mathrm{L/h})/\mathrm{L}\) multiplied by h. The exponent must be dimensionless because an exponential function takes a dimensionless argument. This check is simple, but it can expose mismatches before any optimizer is run.

A Unit Audit Before Interpreting Estimates

A useful audit records the units at the points where values enter the model and where parameters are defined. Do not rely on column names alone: a column called “TIME” might contain minutes, hours, or elapsed seconds. Check the data dictionary, import transformations, model code, and reporting definitions against one another.

QuantityExample unitDimensional check
Dose \(D\)mgWith \(V\) in L, \(D/V\) is mg/L
Concentration \(C\)mg/LMust match the unit expected by the observation model
Volume \(V\)LWith \(CL\) in L/h, \(CL/V\) is h\(^{-1}\)
Clearance \(CL\)L/hMust use the same time basis as \(t\)
Elapsed time \(t\)hMust match the time basis implied by rate parameters

The table is a starting point, not a substitute for checking transformations. A model can accept a numeric value without knowing whether it means mg/L or ng/mL. The analyst must establish that meaning and verify that every conversion is applied exactly once.

Worked Example: Time Recorded in Minutes, Model Expecting Hours

Suppose hypothetical concentrations follow the one-compartment model with \(D=100\) mg, \(V=20\) L, and \(CL=4\) L/h. Then \(D/V=5\) mg/L and \(CL/V=0.2\) h\(^{-1}\). At 1 h, the model predicts:

$$ C(1)=5\exp(-0.2\times1)=5\exp(-0.2)=4.094\ \mathrm{mg/L}. $$

Now suppose the observation time is stored as 60, because it is in minutes, but the model treats the number 60 as hours. To reproduce the one-hour decay from the numerical time value 60, the exponent coefficient must be \(0.2/60=0.003333\) per minute. A fit using that numerical time column can therefore return an apparent rate constant of \(0.003333\) per time unit. If that estimate is then reported as \(0.003333\) h\(^{-1}\), it is mislabelled: the coefficient associated with a minute-valued input is per minute.

The correct conversion is \(60\) min \(=1\) h, so the prediction is \(5\exp[-0.2(60/60)]=4.094\) mg/L. Equivalently, \(0.003333\) min\(^{-1}\times60=0.2000\) h\(^{-1}\). With \(V=20\) L, the corresponding clearance is \(CL=0.2000\times20=4.000\) L/h. The factor-of-60 discrepancy is explained by the time basis, not by a biological change in clearance.

This example also shows why the estimate alone may not reveal the error. If the model uses the numerical times consistently, it may reproduce the observed concentration-time shape while the reported rate constant or clearance has the wrong unit interpretation. Check both the predictions and the units assigned to the fitted parameter.

Derived Quantities Must Use the Same Unit Basis

A parameter may be supplied in a valid unit while a derived quantity is computed as if it had another. For the model above, the elimination rate constant \(k\) is defined by \(k=CL/V\). Its unit follows from the units of clearance and volume; it is not an independent label that can be chosen after the calculation. If \(CL\) is in L/day and \(V\) is in L, then \(k\) is in day\(^{-1}\). It must be converted before being combined with time in hours.

Worked Example: Daily Clearance Used With Hourly Time

Suppose a hypothetical subject has \(CL=96\) L/day and \(V=20\) L. The rate calculated directly is \(96/20=4.8\) day\(^{-1}\), not \(4.8\) h\(^{-1}\). The equivalent clearance is \(96/24=4.000\) L/h, giving \(k=4/20=0.2000\) h\(^{-1}\).

At \(t=1\) h, the correct fraction remaining is \(\exp(-0.2000\times1)=0.8187\). If the numerical value 4.8 is incorrectly treated as an hourly rate, the fraction becomes \(\exp(-4.8\times1)=0.008230\). The discrepancy is large because the rate was used on the wrong time basis. The proper hourly calculation can also be written \(\exp[-4.8(1/24)]=0.8187\), with time converted to days.

Before interpreting a surprising derived rate, check how it was formed and what units its inputs carried. A conversion applied to clearance but not to the time variable—or applied twice—can create the same kind of inconsistency.

Conversions Preserve the Model When Applied Consistently

Changing units does not change the physical model. It changes the numerical values used to represent the same quantities. This gives a direct check for a proposed correction: predictions at the same physical dose and elapsed time should agree before and after a consistent unit conversion.

Justification: If time is represented in minutes rather than hours, then \(t_{\mathrm{min}}=60t_{\mathrm{h}}\). A rate represented per minute must satisfy \(k_{\mathrm{min}}=k_{\mathrm{h}}/60\). Consequently, \(k_{\mathrm{min}}t_{\mathrm{min}}=(k_{\mathrm{h}}/60)(60t_{\mathrm{h}})=k_{\mathrm{h}}t_{\mathrm{h}}\), so the exponential prediction is unchanged.

The same logic applies to concentration units. A concentration of 5 mg/L is 5000 ng/mL. If the observations are converted from mg/L to ng/mL, the model predictions and any residual-error scale must also be expressed on the corresponding scale. Converting only one side of the observation comparison creates a mismatch even if the structural model is otherwise correct.

Worked Example: Concentration Recorded in Nanograms per Millilitre

A hypothetical bolus dose is \(D=100\) mg, and the true initial concentration is \(5\) mg/L. Under \(C(0)=D/V\), the volume is \(V=100/5=20\) L. The same concentration expressed in another unit is \(5\) mg/L \(=5000\) ng/mL, because \(1\) mg/L equals \(1000\) ng/mL.

If a data file contains the numeric value 5000 in ng/mL but the model treats it as 5000 mg/L, the volume calculated from the initial concentration becomes \(100/5000=0.02000\) L. That is 1000 times smaller than the correct value. The error is not evidence for an implausibly small volume; it is the consequence of interpreting ng/mL as mg/L.

With a consistent conversion, use \(5000\) ng/mL or \(5\) mg/L throughout the observation comparison. If retaining mg/L for the model, convert the recorded concentration to \(5000/1000=5\) mg/L before fitting. A corrected fit should then be assessed in the declared concentration units.

Practical Diagnostics and Failure Modes

A unit mismatch can produce different symptoms depending on where it occurs. A time conversion error often changes rate constants and clearance estimates by a fixed conversion factor. A concentration-scale error can move the estimated volume or residual-error scale. A mismatched covariate unit can distort a covariate effect, especially when the model uses a slope per unit of that covariate. A derived quantity can also be wrong even when the fitted primary parameters and predictions appear reasonable.

Use these checks when estimates are implausible or estimation fails:

  • Write a unit ledger. Record the unit of every input, parameter, derived quantity, and prediction, including units after any import or preprocessing step.
  • Check every equation. Verify that additive terms have compatible units and that exponential arguments are dimensionless.
  • Recompute one prediction by hand. Choose a simple observation time or an initial concentration and calculate it using explicitly converted values.
  • Compare physical predictions before and after conversion. A consistent change of units should preserve predictions when the physical conditions are unchanged.
  • Inspect reported parameter definitions. A value such as \(0.2\) is not interpretable without its unit and the definition of the parameter.

A common mistake is to treat a numerically extreme estimate as an optimization failure and immediately change starting values or bounds. That reasoning can miss a deterministic unit error. First verify the inputs and model definitions; only then investigate issues such as scaling, curvature, weak identification, or boundary behavior. Conversely, not every extreme estimate proves a unit mismatch. If the units are coherent, the model may still be weakly identified, misspecified, or poorly supported by the data.

The main alternative to correcting units is numerical rescaling or reparameterization. Those can make an estimation problem easier to compute, but they do not repair a model in which minutes are interpreted as hours or concentrations are compared on different scales. Unit conversion establishes physical meaning; parameter scaling changes numerical coordinates. Keeping those tasks separate prevents a computational adjustment from concealing a scientific inconsistency.

1
Trace the quantity.
Start from the raw data or parameter definition and note its unit before and after each transformation.
2
Check the model equation.
Confirm that each computed quantity has the required unit and that every exponential argument is dimensionless.
3
Apply one explicit conversion.
Convert the input or the parameter definition to a single consistent unit system; avoid duplicate conversions.
4
Verify predictions and reporting.
Recalculate a prediction and confirm that estimates, derived quantities, and reported units all use the corrected convention.

A unit audit has limits. It cannot establish that the structural model is appropriate, identify an unsupported parameter, or guarantee successful estimation. It can, however, rule out a class of avoidable errors and make subsequent diagnostics interpretable. Keep the unit convention explicit in data preparation, model code, and result tables so that the same ambiguity does not recur.

Key takeaway: An estimate is meaningful only together with its definition and units. Check the units of inputs, parameters, and derived quantities as one connected system before attributing implausible values or convergence problems to the optimizer.

Check Your Understanding

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

  1. A rate constant is \(0.10\) h\(^{-1}\). What is its value in day\(^{-1}\), and why?
  2. A clearance is \(48\) L/day and volume is \(12\) L. Find the rate constant in h\(^{-1}\).
  3. A hypothetical concentration is \(2.4\) mg/L. Express it in ng/mL.
  4. Why does changing the time unit from hours to minutes not change a correctly calculated exponential prediction?

Solutions. (1) \(0.10\times24=2.400\) day\(^{-1}\), because one day contains 24 hours, so the numerical rate per day is 24 times the numerical rate per hour. (2) Convert clearance first: \(48/24=2.000\) L/h. Then \(k=CL/V=2/12=0.1667\) h\(^{-1}\). (3) Since \(1\) mg/L \(=1000\) ng/mL, \(2.4\times1000=2400\) ng/mL. (4) For the same elapsed time, the numerical time in minutes is 60 times the numerical time in hours, while a rate per minute is \(1/60\) of the numerical rate per hour. Their product, the exponential argument, is therefore unchanged.

Clinical Biostats