Tutorials › Marginal Structural Models › Positivity Diagnostics for Continuous Treatments

Diagnostics and Sensitivity to Misspecification · Tutorial 259 of 501

Positivity Diagnostics for Continuous Treatments

Use conditional densities, support comparisons, and interval probabilities to identify where continuous-treatment positivity is weak or absent.

Advanced 11 min read

What You'll Learn

  • State the support condition for a continuous treatment relative to a target treatment distribution.
  • Explain why a density value is not the probability of observing an exact treatment value.
  • Compare conditional support across covariate profiles rather than relying only on marginal treatment distributions.
  • Use interval probabilities to diagnose sparse support and derive a lower bound on weight second moments.
  • Recognize how density estimates, units, model choice, and finite samples can mislead positivity diagnostics.

Why Continuous-Treatment Positivity Needs Its Own Diagnostics

With a continuous treatment, the question is not whether each covariate group contains people at one exact treatment value: for a genuinely continuous variable, the probability of any exact value is zero. The practical question is whether, across relevant covariate profiles, the observed treatment distribution assigns enough density or probability to the treatment values represented by the analysis target.

A marginal histogram can hide an important gap. A treatment value may be common overall but rare among people with a particular covariate profile; conversely, very different conditional distributions can combine into a marginal distribution that looks broad. Positivity diagnostics therefore compare the conditional treatment distributions with the range of treatment values the analysis needs to represent.

Definition: Let \(A\) be a continuous treatment, \(L\) a vector of covariates, \(f(a\mid l)\) the conditional density of \(A\) given \(L=l\), and \(q(a\mid l)\) a target treatment density. Conditional support positivity for this target requires that, for almost every relevant \(l\), \(q(a\mid l)>0\) only where \(f(a\mid l)>0\), up to sets of measure zero. In other words, the target distribution must not put positive probability on treatment values that are unsupported by the observed conditional distribution.

This is a support condition, not a claim that every density must be large or bounded away from zero at every point. In practice, however, a target value lying in a region with very little observed conditional probability can create unstable density ratios even when the theoretical support condition holds. Diagnostics are used to find such weak-overlap regions and to determine whether conclusions depend on them.

What to Inspect in a Conditional Density

The basic diagnostic is to inspect estimated conditional distributions across covariate profiles. Choose profiles that are scientifically interpretable and represent important parts of the covariate distribution. For each profile, examine the estimated density over the treatment range relevant to the target. Useful displays include overlaid density curves, conditional quantiles, and estimated probabilities for clinically meaningful treatment intervals.

Density values need careful interpretation. A density has units inverse to the treatment units, and its value is not a probability. For example, a density of \(0.4\) per milligram does not mean a 40% chance of receiving exactly that dose. Probabilities are obtained by integrating over intervals. A density can also exceed one when the treatment is measured on a sufficiently fine scale; that does not violate probability axioms.

A direct diagnostic for a fitted model is to evaluate \(\hat f(A_i\mid L_i)\) at each person's observed treatment and covariates, then inspect its distribution and identify the profiles associated with especially small values. This is a screening tool, not a stand-alone test: it can flag weakly supported observations, but does not show whether the model's conditional density is correctly specified. Compare model-based curves with empirical distributions within covariate strata where sample sizes permit, and check sensitivity to plausible alternative model specifications.

For continuous treatments, interval probabilities are often easier to interpret than pointwise densities. For an interval \(B\), compare estimated \(P(A\in B\mid L=l)\) across profiles with the target probability \(q(B\mid l)\). The interval should be selected for substantive reasons, such as a clinically meaningful dose range, rather than chosen only because it makes a diagnostic look reassuring. Very narrow intervals can be uninformative in modest samples; very broad intervals can conceal local gaps.

Worked Example: A Target Range Missing in One Profile

Suppose \(L\) has two profiles, and the observed treatment distributions are \(A\mid L=0\sim\operatorname{Uniform}(0,2)\) and \(A\mid L=1\sim\operatorname{Uniform}(1,3)\). The target treatment distribution is uniform on \([0,2]\) for both profiles.

For \(L=0\), the observed density is \(1/2\) on \([0,2]\), exactly the target support. For \(L=1\), the observed density is \(1/2\) on \([1,3]\), and is zero below 1. The target gives probability \(1/2\) to \([0,1)\), since its density is also \(1/2\) there and the interval has length 1. But the observed conditional distribution for \(L=1\) gives probability zero to that interval.

Thus the marginal target range \([0,2]\) is not supported in the \(L=1\) profile, even though the overall observed treatment range includes \([0,2]\) through the \(L=0\) group. A marginal plot alone would miss this profile-specific violation. No amount of marginal density elsewhere supplies observed support for the missing conditional range.

Density Ratios and the Cost of Weak Support

Many weighted analyses compare a target treatment distribution with the observed conditional treatment distribution. When \(q(a\mid l)\) is absolutely continuous with respect to \(f(a\mid l)\), the density ratio \(w(a,l)=q(a\mid l)/f(a\mid l)\) is defined wherever \(f(a\mid l)>0\). This ratio explains why small conditional densities matter: if the target places appreciable density where the observed conditional density is tiny, the ratio can be large.

The following identity and bound make that connection precise. They are population statements; estimated densities and finite samples add uncertainty, so they do not guarantee that an empirical analysis will behave well.

Result: Suppose \(q(\cdot\mid l)\) and \(f(\cdot\mid l)\) are densities with respect to the same measure, and \(q(\cdot\mid l)\) is absolutely continuous with respect to \(f(\cdot\mid l)\). For \(A\) distributed according to \(f(\cdot\mid l)\), let \(w(A,l)=q(A\mid l)/f(A\mid l)\) where \(f(A\mid l)>0\). Then \(E_f[w(A,l)\mid l]=1\). If \(E_f[w(A,l)^2\mid l]\) is finite, it equals \(\int q(a\mid l)^2/f(a\mid l)\,da\).

To prove the identity, integrate under the observed conditional density. Absolute continuity ensures that target probability is not assigned to a region where the denominator density is zero.

$$ E_f[w(A,l)\mid l] =\int_{\{a:f(a\mid l)>0\}}\frac{q(a\mid l)}{f(a\mid l)}f(a\mid l)\,da =\int q(a\mid l)\,da =1. $$

For the second statement, square the ratio and integrate against \(f\):

$$ E_f[w(A,l)^2\mid l] =\int_{\{a:f(a\mid l)>0\}}\frac{q(a\mid l)^2}{f(a\mid l)^2}f(a\mid l)\,da =\int_{\{a:f(a\mid l)>0\}}\frac{q(a\mid l)^2}{f(a\mid l)}\,da. $$

If this integral is infinite, the second moment is not finite. The formula shows why checking support alone is not enough for practical diagnostics: where \(q\) is appreciable, a very small \(f\) can make the integrand large. \(\square\)

Worked Example: Weak Overlap Despite Positive Densities

Let \(L\) take values 0 and 1 with equal probability, and suppose \(A\mid L=0\sim N(0,1)\) and \(A\mid L=1\sim N(2,1)\). Consider the marginal target density \(q(a)=f_A(a)\), the equal mixture of these two conditional densities.

At \(a=0\), the standard normal density is \(\phi(0)=0.39894\), while \(\phi(-2)=0.05399\). Hence \(f(0\mid 0)=0.39894\) and \(f(0\mid 1)=0.05399\). The marginal target density is \(q(0)=\{0.39894+0.05399\}/2=0.22647\).

The density ratios at that treatment value are \(q(0)/f(0\mid 0)=0.22647/0.39894\approx0.568\) and \(q(0)/f(0\mid 1)=0.22647/0.05399\approx4.194\). Both conditional densities are positive at zero, so there is no support gap in this normal model. Yet the ratio for profile \(L=1\) is much larger: zero is relatively unusual in that profile while still receiving appreciable target density. This is a practical overlap warning, not proof that a particular estimate must be unstable.

In real data, a fitted normal model might assign positive density across the entire real line even when observed data provide little evidence about a tail. Therefore, inspect the data and model fit as well as the fitted density ratio; model-implied positivity alone can be misleading.

Result: For a measurable treatment interval \(B\), define \(p_B=P_f(A\in B\mid l)\) and \(q_B=P_q(A\in B\mid l)\). If \(p_B>0\), then \(E_f[w(A,l)^2\mathbf{1}(A\in B)\mid l]\ge q_B^2/p_B\). If \(p_B=0\) but \(q_B>0\), the target has unsupported probability in \(B\).

For \(p_B>0\), write \(q_B=\int_B w(a,l)f(a\mid l)\,da\). The Cauchy–Schwarz inequality gives

$$ q_B^2 \leq \left\{\int_B w(a,l)^2 f(a\mid l)\,da\right\} \left\{\int_B f(a\mid l)\,da\right\} = E_f[w(A,l)^2\mathbf{1}(A\in B)\mid l]\,p_B. $$

Dividing by \(p_B\) proves the bound. If \(p_B=0\) and \(q_B>0\), the observed conditional distribution assigns no probability to a target-relevant interval, which directly violates the stated support condition. \(\square\)

Worked Example: Quantifying a Sparse Interval

In one covariate profile, suppose a substantively chosen interval \(B\) has estimated observed probability \(p_B=0.01\), while the target probability is \(q_B=0.20\). The bound gives

$$ E_f[w^2\mathbf{1}(A\in B)\mid l]\geq \frac{0.20^2}{0.01}=4. $$

For comparison, if \(p_B=0.20\) and the same target probability is \(q_B=0.20\), the lower bound is \(0.20^2/0.20=0.20\). The first profile must contribute at least 4 to the conditional weight second moment from this interval alone; the second interval imposes a much weaker bound. These calculations do not estimate the full second moment, and the probabilities themselves are estimates, but they show why target-relevant sparse intervals deserve scrutiny.

How to Diagnose, and What the Diagnostics Cannot Establish

A useful sequence is to define the target treatment range, compare conditional support across important covariate profiles, and then quantify observed and target probability in meaningful intervals. Where a density model is used, examine fitted curves alongside empirical summaries, and repeat the inspection under plausible alternative specifications. A profile with few observations may not support a reliable empirical density estimate; report that uncertainty rather than treating a smooth fitted curve as direct evidence.

Common warning signs include target-relevant intervals with very few observations in a profile, conditional density curves that nearly vanish where the target remains substantial, and strong changes in these patterns when the treatment model changes. These signs are diagnostic, not automatic thresholds. A single density cutoff is rarely meaningful across different treatment units, model parameterizations, or sample sizes.

Do not confuse this task with checking only the marginal treatment distribution or only the fitted model's overall fit. Marginal density can conceal conditional gaps, while a good overall fit can coexist with a weakly supported subgroup. Nor does a positive fitted density everywhere establish practical support: a parametric tail may be generated mainly by model assumptions rather than observations. Positivity diagnostics identify where evidence is weak; they do not repair missing support or establish that a chosen model is correct.

Compared with binary-treatment overlap plots, which often compare estimated treatment probabilities, continuous-treatment diagnostics must consider both the location and the scale of conditional densities. For both types of treatment, the central issue is conditional support relative to the target. For a continuous exposure, interval probabilities and covariate-specific density curves make that comparison interpretable without treating the probability of an exact value as nonzero.

Common pitfall: “The estimated conditional density is positive at every observed treatment value, so positivity is adequate.” This reasoning mistakes model-implied positivity for adequate empirical support. A density can be positive but extremely small, and a smooth model can assign positive tails where the data are sparse. Check target-relevant interval probabilities and compare the conditional distributions across profiles; then describe how sensitive the diagnosis is to modeling and sampling uncertainty.

Check Your Understanding

Answer each question, then compare with the short solutions.

  1. Why is \(f(a\mid l)\) not the probability of observing treatment exactly equal to \(a\)?
  2. A target distribution assigns probability 0.10 to an interval in a profile, but the observed conditional distribution assigns probability zero there. What does this imply?
  3. If \(p_B=0.05\) and \(q_B=0.10\), calculate the lower bound on \(E_f[w^2\mathbf{1}(A\in B)\mid l]\).
  4. Why might a marginal treatment density conceal a positivity problem?

Solutions. (1) For a continuous treatment, the probability of any single exact value is zero; density is probability per unit of treatment scale, and interval probabilities come from integrating it. (2) The target assigns positive probability where the observed conditional distribution has none, so the support condition fails in that profile. (3) The bound is \(0.10^2/0.05=0.20\). (4) Different conditional distributions can combine into a broad marginal distribution even when one profile lacks target-relevant treatment values.

Clinical Biostats