Tutorials › Causal Inference › Diagnosing Positivity Across Treatment Histories

Marginal Structural Models · Tutorial 743 of 972

Diagnosing Positivity Across Treatment Histories

Use treatment-history frequencies and conditional treatment probabilities to locate potential positivity problems and judge what the observed data can support.

Advanced 9 min read

What You'll Learn

  • State longitudinal positivity as a condition on treatment probabilities given past histories.
  • Explain why marginal treatment frequencies can conceal conditional support problems.
  • Use history-specific counts and conditional proportions to flag sparse treatment options.
  • Distinguish sample zeros from structural zeros using study design and clinical context.
  • Relate a positivity violation to the particular target contrast being estimated.
  • Recognize the limits of empirical diagnostics in finite samples.

Why Diagnose Positivity Across Time?

In a longitudinal study, a treatment can be common overall but rarely used for people with a particular covariate and treatment history. That distinction matters: a marginal treatment percentage can look reassuring even when the data contain little information about a treatment choice at a specific visit. A history may also be absent altogether. If the treatment contrast of interest requires a treatment option that is impossible for people in a relevant history, the observed data cannot identify that contrast without additional assumptions or a change in the target question.

Positivity diagnostics therefore ask more than whether both treatments appear in the full data set. They examine the options available at each visit, conditional on the histories that precede that visit. Counts and conditional proportions help identify where support may be weak. They do not, by themselves, determine whether an observed zero is a genuine design or clinical constraint, or merely a chance result in a finite sample.

Positivity as a History-Specific Condition

For a study with visits \(t=0,\ldots,K\), let \(L_t\) denote the measured covariates available before treatment \(A_t\) at visit \(t\). Write the observed history just before that treatment as \(H_t=(L_0,A_0,L_1,A_1,\ldots,A_{t-1},L_t)\). For simplicity, suppose treatment is discrete. A treatment history is a particular sequence of treatment values, such as \(A_0=1,A_1=0\). A covariate-treatment history also specifies the covariates observed along the way.

Definition: Sequential positivity requires that, at each visit, every treatment value required by the target contrast has positive conditional probability given each relevant history in the target population: $$ P(A_t=a\mid H_t=h)>0. $$ The condition applies to histories for which the target contrast requires treatment \(a\), not automatically to every imaginable history or treatment value.

For example, comparing a regime that assigns treatment at both visits with one that assigns no treatment at either visit requires support for each required treatment choice at the histories those regimes can encounter. The condition concerns treatment options within history strata; it is not enough that treated and untreated people exist somewhere in the sample. The earlier material on marginal structural models establishes why inverse-probability weighting uses these conditional treatment probabilities: a probability of zero leaves no observed individuals to represent that treatment choice within the corresponding history.

The relevant support is tied to the estimand and target population. A contrast need not require a treatment choice that it never assigns. Conversely, if a proposed regime requires a treatment that is unavailable in some target-population stratum, simply observing that the treatment is common elsewhere does not resolve the problem.

What Frequencies Can Reveal

A useful first step is to tabulate, at each visit, the number of people in important histories and the number receiving each treatment within those histories. For discrete treatments, the empirical conditional probability is the count receiving a treatment divided by the number at risk of receiving treatment in that history. At visit \(t\), for history \(h\) and treatment \(a\), this estimate is

$$ \widehat P(A_t=a\mid H_t=h) = \frac{\#\{i:H_{it}=h,\ A_{it}=a\}} {\#\{i:H_{it}=h\}}. $$

A zero numerator flags a possible support problem; a very small numerator flags limited information even when the empirical probability is not zero. The denominator matters too. A proportion based on two people is much less informative than the same proportion based on two hundred. Counts should be shown alongside proportions rather than hidden behind a single summary.

Marginal treatment frequencies can conceal both problems. For example, treatment may be common overall because it is given often to low-risk patients, while nearly all high-risk patients receive no treatment. Likewise, an apparently well-populated treatment sequence may be concentrated in a few covariate patterns. Diagnostics should therefore proceed from broad summaries to clinically meaningful, history-specific stratification. The histories need not be cross-tabulated at an impossibly fine level; the aim is to identify relevant strata where treatment options appear limited.

Worked Example: A Conditional Gap Hidden by the Marginal Rate

Suppose a hypothetical cohort has 200 people and a binary treatment at baseline, \(A_0\). There are 120 people classified as lower severity and 80 as higher severity. Among the lower-severity group, 72 receive treatment; among the higher-severity group, 16 receive it. What do the marginal and conditional frequencies say?

The overall treated count is \(72+16=88\), so the marginal treatment proportion is $$ \frac{88}{200}=0.440. $$ Thus, 44.0% of the cohort receives treatment. This figure alone does not show how treatment is distributed across severity.

Within lower severity, the treated proportion is $$ \widehat P(A_0=1\mid \text{lower severity}) = \frac{72}{120}=0.600, $$ and the untreated proportion is \(48/120=0.400\). Within higher severity, the treated proportion is $$ \widehat P(A_0=1\mid \text{higher severity}) = \frac{16}{80}=0.200, $$ and the untreated proportion is \(64/80=0.800\).

Both treatment choices occur in each severity group, so these counts do not show an empirical zero at baseline. They do show that treatment is much less frequent among higher-severity patients. A 44.0% marginal rate would miss that imbalance in support. These data alone do not establish positivity for every more detailed history, and they do not show whether the 20.0% treatment rate is adequate for a particular analysis. They identify a stratum that deserves closer examination.

History Counts Across Visits

At later visits, the history includes earlier treatment and covariate values. A frequency table should therefore distinguish, for example, people with \(A_0=1\) and severe \(L_1\) from people with \(A_0=0\) and severe \(L_1\). Combining them may conceal different treatment probabilities at visit 1. Counts of complete treatment sequences are also useful: they show how many people actually followed each sequence. But sequence counts alone are not enough, because the same treatment sequence may be common in one covariate history and absent in another.

A practical diagnostic can be organized in stages. First, summarize the frequency of each treatment at each visit. Next, tabulate treatment options within key baseline covariates and prior treatment histories. Then inspect the resulting denominators, treatment-specific counts, and conditional proportions, paying particular attention to histories relevant to the target regimes. Finally, investigate apparent zeros using substantive knowledge of eligibility, clinical practice, and study design. This is a diagnostic workflow, not a mechanical cutoff rule.

Worked Example: A Zero in a Small History

At visit 1 in a hypothetical study, a history defined by prior treatment \(A_0=1\) and severe covariate status at visit 1 occurs for 4 people. None receives \(A_1=1\); all 4 receive \(A_1=0\). In a broader group of 100 people with severe status, 30 receive \(A_1=1\). Is the four-person history evidence of a structural zero?

For the specific history, the empirical probability is $$ \widehat P(A_1=1\mid A_0=1,\ L_1=\text{severe}) = \frac{0}{4}=0. $$ The broader group has a treatment proportion of \(30/100=0.300\), but that number cannot substitute for the history-specific probability: the broad group combines people with different prior treatment histories.

The zero count is a warning that the specific history has little observed support. It is not, by itself, proof that treatment is impossible. To see why a zero can occur by chance, suppose for illustration that the true probability of treatment in this history were 0.200 and that the four treatment assignments were independent with that probability. The probability of observing no treated people would be $$ (1-0.200)^4=0.8^4=0.4096. $$ A zero among four people would therefore not be surprising under that illustrative probability. The independence and common-probability calculation is only an illustration, not a model fitted to these data.

The appropriate conclusion is that the observed sample provides very limited information about treatment at this history. Whether the underlying probability is positive must be assessed using the study process and broader clinical knowledge, not inferred from this small sample alone. A zero in four observations is not equivalent to a protocol rule that prohibits treatment.

Sparse Histories and Structural Zeros

A sparse history has few observed people, or very few people receiving one of the treatment options, but the option may still be possible in the target population. A structural zero occurs when a treatment option is genuinely unavailable for a history in the target population—for example, a protocol excludes a treatment for people with a specified contraindication. In a finite sample, both situations may appear as a count of zero. Their implications differ: a sparse history signals imprecision and fragile estimation; a structural zero means the required conditional positivity condition fails for that treatment choice.

An empirical zero is a property of the observed sample. A structural zero is a claim about the data-generating process or treatment policy. Evidence relevant to that claim includes explicit eligibility rules, treatment protocols, contraindications, and whether the option could realistically have been chosen in that setting. A treatment count of zero does not establish impossibility, and a positive count does not guarantee that the probability is large enough for stable estimation.

Worked Example: A Protocol-Defined Structural Zero

Consider a hypothetical two-visit study of a medication. At baseline, 50 people have a documented contraindication. The protocol states that the medication must not be given to anyone with this contraindication. All 50 receive \(A_0=0\). Suppose the target contrast is assignment to medication at baseline versus no medication for the entire study population.

Within the contraindicated stratum, the observed conditional frequency is $$ \widehat P(A_0=1\mid \text{contraindication}) = \frac{0}{50}=0. $$ Here the protocol supplies information beyond the sample count: medication is not merely unobserved by chance; it is prohibited for this stratum. If the target contrast requires assigning \(A_0=1\) to these people, the required treatment option has probability zero there. The positivity condition for that contrast fails in this part of the target population.

The conclusion is not that all treatment effects are unidentifiable. A contrast restricted to people without the contraindication might be supported, if both treatment choices are possible in that restricted target population. Alternatively, the target intervention could be defined to respect the protocol. Those are different target questions. The original all-population contrast cannot be justified by pointing to treated people without the contraindication; their treatment experience does not provide observed support for treating the contraindicated stratum.

A Short Justification: Why a Zero Matters

The basic issue can be seen directly from conditional weighting. For a binary treatment and a history \(h\), an inverse-probability factor for treatment value \(a\) includes the reciprocal of \(P(A_t=a\mid H_t=h)\). If this probability is zero, the reciprocal is undefined. More fundamentally, no observed person with history \(h\) received \(a\), so the observed data contain no outcome information for that treatment choice at that history.

If the probability is positive but very small, the reciprocal is defined but can be large. For example, a conditional probability of 0.020 gives a reciprocal of \(1/0.020=50\). Such a factor can make a small number of observations represent a much larger portion of the target population. This arithmetic explains why sparse support can make estimates unstable. It does not give a universal probability threshold at which positivity is “good enough”; adequacy depends on the sample size, history structure, target contrast, and intended precision.

$$ P(A_t=a\mid H_t=h)=0 \quad\Longrightarrow\quad \frac{1}{P(A_t=a\mid H_t=h)}\ \text{is undefined}. $$

This argument concerns the treatment probability at a history. It is not a substitute for evaluating other assumptions needed for causal interpretation, such as consistency and sequential exchangeability. Nor does a favorable positivity diagnostic establish those assumptions.

Interpreting the Diagnostic Without Overclaiming

Observed frequencies are estimates of underlying probabilities, and their reliability depends on the data available within each history. In a finite sample, an underlying positive probability can produce no observed examples, especially when the history is rare. Conversely, seeing one treated person in a stratum does not show that the treatment probability is safely bounded away from zero. The data can flag concern, but they cannot perfectly classify every zero as structural or random.

A useful report gives the history definition, denominator, treatment-specific counts, and conditional proportions. It also explains which histories matter for the proposed contrast and whether the study design makes any treatment choices impossible. Where histories are too detailed for reliable tabulation, report that limitation rather than implying that an overall treatment proportion verifies support.

For continuous treatments, there are no simple treatment-category counts that establish support at an exact value. The corresponding condition concerns positive conditional density over treatment values required by the target contrast. The same diagnostic principle applies—support must be examined conditional on histories—but this tutorial’s count-based illustrations are for discrete treatment.

Common Mistakes

  • Using only the overall treatment proportion. A balanced marginal rate can coexist with a zero or near-zero conditional probability in an important history. Inspect conditional counts.
  • Calling every sample zero structural. The count \(0/n\) describes the sample, not necessarily the treatment mechanism. Check design and clinical constraints, especially when \(n\) is small.
  • Calling every positive count adequate support. One treated person avoids an empirical zero but may still provide very little information. Report the denominator and assess the frequency in context.
  • Ignoring the target contrast. A treatment option matters for positivity when the contrast requires that option in the history. State which intervention or comparison is being assessed.
  • Pooling distinct histories for convenience. A treatment probability averaged across histories can hide that one subgroup has little or no access to treatment. Preserve relevant prior treatment and covariate distinctions.
Key takeaway: Diagnose longitudinal positivity with history-specific counts and conditional treatment frequencies, interpreted in light of the target contrast and treatment process. Sparse observations are a warning about limited information; a structural zero is a genuine absence of a required treatment option. A sample zero alone does not distinguish them.

Check Your Understanding

Use the history-specific perspective in each answer.

  1. In a two-visit study, treatment is 50% overall at visit 1. Give one way this marginal frequency could conceal a positivity problem.
  2. A history has 0 treated people among 3 observed people. What can be concluded from the count alone, and what additional information would help classify the zero?
  3. A treatment is forbidden by protocol for a specific baseline stratum. Explain why a target regime that assigns treatment to everyone may fail positivity.
  4. Why should a frequency table include both the number of people in a history and the number receiving each treatment?
  5. If the conditional treatment probability is positive but very small, explain why that can still be problematic for weighted estimation.
Clinical Biostats