Documentation

14.23 Units, dose factors, rounding, and numerical stability

NCA formulas are simple enough that unit errors can survive every calculation. nlmx records unit labels and applies a configured dose factor, but it does not infer arbitrary conversions from text such as mg, ng/mL, or µg/L. The analyst must make the numerical inputs coherent.

Dimensional checks

If concentration is in ng/mL and time is in hours, AUC is ng·h/mL. Dividing a dose recorded in mg directly by that number does not automatically yield L/h. A convenient reconciliation is:

1 mg = 1,000,000 ng
1 L  = 1,000 mL

Thus a numerical factor may be needed so the effective dose and exposure share mass and volume scales. Document the factor beside the source units, desired output units, and a hand-worked example. Apply it exactly once; preconverting the data and also setting a dose factor produces a double conversion.

Parameter dimensions provide useful tests:

Parameter Expected dimension
AUC concentration × time
AUMC concentration × time²
lambda_z 1 / time
half-life, MRT time
clearance volume / time
volume volume

Rounding and comparison

Keep full precision through calculations and round only presentation tables. Recomputing AUCinf from a displayed three-decimal lambda_z may not reproduce a value calculated from the internal slope. When validating software, compare unrounded machine-readable outputs using absolute and relative tolerances, then separately test formatting.

Log-trapezoid calculations need stable behavior when concentrations are equal or nonpositive. nlmx falls back to a linear segment when the logarithmic formula is undefined or effectively degenerate. Terminal regression accepts only positive concentrations because logarithms of zero and negative values are undefined. Very large time origins can reduce regression precision; using times relative to dose also makes interpretation clearer.

Duplicate nominal times are summarized according to the configured duplicate rule—mean by default—before integration. A reference program using first, last, maximum, or error behavior may differ before any formula is applied.

Common mistakes

  • Assuming unit labels perform conversion.
  • Applying the dose factor twice.
  • Validating against rounded report values.
  • Sending zero concentrations into logarithmic regression.

Checklist

  • Write a unit equation for every derived parameter.
  • Verify the effective dose after conversion.
  • Retain full precision in machine-readable outputs.
  • Align duplicate and degenerate-segment rules.
  • Use explicit absolute and relative validation tolerances.

Further reading

Review clearance and volume, logarithmic integration, and reference-software validation.