Tutorials › Marginal Structural Models › Selection Bias from Eligibility and Treatment Classification

Target Trial Emulation · Tutorial 454 of 501

Selection Bias from Eligibility and Treatment Classification

Learn to spot when eligibility or treatment classification uses future information, and understand how that can change the population being compared and distort a causal contrast.

Intermediate 12 min read

What You'll Learn

  • Distinguish eligibility established at time zero from selection based on later events.
  • Explain how conditioning on a post-baseline event can associate treatment with prognosis.
  • Calculate the bias created by selecting different people into treatment groups.
  • Identify why future-defined treatment groups are not baseline treatment assignments.
  • Compare baseline eligibility, landmark designs, and strategy-based approaches to these problems.
  • Use timelines and selection-rate checks to audit an emulated trial.

Why the Timing of Eligibility and Treatment Classification Matters

A target trial needs a clear time zero: eligibility is assessed, treatment strategies are assigned, and follow-up begins at that point. If a study instead decides later who was eligible or which treatment group a person belongs to, inclusion can depend on what happened after follow-up began. The resulting comparison may be between different kinds of people, rather than between treatment strategies in a common population.

This is a selection problem, not merely a matter of imprecise wording. A later event may be caused by treatment, prognosis, or both. Restricting analysis to people who experienced that event—or using it to define their treatment group—can induce an association between treatment and prognosis, even when treatment was initially randomized. The association may distort the outcome comparison.

Definition: Post-baseline selection occurs when inclusion in the analysis, eligibility for the emulated trial, or treatment-group classification depends on information arising after time zero. It can create selection bias when that information is related to treatment and to the outcome, directly or through common causes. It does not automatically create bias in every setting; the consequences depend on how selection relates to treatment and outcomes.

A useful timeline records when each item is known: eligibility criteria, treatment assignment or initiation, selection events, and outcome onset. If eligibility is supposed to be assessed at time zero, it must be based on information available by time zero. If treatment groups are meant to represent baseline assignment, their definitions must not rely on future treatment receipt or future survival.

Conditioning on a Later Eligibility Event

Let \(A\) denote treatment assigned at time zero, \(U\) a prognostic factor, \(Y\) the outcome, and \(S\) inclusion in the analyzed sample. Suppose \(A\) is randomized, \(U\) predicts \(Y\), and both \(A\) and \(U\) affect \(S\). Before selection, randomization makes \(A\) independent of \(U\). Within the selected sample, however, the distribution of \(U\) can differ between treatment groups. In causal-diagram language, conditioning on \(S\), a common effect of \(A\) and \(U\), can open a noncausal path between them.

Worked Example: Eligibility Defined by Survival to Day 30

Suppose treatment \(A\) is randomized at day 0, and \(U\) is a binary baseline risk factor with \(P(U=1)=0.5\). The outcome at day 90 is \(Y=U\), so treatment has no effect on the outcome. Investigators nevertheless restrict the analysis to people alive and eligible at day 30; call this event \(S=1\). Assume the following probabilities of remaining eligible:

Treatment \(A\)Risk factor \(U\)\(P(S=1\mid A,U)\)
000.9
010.5
100.5
110.1

Among selected people with \(A=0\), the probability of \(U=1\) is

$$ P(U=1\mid A=0,S=1) =\frac{0.5(0.5)}{0.5(0.9)+0.5(0.5)} =\frac{0.25}{0.70} =\frac{5}{14}. $$

For \(A=1\), the corresponding probability is

$$ P(U=1\mid A=1,S=1) =\frac{0.5(0.1)}{0.5(0.5)+0.5(0.1)} =\frac{0.05}{0.30} =\frac{1}{6}. $$

Because \(Y=U\), the selected-sample risks are \(5/14\) and \(1/6\). The selected risk difference, treatment 1 minus treatment 0, is

$$ \frac{1}{6}-\frac{5}{14} =\frac{7-15}{42} =-\frac{4}{21} \approx -0.190. $$

This apparent benefit is entirely due to selection: treatment has no effect on \(Y\). Before restriction, randomization gives the same distribution of \(U\) in both arms and the risk difference is zero. The example isolates the mechanism; in practice, survival to day 30 may also affect whether the outcome is defined or observed, which requires careful specification of the target population and outcome.

What the Selected Comparison Estimates

The selection mechanism can be stated precisely using potential outcomes. Let \(Y^a\) be the outcome that would occur under treatment \(a\), and let \(S^a\) indicate whether a person would be selected under treatment \(a\). For this result, assume treatment is randomized at time zero, consistency holds, and \(P(S^a=1)>0\) for \(a=0,1\). Also assume the relevant conditional expectations exist. The observed selected comparison is generally between people with \(S^1=1\) and people with \(S^0=1\), which need not be the same population.

Result: Under those assumptions, the selected mean difference can be decomposed as
$$ E[Y\mid A=1,S=1]-E[Y\mid A=0,S=1] = \underbrace{E[Y^1-Y^0\mid S^0=1]}_{\text{effect in the }S^0=1\text{ population}} + \underbrace{E[Y^1\mid S^1=1]-E[Y^1\mid S^0=1]}_{\text{selection-composition term}}. $$

To verify this, consistency gives \(Y=Y^a\) and \(S=S^a\) among people assigned \(A=a\). Randomization means assignment is independent of the potential outcomes and selection indicators, so conditioning on \(A=a,S=1\) gives the same potential-outcome distribution as conditioning on \(S^a=1\). Thus the left side is \(E[Y^1\mid S^1=1]-E[Y^0\mid S^0=1]\). Add and subtract \(E[Y^1\mid S^0=1]\):

$$ \begin{aligned} E[Y^1\mid S^1=1]-E[Y^0\mid S^0=1] &=\{E[Y^1\mid S^0=1]-E[Y^0\mid S^0=1]\}\\ &\quad+\{E[Y^1\mid S^1=1]-E[Y^1\mid S^0=1]\}. \end{aligned} $$

The first term is an average treatment effect in the population that would be selected under control. The second reflects the change in the composition of the selected population. If \(S^1=S^0\) for every person, the composition term is zero and selection is treatment-invariant. If treatment changes who is selected, the term need not be zero. Randomization alone does not remove it. \(\square\)

This decomposition is not a claim that the first term is always the desired estimand. It makes explicit why a selected comparison may fail to answer the intended question: treatment arms can contribute outcomes from differently selected populations. If selection is based only on a baseline criterion applied consistently before assignment, the problem described here does not arise in the same way.

Treatment Groups Defined Using the Future

A related error is to call people “treated” if they initiate treatment during a future window, then compare them from time zero with everyone who does not. That label was not available at time zero. It can depend on surviving, remaining outcome-free, attending care, or otherwise being observed long enough to initiate. People in the future-defined treated group may therefore have a different opportunity to experience an outcome before classification.

Worked Example: “Initiated Within 14 Days” as a Baseline Group

Consider 100 people eligible at day 0. Investigators label a person treated if they initiate by day 14. Fifty initiate on day 8. Among the other 50, ten experience the outcome before day 14 and cannot initiate afterward; the remaining 40 never initiate. By day 30, ten of the 50 initiators have the outcome, and eight of the 40 other people who remained outcome-free through day 14 have it.

The future-defined treated group has \(10/50=0.20\) outcomes. The group classified as untreated has \(10+8=18\) outcomes among 50 people, or \(18/50=0.36\). The crude difference is \(0.20-0.36=-0.16\), apparently favoring initiation.

This is not a comparison of baseline treatment assignments. To enter the “initiated” group, a person must reach day 8 and initiate; the ten early outcomes can appear only in the group that is later called untreated. This is one route to immortal-time bias, but the broader design warning is that future treatment receipt is not a baseline assignment variable. A valid analysis must specify the strategies and time zero so that follow-up and treatment classification match the question being asked.

Not every future-based classification creates immortal time. For example, classifying people by attendance at a later visit can select on health, access to care, or symptoms even if no event-free interval is mechanically guaranteed. The common issue is that the later information can select a population or define groups based on events after the intended start of follow-up.

Eligibility Rules That Depend on Later Events

Eligibility is often described as a list of clinical criteria, but each criterion also needs a time. A rule such as “no hospitalization in the first week” is not a baseline criterion if the week begins after time zero. Applying it retrospectively removes some people based on their post-baseline course. Similarly, requiring a later test, visit, response, or record can restrict the analysis to people who survived and remained observable until that information was available.

Worked Example: Requiring a Day-30 Assessment

Suppose a registry identifies 200 patients who satisfy the clinical criteria at day 0. The study compares two treatments assigned at day 0, but the analysis includes only patients with a day-30 assessment. If treatment affects follow-up attendance, or if worsening health both affects attendance and predicts the outcome, the day-30 requirement can make treatment groups differ in prognosis.

For illustration, suppose the selected patients’ outcome risks are 0.10 under treatment 1 and 0.20 under treatment 0, while the corresponding risks among those not selected are 0.40 and 0.30. If 80% of treatment-1 patients but 40% of treatment-0 patients are selected, the observed selected comparison is \(0.10-0.20=-0.10\). Yet the full-population risks are \(0.8(0.10)+0.2(0.40)=0.16\) and \(0.4(0.20)+0.6(0.30)=0.26\), giving a difference of \(-0.10\) here as well. This particular set of numbers happens to preserve the difference; that is not guaranteed by the design.

Change only the selected treatment-1 risk to 0.20 and the nonselected treatment-1 risk to 0.40. The selected difference becomes \(0.20-0.20=0\), whereas the full-population treatment-1 risk is \(0.8(0.20)+0.2(0.40)=0.24\), compared with 0.26 under treatment 0: a full-population difference of \(-0.02\). The two contrasts now differ. The calculations show why selection rates and outcome risks in selected and nonselected groups matter; a later assessment requirement cannot be assumed harmless.

A landmark design can sometimes be appropriate if the scientific question is explicitly about people alive and eligible at a later landmark. In that case, the landmark becomes the new time zero, eligibility is assessed there, and follow-up begins there. The resulting estimand concerns that landmark population; it does not recover the effect from the original baseline population. Choosing a landmark simply to avoid early events changes the question rather than making those events disappear.

Audit the Timeline and Compare Alternatives

A practical audit begins by writing down what was known at each decision point. For every eligibility criterion and treatment label, ask whether it could have been determined at the stated time zero without using later records. Then ask whether the event used for selection could be affected by treatment or predict the outcome. These checks do not prove bias, but they identify where the design needs justification.

1
Mark time zero.
Place eligibility assessment, treatment assignment, and the start of outcome follow-up on one timeline. They should refer to the same time point for the intended baseline comparison.
2
Inspect every eligibility condition.
Record when the information becomes available. A criterion first observed after time zero is not a baseline criterion unless the design deliberately uses a later landmark.
3
Inspect each treatment label.
If group membership requires later treatment receipt, adherence, survival, or attendance, it is not a baseline treatment classification. State the strategy and follow-up rules that the label is meant to represent.
4
Check who is selected.
Compare selection proportions by treatment and by important baseline prognostic factors. Large differences are a warning, not a definitive test: similar proportions do not rule out bias, and differing proportions do not alone quantify it.

The main alternative is to define a common baseline-eligible population using information available at time zero, then compare well-defined treatment strategies from that time. For strategies allowing a treatment grace period, the earlier material on cloning and artificial censoring provides approaches that avoid simply assigning people to a baseline group based on eventual treatment receipt. If the question genuinely concerns a later population, use a stated landmark and interpret the result for that population. Adjusting for measured baseline covariates cannot by itself repair a group definition that uses future events; nor does equal selection frequency establish that the selected groups have the same prognosis.

The limitations are important. A timeline audit can reveal a mismatch but cannot, by itself, recover outcomes that were never observed or establish which causal effect is identified. Selection may be harmless under particular conditions—for example, if it is unrelated to treatment and potential outcomes in the relevant way—but those conditions require substantive justification. Diagnostics should therefore accompany, not replace, a defensible protocol.

Common mistake: “Everyone in the treated group eventually received treatment, so it is reasonable to call them treated from day 0.” The correction is that eventual receipt is future information, not a day-0 assignment. People must remain eligible and observable long enough to receive treatment, and events before receipt may be allocated differently across groups. Define baseline strategies at time zero, or state a later landmark and its target population.

Check Your Understanding

Answer each question, then check the solutions below.

  1. A study excludes anyone hospitalized during the first 14 days after treatment assignment. Is this a baseline eligibility rule? What should be checked?
  2. Why can a day-30 visit requirement create selection bias even if treatment was randomized at day 0?
  3. In the decomposition above, what does the composition term represent, and when is it zero?
  4. A study compares people who initiated within a 10-day grace period with those who did not, counting outcomes from day 0. Identify the design concern and one suitable change in the question or design.

Solutions. (1) No. The hospitalization occurs after assignment, so exclusion conditions on a post-baseline event. Check whether treatment or prognosis affects hospitalization and whether hospitalization predicts the outcome; specify a baseline population or a justified later landmark instead. (2) Attendance may be affected by treatment and by health factors that also predict the outcome. Conditioning on attendance can therefore change the prognostic composition of the randomized groups. Randomization does not ensure comparability after this restriction. (3) It is the difference in mean \(Y^1\) between the population selected under treatment 1 and the population selected under treatment 0. It is zero if the selection indicators agree person by person, \(S^1=S^0\), or more generally if those two conditional means happen to be equal. (4) Future initiation defines group membership, and early outcomes may occur only in the noninitiator group, so the comparison does not represent baseline assignment and may have immortal-time bias. Define strategies from day 0 and use an appropriate grace-period design, or make a later landmark the time zero and interpret the estimand for people eligible then.

Clinical Biostats