Assignment in a Trial and Treatment Choice in Data
A target trial specifies how eligible participants would be assigned to treatment strategies. In a randomized trial, a random mechanism makes that assignment. In observational data, investigators usually do not observe such a mechanism: they observe which treatment a clinician and patient chose, or which treatment was initiated. Those variables can have the same treatment labels while playing different roles.
Suppose the strategies are \(g_1\) and \(g_0\), defined by operational rules. Let \(Z\) denote assignment in the target trial, with \(Z=1\) assigning \(g_1\) and \(Z=0\) assigning \(g_0\). Let \(A\) denote the treatment choice recorded in observational data, with \(A=1\) and \(A=0\) corresponding to those same strategies. The labels are aligned by definition; the assignment processes are not thereby made equivalent.
The distinction matters even when the recorded treatment is binary. A patient’s prognosis, severity, contraindications, or preferences may influence the observational choice \(A\). In a randomized trial, those factors may be associated with outcomes, but the random assignment \(Z\) is generated independently of them, or independently within randomization strata. Thus, a comparison by \(Z\) and a comparison by \(A\) need not have the same interpretation.
State the Contrast Before Comparing Groups
To specify an observational analog, name both strategies and the rule that distinguishes them. For example, \(A=1\) might mean “initiate treatment X according to rule \(g_1\),” while \(A=0\) means “initiate active comparator Y according to rule \(g_0\).” The comparison is not automatically “ever treated versus never treated,” “any treatment versus none,” or “treatment X versus everyone else.” Those are different contrasts unless the protocol explicitly defines them that way.
Let \(X\) be covariates measured before the treatment choice, and let \(Y\) be the outcome. A crude observed comparison uses the outcome distributions among people with \(A=1\) and \(A=0\). These groups may have different covariate distributions. If the intended comparison concerns the same target population under either strategy, the difference in those distributions is a potential source of bias.
The weights in this expression are the covariate distribution among those who actually received strategy \(a\). If the target is one common population, its covariate distribution—not a different treatment-group distribution for each strategy—is the relevant reference distribution.
Worked Examples
Worked Example: A Crude Comparison Reverses the Within-Stratum Pattern
Suppose \(X\) indicates high baseline risk. Among people choosing \(A=1\), 80% are high risk and 20% are low risk. Among people choosing \(A=0\), 20% are high risk and 80% are low risk. The observed outcome means are:
| Baseline risk | Mean outcome if \(A=1\) | Mean outcome if \(A=0\) |
|---|---|---|
| High | 0.20 | 0.30 |
| Low | 0.05 | 0.10 |
Within each risk stratum, the outcome mean is lower under \(A=1\). But the crude means use different risk mixes:
The crude difference is \(0.17-0.14=0.03\), suggesting a higher mean in the \(A=1\) group. To compare both strategies in a population that is half high risk and half low risk, standardize both means to that same distribution:
The standardized difference is \(0.125-0.20=-0.075\). The reversal occurs because the \(A=1\) group contains many more high-risk people. This calculation illustrates why observed treatment groups are not automatically comparable. Interpreting the standardized difference causally requires additional assumptions, considered below.
Worked Example: Random Allocation Is Not the Same as Observed Choice
A target trial allocates 100 eligible participants equally between strategies \(g_1\) and \(g_0\). Suppose the protocol uses simple randomization, so each participant has probability \(0.5\) of assignment to either strategy. A baseline risk factor may still be unevenly distributed in a particular realized sample. For example, if 30 of the 50 participants assigned \(g_1\) are high risk and 20 of the 50 assigned \(g_0\) are high risk, the realized proportions are \(30/50=0.60\) and \(20/50=0.40\).
That imbalance does not mean the allocation ceased to be randomized: randomization specifies the probability mechanism, not exact balance in every sample. By contrast, suppose observational treatment choice gives high-risk patients a probability \(0.75\) of choosing \(A=1\), and low-risk patients a probability \(0.25\). Then the choice mechanism depends on risk by construction. The value \(A=1\) is an observational analog for assignment to \(g_1\), but it was not generated by the trial’s random mechanism.
The target-trial contrast is therefore stated by assigned group, \(Z=1\) versus \(Z=0\). The observational contrast is stated by recorded choice, \(A=1\) versus \(A=0\), with the strategy definitions matched to the trial. Similar labels do not remove the need to address the different allocation mechanisms.
Worked Example: Defining an Active-Comparator Contrast
Suppose a clinical question compares initiating drug X with initiating drug Y. The observational data also contain 30 people who receive neither drug. The analysis protocol defines \(A=1\) as initiating X and \(A=0\) as initiating Y; the 30 people receiving neither are not part of this particular two-strategy contrast.
Among 60 X initiators, 40 have high baseline risk and 20 have low risk. Their observed mean outcomes are 8 for high risk and 4 for low risk. Among 60 Y initiators, 20 have high risk and 40 have low risk. Their corresponding means are 10 and 6. The crude means are:
The crude difference is \(6.67-7.33\approx-0.67\). If the chosen target population is half high risk and half low risk, the standardized means are \((8+4)/2=6\) for X and \((10+6)/2=8\) for Y, giving a standardized difference of \(-2\). Both calculations use only the X-versus-Y groups. Adding the neither group to \(A=0\) would change the comparator to “Y or neither,” not preserve the original contrast.
When Can the Observational Contrast Identify a Causal Comparison?
An observed treatment-choice contrast is not causal solely because its treatment labels match a trial protocol. A standard identification argument uses potential outcomes \(Y^a\), the outcome that would be observed under strategy \(a\), and requires assumptions. Let \(X\) be measured pre-treatment covariates and consider a discrete \(X\) for clarity.
Consistency rules out a mismatch between the treatment label and the strategy whose outcome is being discussed. Conditional exchangeability says that, within levels of \(X\), treatment choice carries no remaining information about the potential outcome. Positivity requires that each strategy is possible among people with each relevant covariate pattern. These are substantive conditions, not consequences of fitting a regression model.
To derive the result, first average the potential outcome over the target population’s covariate distribution:
Conditional exchangeability gives \(E[Y^a\mid X=x]=E[Y^a\mid A=a,X=x]\). Positivity ensures that this conditional mean is defined from people with \(A=a\) at each target-population \(x\). By consistency, among those people \(Y^a=Y\). Therefore \(E[Y^a\mid A=a,X=x]=E[Y\mid A=a,X=x]\). Substitution yields the stated formula. The weights \(P(X=x)\) are common to both strategies because both are evaluated in the same target population. \(\square\)
For continuous covariates, the sum is replaced by an integral with respect to the target distribution of \(X\), subject to the corresponding conditional means and positivity conditions being well-defined. If exchangeability fails because important determinants of treatment and outcome are unmeasured, this standardization formula does not generally identify \(E[Y^a]\).
Diagnostics, Alternatives, and Limitations
Before interpreting an emulated comparison, check whether treatment coding matches the specified strategies and whether treatment choice varies across clinically relevant covariate patterns. Tabulations of treatment by baseline covariates, estimated choice probabilities, and the covariate distributions in the two groups can reveal sparse or absent overlap. If nearly everyone with a particular covariate profile chooses one strategy, the data provide little direct information about the alternative strategy for that profile.
Common approaches to adjustment include standardization, regression adjustment, and inverse-probability weighting. They differ in how they use covariates and model treatment choice or outcomes, but none makes the observational assignment randomized. Their causal interpretation still depends on an appropriate treatment definition, adequate measured confounders, and positivity. When overlap is poor, estimates may rely heavily on extrapolation or a small subset of the data; changing the target population or treatment contrast should be an explicit scientific decision, not an unnoticed modeling side effect.
A randomized trial and its observational emulation also differ in what their treatment-group labels encode. The trial label \(Z\) records assignment by protocol. The observational label \(A\) records a choice that may reflect prognosis, access, contraindications, and preferences. A mistaken shortcut is to call \(A\) “random assignment” because it was used to form two groups. The correction is to name it as observed treatment choice and state the assumptions needed to interpret its comparison causally.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a randomized target trial, what does \(Z\) represent, and why is it not automatically the same variable as observational \(A\)?
- Why can \(E[Y\mid A=1]-E[Y\mid A=0]\) differ from a comparison standardized to one common covariate distribution?
- State the three assumptions used in the standardization result and explain the role of positivity.
- A study defines its contrast as initiating drug P versus initiating drug Q, but includes non-initiators in the \(A=0\) group. What changed?
Solutions. (1) \(Z\) is assignment generated by the trial’s chance mechanism; \(A\) is the observed treatment choice in the observational data, which may depend on patient characteristics. (2) The crude means weight covariate-specific outcomes by \(P(X\mid A=1)\) and \(P(X\mid A=0)\), whereas standardization uses the same target-population weights \(P(X)\) for both strategies. (3) The assumptions are consistency, conditional exchangeability \(Y^a\perp A\mid X\), and positivity \(P(A=a\mid X=x)>0\) for both strategies at each covariate value represented in the target population. Positivity ensures the observed data contain treatment information for each strategy across that population’s covariate patterns. (4) The comparator changed from drug Q to a mixture of drug Q and non-initiation; it is no longer the specified P-versus-Q contrast.