Why Baseline Covariates Need Harmonization
An external-control analysis compares people observed under different data-collection systems. A variable called “baseline age,” “renal function,” or “blood pressure” may not represent the same quantity in each dataset. The unit may differ, the measurement may refer to a different date, or the rule for combining repeated measurements may not match. Treating such fields as equivalent can create apparent differences between cohorts that are artifacts of definition rather than differences in the patients.
Harmonization is the prespecified process of translating source-specific measurements into a common representation while preserving the intended clinical meaning. It is not simply giving columns the same name. Nor does it establish that trial participants and external controls are otherwise comparable. It provides a defensible basis for describing and analyzing baseline covariates consistently.
A useful specification states, for every covariate: (1) the clinical construct; (2) the source fields and operational definition; (3) the unit and any conversion; (4) the reference period relative to time zero; (5) the rule for choosing or summarizing repeated measurements; and (6) how the resulting value will be represented and checked. These decisions should be made before comparing cohort values, not selected afterward to make distributions look similar.
Definitions, Units, and Timing
Start with the construct rather than the available column name. For example, “age at treatment initiation” is not automatically the same as age at database enrollment. The dates used to calculate it must correspond to the same intended time point. Similarly, a laboratory result expressed in different units may be directly convertible, while a result obtained by a different assay or under a different operational definition may not be made comparable by arithmetic alone.
For timing, define time zero as the cohort-specific index date already specified for the comparison. A baseline measurement should be selected from a prespecified period before that date, and the same rule should apply in both datasets. One possible rule is to use the most recent eligible measurement in the interval from 30 days before time zero up to, but not including, time zero. Other windows may be appropriate, but their clinical and data-availability rationale should be stated. A result recorded after time zero must not be used as if it were a baseline value.
When there are multiple measurements in the permitted window, “use the nearest result,” “use the mean,” and “use the first result” define different covariates. A common label does not reconcile those choices. The rule should also specify what happens when there is no eligible measurement; the later handling of missing covariates is a separate issue, but the absence of a value must not be silently converted into a clinical category.
Worked Example: Harmonizing Age at Time Zero
Suppose a trial records age in completed years on the randomization date, while an external dataset contains date of birth and an index date. A trial participant is 53 years old at randomization. For an external patient, date of birth is 1970-06-15 and the index date is 2024-03-01. Define age as completed years at time zero.
The external patient's calendar-year difference is \(2024-1970=54\). Because March 1 occurs before the June 15 birthday, one year is subtracted:
Thus both records are represented as 53 completed years. The calculation matches the trial's stated definition, assuming its recorded age is also age on randomization rather than age at screening or enrollment. If the trial field refers to a different date, the apparent agreement of the values would not establish harmonization; the trial definition would first need to be clarified or reconstructed.
For measurements recorded on different scales, use a documented conversion that maps the source value to a common unit. More generally, if a source reports \(Y_s\) and the common-scale quantity is \(Z\), a conversion may be written \(Z=h_s(Y_s)\), where \(h_s\) is the source-specific transformation. The transformation should be supported by the measurement definition, not chosen because it produces similar cohort summaries.
Worked Example: Converting a Laboratory Unit
Assume a baseline creatinine result is defined comparably in two hypothetical datasets, but the trial reports milligrams per deciliter and the external dataset reports micromoles per liter. Use the conversion \(1\text{ mg/dL}=88.4\text{ μmol/L}\). The trial value is 1.20 mg/dL and the external value is 106 μmol/L. Both results were measured within the prespecified baseline window.
Convert the external value to the trial's unit by dividing by 88.4:
To three significant figures, the external result is 1.20 mg/dL, matching the trial value at the reported precision. This calculation harmonizes units only under the stated assumption that the measurements represent the same defined analyte and comparable measurement quantity. If assay or construct differences remain, numerical conversion alone does not resolve them.
A Common Selection Rule for Repeated Measurements
A unit conversion cannot correct a mismatch in when measurements are taken. The date window and selection rule together define which observation becomes the baseline covariate. The following example uses a 30-day pre-index window and the most recent eligible measurement. The interval is \([-30,0)\) days relative to time zero: day \(-30\) is included and day \(0\) is excluded.
Worked Example: Aligning the Look-Back Window
In a hypothetical comparison, baseline laboratory values are to be selected as the most recent measurement in \([-30,0)\) days. The trial patient's measurements occurred on days \(-40\) and \(-12\), with values 1.08 and 1.15 mg/dL. The external patient's measurements occurred on days \(-84\), \(-18\), and \(+3\), with values 1.10, 1.21, and 1.17 mg/dL.
For the trial patient, day \(-40\) is outside the window and day \(-12\) is inside it. The selected baseline value is therefore 1.15 mg/dL. For the external patient, day \(-84\) is outside the window, day \(-18\) is inside it, and day \(+3\) is after time zero and ineligible. The selected value is 1.21 mg/dL.
The resulting covariates are 1.15 mg/dL and 1.21 mg/dL, each defined by the same window and nearest-prior rule. Using the external value on day \(+3\) would violate the baseline timing rule; using the day \(-84\) value because it is the only earlier-than-30-day value would also violate it. If a patient has no measurement in the common window, the rule yields no eligible baseline measurement rather than authorizing an unplanned substitution from a different period.
Why the Harmonization Rule Matters
The basic justification is that source-specific representations should map to the same target quantity under the stated definitions. Suppose a common continuous quantity \(Z\) is recorded in source \(s\) as \(Y_s=a_s+b_sZ\), where \(a_s\) and \(b_s\) are known, \(b_s\ne 0\), and the measurement definitions otherwise agree. Applying the inverse transformation gives:
Thus, under those assumptions, both sources are placed on the same scale. The argument depends on a known, valid conversion and a shared underlying construct. If one dataset records a single clinic measurement while another records a different summary, or if the fields refer to different clinical concepts, there may be no such inverse transformation. Matching the names or units then does not make the values equal in meaning.
Harmonized covariates can matter directly to external-control analyses. For example, if a baseline characteristic is used to describe differences between cohorts or in a model, inconsistent definitions can distort that comparison. In Bayesian analyses that borrow information from external controls, a covariate mismatch can also make the datasets appear more or less compatible than they are. Correct harmonization is necessary for meaningful comparison, but it does not prove exchangeability, remove confounding, or guarantee that borrowing is appropriate.
Diagnostics, Alternatives, and Limits
Diagnostics should test whether the proposed common representation is credible, not merely whether a computation ran. Review source-specific definitions and units; check dates relative to time zero; verify that the chosen repeated-measurement rule was applied consistently; and inspect converted values for implausible magnitudes or unit errors. Compare distributions by source after harmonization, including ranges, quantiles, and plots where appropriate. Large differences may reflect real population differences, remaining measurement incompatibility, data-processing errors, or a combination. Similar distributions do not prove that definitions match.
Several approaches are available when exact alignment is not possible. A direct transformation is appropriate when the construct is shared and the conversion is known, as with compatible units. A common coarser categorization may be defensible if both sources support the same clinically meaningful categories, though it discards information. Separate source-specific variables may be more honest than pretending that non-equivalent measurements are one variable; however, this does not itself solve comparability problems. If a source lacks the information needed to construct the target definition, the limitation should be recorded and the intended analysis reconsidered rather than filling the gap with an unsupported assumption.
A common mistake is to reason, “Both columns are called baseline blood pressure, so I can compare them directly.” The correction is to ask whether the source fields use the same measurement definition, units, time reference, and repeated-measurement rule. If not, specify and justify a harmonization method, or acknowledge that the values are not directly comparable. Harmonization is a measurement-definition task; it is not a substitute for later decisions about covariate selection, missing data, or adjustment.
State what clinical quantity the covariate is intended to represent and at what baseline time.
Specify fields, units, transformations, reference windows, and repeated-measurement rules for each dataset.
Verify dates, units, plausible values, and source-specific distributions; document unresolved incompatibilities.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A trial measures a variable in kilograms and an external dataset records the same construct in pounds. What must be established before conversion, and what is the conversion if 1 kg = 2.20462 lb?
- Time zero is day 0 and the common measurement window is \([-30,0)\). A patient's results are on days \(-31\), \(-8\), and \(+1\). Which result is eligible under a nearest-prior rule?
- One dataset records the most recent value in the 30 days before time zero; another uses the mean of all values in the prior year. Is a common variable name enough to harmonize them? Explain.
- After a valid unit conversion, the external cohort has a higher median covariate value than the trial cohort. Does that prove the conversion failed or that the cohorts are exchangeable? Explain.
Solutions. (1) First establish that both fields measure the same construct under sufficiently comparable definitions; then convert by dividing pounds by 2.20462 to obtain kilograms (or multiply kilograms by 2.20462 to obtain pounds). (2) Day \(-8\) is eligible and is the selected value; day \(-31\) is outside the window and day \(+1\) is after time zero. (3) No. The reference periods and summary rules differ, so the resulting values are not defined identically; a common rule must be constructed where possible, or the incompatibility acknowledged. (4) No. A higher median may reflect a genuine cohort difference or a remaining problem. Check definitions and implementation; similarity or difference alone establishes neither successful harmonization nor exchangeability.