Why Harmonization Comes Before External Prediction
A frozen NLME model can only be applied meaningfully when its inputs represent the same quantities, scales, and definitions used when the model was fitted. An external record labelled “dose,” “time,” “concentration,” or “body weight” is not automatically interchangeable with the corresponding model input. For example, a prescribed dose may differ from the dose actually administered; a sample time may be recorded relative to enrollment rather than the first dose; and two assays may report concentrations on different analytical scales.
Harmonization is the documented process of mapping external records to the input definitions and units expected by the frozen model. It addresses data compatibility, not model selection, refitting, or evaluation of predictive performance. The model and its covariate relationships remain fixed. Any mapping must be defined without using external outcomes to improve agreement between observed and predicted concentrations; otherwise, the external data no longer provide an independent assessment.
Conditions for a Defensible Mapping
Before converting records, establish what the model expects. The model specification should identify the dose representation, time origin, time units, assay scale, covariate definitions, reference values, and whether a covariate is baseline or time-varying. These are part of the frozen model's input contract, not choices to make after inspecting external prediction errors.
A mapping is appropriate only if the external record contains enough information to recover the model-scale quantity. The source and target quantities must refer to the same underlying event or characteristic. An exact unit conversion is different from an assumption about clinical meaning: converting pounds to kilograms is exact, while treating a prescribed dose as an administered dose is not justified unless administration records support it.
- Dose: identify the administered amount, route, formulation, dose interval, and infusion duration where relevant. Distinguish an amount per administration from a rate or a weight-normalized dose.
- Time: identify the time zone, timestamp conventions, and reference event. Preserve the timing of each dose relative to each observation, including times before or after a dose.
- Concentration: use exact unit conversions when the measurement scale is otherwise comparable. A change in assay method may require a validated bridge; it is not generally an exact unit conversion.
- Covariates: check definitions, units, assessment times, and derivations. A baseline value, a value measured at each visit, and a value calculated from a different clinical definition are not automatically equivalent.
The mapping also needs operational checks. Confirm that converted values are finite, have plausible units and ranges, and preserve the original record identifiers. Check for duplicate or conflicting dose events, missing time references, unexpected negative elapsed times, and covariate values that cannot be generated using the model's specified definition. These checks can reveal data errors; they do not establish that two clinical measurements are equivalent.
Worked Mappings
Worked Example: Converting a Recorded Dose Amount
Suppose a frozen model expects the amount administered at each oral dose in milligrams. In a hypothetical external record, a patient is documented as receiving 0.20 mg/kg, and the administration record gives a body weight of 62.0 kg at that dosing occasion. Assume the record confirms that the stated amount was administered, not merely prescribed.
The model-scale dose amount is the weight-normalized dose multiplied by the weight used for that administration:
The units cancel to milligrams, which matches the model input. The mapping is justified here because the dose is documented as administered, the amount is explicitly per kilogram, and the relevant dosing weight is available. If the model instead expects dose in milligrams per kilogram, the appropriate input remains \(0.20\ \text{mg/kg}\); converting it to 12.4 mg would then change the input definition rather than harmonize it.
If the only available record were a prescription for 12.4 mg with no evidence of administration, the amount could not be assumed to have entered the patient. The record would need an administration status or another prespecified rule for handling unverified doses.
Worked Example: Aligning Time Origins
A hypothetical model uses elapsed time in hours since the first administered dose. An external database stores dose and sample timestamps as elapsed days since enrollment. The first administered dose occurred 0.25 days after enrollment; a sample was recorded at 1.75 days after enrollment.
For this record, subtract the enrollment-relative time of the first dose and convert days to hours:
The sample is therefore represented at 36.0 hours after the first dose under the stated time convention. The subtraction is valid only if both timestamps use the same enrollment origin and the same time basis. If timestamps instead use local clock time, daylight-saving changes or inconsistent time zones could create offsets; the raw timestamps and time-zone metadata must be reconciled before computing elapsed time.
As a check, apply the same origin conversion to every dose and sample event for the subject, then verify their chronological order and dose-to-sample intervals against the source records. If a sample appears before the first dose, that may be a valid predose observation; it must not be shifted to a positive time merely to avoid a negative elapsed time.
Worked Example: Converting a Covariate and Checking an Assay Scale
A hypothetical frozen model defines baseline body weight in kilograms and uses weight relative to 70 kg. The external baseline record gives 154 lb. Using the exact conversion \(1\ \text{lb}=0.45359237\ \text{kg}\):
The model's weight ratio is therefore \(69.8532/70=0.998\) to three significant figures. This conversion is defensible if the external variable is the same baseline body-weight measure required by the model. If the model specifies a different assessment time or a particular weight definition, the number of decimal places in the conversion does not resolve that definitional mismatch.
Suppose the external concentrations are also reported by a different assay method. Converting concentration units, such as ng/mL to mg/L, is an exact scale conversion because \(1\ \text{ng/mL}=0.001\ \text{mg/L}\). But if the two assay methods have different calibration or bias, that unit identity does not make their reported results equivalent. A validated method-comparison study or other suitable bridge is needed to support a conversion between assay scales. Without it, the assay difference must be treated as unresolved rather than tuned away using validation predictions.
Why the Mapping Rules Matter
The logic of harmonization is that the model's input labels stand for defined quantities, not merely columns with familiar names. A conversion preserves the intended quantity only when its assumptions hold. For an exact unit conversion, the physical quantity is unchanged while its numerical representation changes. For example, multiplying pounds by \(0.45359237\ \text{kg/lb}\) changes the numeric scale but not the weight being represented. By contrast, replacing a prescribed dose with an assumed administered dose changes the event represented unless administration is verified.
The same distinction applies to time. If the model uses time since a reference event at \(t_0\), elapsed time is \(t-t_0\). Applying the same origin to a dose at \(t_d\) and a sample at \(t_s\) preserves the interval between them:
Thus, shifting both events by the same origin does not alter their relative timing. Applying different origins to dose and sample records would not have this property and could distort the schedule represented to the model. This is why time origins, time zones, and the rules for deriving timestamps must be checked together.
A practical workflow makes these decisions traceable. First, write down the model's expected definitions and units. Next, create mappings from source fields to those definitions, recording formulas and assumptions. Apply the mappings without reference to external concentration residuals or other prediction outcomes. Finally, run data-level checks and retain a record of unmappable observations and the reasons for them.
For each field, record the model's quantity, unit, reference time, and clinical definition.
Confirm its provenance, meaning, units, assessment time, and whether it records an observed event or an intended one.
Use an exact conversion where possible; use a non-exact calibration only when independent bridging evidence supports it.
Check chronology, units, ranges, missingness, and conflicts. Preserve source values and document exclusions or unresolved differences.
Alternatives, Diagnostics, and Limitations
| Approach | When it is appropriate | Main concern |
|---|---|---|
| Exact conversion and definition matching | Units differ but the underlying quantity and definition are the same. | Incorrect metadata or the wrong assessment time can invalidate an otherwise correct formula. |
| External calibration or bridging | Methods differ, and independent evidence supports a relationship between their scales. | Uncertainty in the bridge and differences across ranges or populations may remain. |
| Leave unresolved or exclude under a prespecified rule | Required meaning or metadata is unavailable, or no defensible conversion exists. | Exclusions may change which patients or observations the external validation represents. |
| Change or refit the model | The scientific target or model specification genuinely needs to change. | This is not simple harmonization of a frozen model and must be distinguished from external validation. |
Some warning signs can be detected before any predictions are generated: doses with missing administration status, impossible or inconsistent event ordering, unit labels that vary within a site, implausible converted values, and covariates whose derivation cannot be reproduced. Compare source and transformed fields, summarize missingness and ranges, and inspect a sample of records against source documentation. These checks identify implementation and data-definition problems; they cannot prove assay equivalence or recover an unknown administered dose.
Harmonization has limits. A valid unit conversion cannot correct measurement error, a covariate-definition mismatch, or a different clinical population. A calibration bridge may be uncertain or may not apply across the full concentration range. If external data lack the information required for a mapping, the correct response is to state that limitation and follow a prespecified handling rule, not to infer a convenient conversion from prediction performance. Harmonization should also preserve the intended external prediction target: exclusions or restrictions need to be reported because they can narrow the population represented.
Common Pitfall
A tempting but incorrect argument is: “The external predictions look too high, so subtract a constant from the recorded concentrations until they align.” This uses validation outcomes to alter the data mapping and can make the validation appear better by construction. It also confuses a possible assay-scale difference with a known conversion. The correction is to define assay mapping from independent assay documentation or bridge data before evaluating predictions. If no defensible mapping exists, keep the difference explicit and interpret the validation as limited or not directly comparable.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A model expects dose amounts in milligrams. An external file records 0.15 mg/kg and a verified administration weight of 80 kg. What dose amount maps to the model input?
- A sample is recorded 2.0 days after enrollment, while the first dose was at 0.5 days after enrollment. The model uses hours since first dose. What is the sample time on the model scale?
- Why does converting ng/mL to mg/L not, by itself, harmonize results from two different assay methods?
- What should be done if a covariate has the same name in both data sources but was measured at different times?
- Why is adjusting an assay conversion after inspecting external prediction errors a validation concern?
Solutions. (1) \(0.15\ \text{mg/kg}\times80\ \text{kg}=12.0\ \text{mg}\), provided the dose was actually administered and those units and weight are applicable. (2) \((2.0-0.5)\times24=36.0\) hours after the first dose, assuming a common enrollment origin. (3) The unit conversion changes representation, not assay calibration or bias; independent bridging evidence is needed to relate distinct methods. (4) Check the model's required assessment time and use a matching measurement or classify the value as unmappable under a prespecified rule. (5) It uses validation outcomes to tune the input mapping, weakening the independence of the validation.