Why Diagnose Treatment Measurement?
Causal analyses rely on a well-defined treatment, but the treatment in a data set may be a record of what was assigned, prescribed, received, or remembered rather than an error-free measure of what occurred. A dose may be rounded, a treatment status may be entered incorrectly, or the recording process may change between clinics. These problems can make the measured treatment differ from the treatment relevant to the causal question.
Diagnosis asks how the recorded treatment relates to a credible measure of the treatment of interest. It does not, by itself, correct the data or identify a causal effect. The aim is to characterize the likely error mechanism, assess whether it varies across people or settings, and make clear what evidence supports that assessment.
The distinction between \(A\) and \(A^*\) is substantive, not merely notational. For example, “prescribed dose” and “dose taken” are different treatment definitions. A mismatch between those definitions is not automatically measurement error: it may instead mean the recorded variable does not represent the treatment the analysis intends to study. Diagnosis should therefore begin by stating what treatment is relevant, over what time period, and what the available record actually measures.
Patterns of Error and What They Mean
A useful first distinction is between random variation and systematic error. These are descriptions of patterns, not guarantees about the cause of a discrepancy. A record can contain both.
| Pattern | Diagnostic description | Example |
|---|---|---|
| Random variation | Repeated measurements differ without a consistent direction, within the limits of the measurement process. | Two dose readings differ slightly because of instrument variability. |
| Systematic error | Measurements tend to be shifted, scaled, rounded, or misclassified in a consistent way. | A device consistently records doses above the true dose, or one site often codes exposure as absent. |
| Differential error | The measurement process or error pattern differs across a relevant group, time, or setting. | One clinic has more missing treatment entries or uses a different rounding rule. |
For a continuous treatment, a simple reference model is \(A^*=A+U\), where \(U\) is the measurement error. Calling this “classical” error requires specific assumptions, commonly that the error has mean zero and is independent of the true treatment and relevant characteristics. Those assumptions should not be inferred just because two measurements differ. A nonzero average discrepancy suggests a possible offset; discrepancies that grow with dose suggest a possible scale problem or changing precision. For binary treatments, error is instead summarized by the ways true treated and untreated statuses are recorded.
A diagnostic comparison needs a reference. A validation measure is often treated as the best available measure of \(A\), but it may itself be imperfect. Its timing, definition, and method of ascertainment must be compatible with the treatment of interest. If the reference measures a different treatment window, apparent disagreement can reflect a mismatch in definitions rather than faulty recording.
Replicate Measures: Agreement and Drift
When two or more measurements are available for the same person or treatment episode, compare them as paired observations. For two continuous measurements \(A_1^*\) and \(A_2^*\), define the paired difference \(D=A_2^*-A_1^*\). The mean of the differences describes average directional change between measurement occasions; the spread describes how much individual differences vary. Neither quantity alone establishes which measurement is closer to the treatment of interest.
A short derivation clarifies the interpretation. Suppose both measurements equal the same underlying treatment \(A\) plus occasion-specific errors: \(A_1^*=A+U_1\) and \(A_2^*=A+U_2\). Then
The common underlying treatment cancels only if it is unchanged between occasions and both measures refer to the same treatment definition. If the errors have means \(E(U_1)=\mu_1\) and \(E(U_2)=\mu_2\), then \(E(D)=\mu_2-\mu_1\). Thus a nonzero mean difference indicates a directional difference between occasions, but does not reveal which occasion is accurate. If the errors are independent with variances \(\sigma_1^2\) and \(\sigma_2^2\), then \(\operatorname{Var}(D)=\sigma_1^2+\sigma_2^2\). Without independence, the variance also depends on their covariance. In particular, similar replicate values can result from shared errors, not necessarily from accurate measurement.
Worked Example: Comparing Replicate Dose Records
Suppose, hypothetically, that five patients have two records of the same daily dose, in milligrams per day, made on occasions when the intended dose did not change. The first records are 18, 20, 20, 22, and 25; the second records are 19, 20, 23, 21, and 27. Calculate paired differences as second minus first.
The differences are \(1, 0, 3, -1,\) and \(2\) mg/day. Their mean is
The mean difference is positive: in this small set, the second record is higher by an average of 1.00 mg/day. To describe the spread, the deviations from the mean are \(0,-1,2,-2,1\), whose squared values sum to 10. The sample standard deviation is
This comparison flags both a possible upward occasion difference and appreciable person-to-person variation in the paired differences. Five pairs do not establish a stable recording bias, and without an independent reference they cannot show which record is closer to the actual dose. If the dose changed between occasions, the differences would also include real treatment changes, so the assumption of an unchanged dose would fail.
With replicate binary measures, a cross-tabulation shows how often the records agree and in which direction they disagree. Agreement is a reproducibility measure: it describes whether the same method gives the same classification again. It is not an accuracy measure unless at least one measurement is compared with a credible reference. Replicates are most informative when their errors are not simply shared—for example, when they are collected independently and the recording process has not been copied from the first entry.
Validation Comparisons for Binary Treatment
For a binary treatment, suppose a validation sample has both a routine record \(A^*\) and a reference classification \(A\). The reference must define the relevant treatment and time window. The comparison can be summarized by a \(2\times2\) table. Sensitivity is the proportion of reference-treated people recorded as treated; specificity is the proportion of reference-untreated people recorded as untreated. These are descriptive properties of the measurement process in the validation sample, not causal effect estimates.
Worked Example: Summarizing a Validation Sample
In a hypothetical validation sample of 100 people, the reference classifies 40 as treated and 60 as untreated. The routine record identifies 34 of the 40 reference-treated people as treated, and it records 8 of the 60 reference-untreated people as treated. The full comparison is:
| Reference treated | Reference untreated | Total | |
|---|---|---|---|
| Routine record: treated | 34 | 8 | 42 |
| Routine record: untreated | 6 | 52 | 58 |
| Total | 40 | 60 | 100 |
Sensitivity is \(34/40=0.850\), or 85.0%. In this validation sample, 85.0% of people classified as treated by the reference were recorded as treated in the routine data. Specificity is \(52/60=0.8667\), or 86.7%. Thus 86.7% of those classified as untreated by the reference were recorded as untreated. The routine record labels 42 of 100 people treated, whereas the reference labels 40; that small difference in totals does not mean the records agree for every person. There are 6 false negatives and 8 false positives relative to the reference.
These summaries apply to this sample and reference definition. If the validation sample was selected in a way that over-represents particular treatment groups or settings, the overall percentages may not describe the full study population. The table diagnoses disagreement; it does not provide an effect correction.
Also inspect whether discrepancies differ across relevant groups, such as sites, calendar periods, or treatment levels. For example, a site-specific comparison can reveal a data-entry rule that is invisible in a pooled table. Such stratification is diagnostic: it asks whether measurement performance changes across groups, rather than asserting that a difference is causal. Small validation samples can produce unstable subgroup summaries, so counts and uncertainty should be considered alongside percentages.
Heaping and Substantive Checks
Heaping occurs when recorded continuous values accumulate at preferred numbers, such as multiples of five or ten, rather than being spread as expected from the treatment process. It can arise from rounding, limited instrument precision, recall, or a data-entry convention. A frequency table, histogram, or count of values at preferred digits can reveal the pattern. The key question is whether those values are plausible features of treatment itself or artifacts of measurement.
Worked Example: Checking for Dose Heaping
Suppose, hypothetically, a clinic records daily doses in whole milligrams. Among 100 routine records, 74 are multiples of 10 mg. In a separate set of 100 source-verified administration records from the same treatment protocol, 18 are multiples of 10 mg. The multiples-of-10 proportions are
so the routine records have a higher proportion at multiples of 10 by \(0.74-0.18=0.56\), or 56 percentage points. This is evidence of an unusual concentration in the routine records relative to the chosen comparison. It is not proof that every multiple-of-10 value is rounded or wrong. The treatment protocol might genuinely prescribe such doses, or the two sets might differ in patient mix or dose range. The next diagnostic step is to check the protocol, recording instructions, and comparability of the records.
Substantive knowledge gives these numerical checks meaning. Ask what values the treatment protocol permits, how doses are administered, whether treatment can change during the recorded interval, and who enters the data. A value outside the protocol’s plausible range may signal a unit conversion or data-entry problem, but it could also reflect an exceptional clinical event. Preserve the distinction between an observed anomaly and a confirmed error.
A Practical Diagnostic Sequence
Specify whether it is assignment, prescription, receipt, adherence, dose, or another treatment feature, and state the relevant time period.
Record how \(A^*\) was obtained, who recorded it, when it was recorded, and what the reference measure captures.
Look for implausible values, heaping, inconsistent units, repeatability, directional paired differences, and variation across occasions.
When both routine and reference measures exist, tabulate disagreements and summarize their pattern overall and across relevant groups.
Describe what the diagnostics suggest, what assumptions remain unverified, and whether the available evidence is sufficient to characterize error.
Common Mistakes and Why Diagnosis Matters
- Treating agreement as accuracy. Two records can agree because they share a source or systematic error. Agreement establishes reproducibility only relative to the measurement process being repeated.
- Calling every discrepancy random. A consistent upward shift, site-specific coding rule, or concentration at rounded values may indicate systematic error. Inspect direction and context, not just the amount of disagreement.
- Assuming the reference is perfect. A validation measure can be mistimed, incomplete, or based on a different treatment definition. Describe why it is credible and acknowledge remaining uncertainty.
- Confusing a protocol feature with measurement error. Doses at multiples of ten may be genuine if the protocol uses those increments. Compare observed patterns with how treatment is actually assigned and delivered.
- Turning a diagnostic statistic into a causal conclusion. Sensitivity, specificity, replicate differences, and heaping summaries describe measurement. None alone establishes the direction or size of bias in a causal effect.
Treatment measurement affects what exposure groups the analysis is comparing. If errors vary by site, time, or participant characteristics, the measured treatment may not represent the same underlying treatment consistently across the study. Good diagnosis therefore informs whether a measurement model is plausible and what additional validation data are needed. It does not remove uncertainty: the conclusions should remain proportional to the quality and scope of the diagnostic evidence.
Check Your Understanding
Use these questions to test whether you can distinguish the evidence each diagnostic provides.
- Two repeated dose records agree exactly for nearly every person. What does this establish, and what does it not establish about accuracy?
- For paired measurements, the mean of second-minus-first differences is positive. What does that suggest, and why can it not identify which measurement is correct?
- In a validation table, what does sensitivity describe? What does specificity describe?
- A dose histogram has a large spike at multiples of five. Give two possible explanations and one substantive check that could help distinguish them.
- Why might a validation comparison from one clinic fail to characterize treatment measurement in every clinic in a multicenter study?