Tutorials › Marginal Structural Models › Continuous Treatment Densities in Clever Covariates

Longitudinal Targeted Maximum Likelihood · Tutorial 381 of 501

Continuous Treatment Densities in Clever Covariates

Learn to construct and interpret likelihood-ratio clever covariates from continuous-treatment density estimates, and to check the assumptions that make them valid.

Advanced 12 min read

What You'll Learn

  • Define a likelihood-ratio clever covariate using the intervention and observed treatment densities.
  • Derive the weighting identity that explains how the ratio changes the treatment distribution.
  • Calculate normal-density ratios and their longitudinal products.
  • Connect the ratio to the score equation for a targeting fluctuation.
  • Diagnose support violations, unstable ratios, and misuse for deterministic treatment values.

Why Densities Enter the Clever Covariate

With a categorical treatment, a regime can be represented by an indicator for the treatment level it assigns. A continuously distributed treatment has no positive probability of taking any one exact value, so that indicator divided by an observed-treatment probability is not the right construction. When the target intervention specifies a treatment density, the corresponding adjustment uses a ratio of densities: the intervention density in the numerator and the observed conditional treatment density in the denominator.

This ratio is the continuous-treatment analogue of reweighting by a likelihood ratio. It identifies which observed treatment values are emphasized or downweighted to represent the intervention. The construction depends on the intervention being absolutely continuous with respect to the observed treatment law; a density ratio cannot repair a lack of support.

Definition: Let \(W\) denote baseline covariates, \(A\) a continuous treatment, and \(Y\) an outcome. Write \(g(a\mid w)\) for the observed conditional density of \(A\) given \(W=w\). Suppose the target intervention assigns treatment according to a density \(q(a\mid w)\). The likelihood-ratio clever covariate is \(H(A,W)=q(A\mid W)/g(A\mid W)\), evaluated at the observed treatment. It is defined wherever \(q(a\mid w)>0\) only if \(g(a\mid w)>0\), up to sets of probability zero under the intervention.

Here \(q\) is the target treatment density and \(g\) is the observed treatment density. Both are densities with respect to the same measure, usually Lebesgue measure. They must also describe the same treatment variable and be conditioned on the same covariate history. A ratio of unrelated or differently conditioned densities is not a valid clever covariate.

The Change-of-Measure Identity

The key calculation is that weighting observations from the observed treatment law by \(q/g\) replaces that law with \(q\). This identity both motivates the covariate and gives a direct check on its orientation.

Theorem: Fix \(w\). If \(q(\cdot\mid w)\) is absolutely continuous with respect to \(g(\cdot\mid w)\), then for any measurable function \(u\) such that the integral exists, \[ \int u(a)\frac{q(a\mid w)}{g(a\mid w)}g(a\mid w)\,da = \int u(a)q(a\mid w)\,da. \] In particular, \(E[H(A,W)\mid W=w]=1\), provided the observed conditional law of \(A\) has density \(g\).

Proof. Absolute continuity ensures that \(g(a\mid w)>0\) wherever \(q(a\mid w)>0\), except on a set of zero \(q\)-probability. On that set the integrand can be defined arbitrarily without changing the integral. Elsewhere, cancellation gives \[ \int u(a)\frac{q(a\mid w)}{g(a\mid w)}g(a\mid w)\,da =\int u(a)q(a\mid w)\,da. \] Taking \(u(a)=1\) proves the conditional mean-one statement, since \(q\) integrates to one. \(\square\)

A useful consequence is that for any integrable \(v(a,w)\), \[ E\!\left[H(A,W)v(A,W)\mid W=w\right] = \int v(a,w)q(a\mid w)\,da. \] Thus the ratio does not merely assign weights of some arbitrary scale: it converts an expectation over observed treatments into an expectation over the intervention’s treatment distribution.

Worked Normal-Density Calculations

Worked Example: A Shifted Normal Intervention

Suppose \(A\mid W=w\) is observed to follow \(g(\cdot\mid w)=N(0,1)\), and the intervention uses \(q(\cdot\mid w)=N(0.5,1)\), for every \(w\). Calculate the clever covariate at \(A=0\) and \(A=1\).

The normal density with mean \(\mu\) and variance \(1\) is \((2\pi)^{-1/2}\exp\{-(a-\mu)^2/2\}\). Therefore, \[ H(a,w)=\frac{q(a\mid w)}{g(a\mid w)} =\exp\left\{-\frac{(a-0.5)^2}{2}+\frac{a^2}{2}\right\} =\exp(0.5a-0.125). \] At \(a=0\), \(H(0,w)=\exp(-0.125)\approx0.8825\). At \(a=1\), \(H(1,w)=\exp(0.375)\approx1.4550\). The treatment value \(1\) is upweighted because it is relatively more likely under the shifted intervention than under the observed treatment law.

The ratio’s conditional mean under \(g\) is one. Indeed, for \(A\sim N(0,1)\), \[ E[\exp(0.5A-0.125)] =\exp(-0.125)E[\exp(0.5A)] =\exp(-0.125)\exp(0.5^2/2)=1. \] This also checks that the numerator and denominator have not been reversed.

For a longitudinal intervention, apply the density comparison at each treatment decision, conditional on the history available just before that decision. Let \(H_t\) denote that history, \(g_t(a_t\mid H_t)\) the observed conditional density, and \(q_t(a_t\mid H_t)\) the intervention density. The cumulative clever covariate through time \(t\) is \[ R_t=\prod_{s=1}^{t}\frac{q_s(A_s\mid H_s)}{g_s(A_s\mid H_s)}. \] At each factor, the observed treatment and its history are used. Omitting an earlier factor changes the distribution of the earlier treatment history and generally no longer represents the target law.

Worked Example: Multiplying Ratios Across Two Decisions

Suppose there are two treatment decisions. At each decision, the observed conditional density is \(N(0,1)\) and the intervention density is \(N(0.5,1)\), independent of the history for this calculation. An individual has observed values \(A_1=0\) and \(A_2=1\). Find the cumulative ratio through each decision.

The first factor is \(\exp(0.5A_1-0.125)=\exp(-0.125)\approx0.8825\), so \(R_1\approx0.8825\).

The second factor is \(\exp(0.5A_2-0.125)=\exp(0.375)\approx1.4550\). Hence \[ R_2=R_1\exp(0.375) =\exp(-0.125+0.375) =\exp(0.25)\approx1.2840. \] The cumulative ratio is a product, not a sum. The first factor accounts for the intervention’s relative weighting of the first observed treatment; the second adds the relative weighting at the next decision.

Connection to Targeting

For a single treatment decision, define the outcome regression \(Q(a,w)=E[Y\mid A=a,W=w]\). Under the intervention density \(q\), the target mean is \[ \psi=E\left[\int Q(a,W)q(a\mid W)\,da\right]. \] Assume consistency, conditional exchangeability of treatment and the relevant potential outcomes given \(W\), and the density support condition stated above. These assumptions give the causal interpretation of this statistical target; the density ratio itself is an algebraic change of measure.

The efficient influence function for this mean, under the nonparametric model with \(q\) fixed, is \[ D(O)=H(A,W)\{Y-Q(A,W)\}+\int Q(a,W)q(a\mid W)\,da-\psi. \] The residual term is multiplied by the density ratio because the outcome regression is observed under \(g\), whereas its contribution to the target is averaged under \(q\).

A continuous-outcome fluctuation can use \(Q_\epsilon(A,W)=Q(A,W)+\epsilon H(A,W)\). Its empirical score equation is \[ \sum_{i=1}^{n}H(A_i,W_i)\{Y_i-Q_\epsilon(A_i,W_i)\}=0. \] For a bounded outcome, a logistic fluctuation can instead put \(H\) in the linear predictor, provided the outcome is represented on the required bounded scale. The fluctuation and link must respect the outcome support.

Result: In the continuous-outcome fluctuation above, if \(\sum_{i=1}^n H_i^2>0\), the empirical score equation has the unique solution \[ \hat\epsilon= \frac{\sum_{i=1}^{n}H_i\{Y_i-Q(A_i,W_i)\}} {\sum_{i=1}^{n}H_i^2}. \] Proof. Substitute \(Q_\epsilon=Q+\epsilon H\) into the score equation: \[ 0=\sum_i H_i(Y_i-Q_i-\epsilon H_i) =\sum_i H_i(Y_i-Q_i)-\epsilon\sum_i H_i^2. \] Since the denominator is positive, solving this linear equation gives the stated value, and positivity also makes the solution unique. \(\square\)

Worked Example: Solving a Continuous-Outcome Targeting Update

Suppose two observations have initial predictions \(Q_1=4\), \(Q_2=5\), outcomes \(Y_1=5\), \(Y_2=4.5\), and estimated clever covariates \(H_1=0.8\), \(H_2=1.2\). Calculate the fluctuation estimate and updated predictions.

The residuals are \(Y_1-Q_1=1\) and \(Y_2-Q_2=-0.5\). The numerator is \(0.8(1)+1.2(-0.5)=0.2\), and the denominator is \(0.8^2+1.2^2=0.64+1.44=2.08\). Therefore \(\hat\epsilon=0.2/2.08\approx0.09615\).

The updated predictions are \(Q_1^*=4+0.09615(0.8)\approx4.07692\) and \(Q_2^*=5+0.09615(1.2)\approx5.11538\). The score equation checks: \[ 0.8(5-4.07692)+1.2(4.5-5.11538) \approx0.73846-0.73846=0. \] This example illustrates the empirical targeting equation; it does not establish that the estimated density ratios are accurate or stable.

Assumptions, Diagnostics, and Limitations

The essential support condition is that, for almost every history, \(q_t(\cdot\mid H_t)\) assigns probability only where \(g_t(\cdot\mid H_t)\) does. For finite-variance influence-function calculations, a stronger practical requirement is that the resulting weighted residuals have finite second moments. Even when absolute continuity holds, ratios can be large where the observed density is small. Such values can make targeting updates and standard errors unstable.

  • Inspect the estimated ratios. Examine their range, upper tail, and cumulative products \(R_t\), not only the factors at individual times.
  • Check density fits on the relevant support. A good overall fit can still underestimate \(g_t\) in regions where \(q_t\) places appreciable mass.
  • Check the empirical score after targeting. A materially nonzero score can indicate failed numerical optimization, incorrect implementation, or a mismatch between the fluctuation and its clever covariate.
  • Do not confuse estimation with identification. Truncating extreme ratios may improve numerical stability, but it changes the estimating procedure and does not create support where the data provide none.

The main alternative for a continuous treatment is to define a different target and its corresponding weighting or smoothing scheme. A density ratio is appropriate when the intervention is represented by a density \(q\). It is not the ordinary likelihood ratio for setting treatment deterministically to one exact value: a point mass at that value is not absolutely continuous with respect to a continuous observed treatment distribution. Kernel approximations to point interventions require their own bandwidth choices and target interpretation. They are not obtained simply by evaluating \(q/g\) at the specified point.

In practice, \(g_t\) must be estimated, and the clever covariate is therefore estimated as well. Density estimation error, poor support, and extreme cumulative products can all affect the result. The ratio identity explains the construction; it does not guarantee accurate nuisance estimates or stable finite-sample inference.

Check Your Understanding

Try each question, then compare your reasoning with the solutions.

  1. If \(q(a\mid w)=g(a\mid w)\), what is the clever covariate, and what does its conditional mean equal?
  2. For \(g=N(0,1)\) and \(q=N(1,1)\), derive \(H(a)\) and calculate it at \(a=0\).
  3. Why does the product of two longitudinal density ratios use multiplication rather than addition?
  4. What support failure makes \(q/g\) invalid, and why can truncating a large ratio not fix that failure?

Solutions. (1) \(H=1\) wherever the densities are defined; its conditional mean under \(g\) is one. (2) \(H(a)=\exp\{-(a-1)^2/2+a^2/2\}=\exp(a-0.5)\), so \(H(0)=\exp(-0.5)\approx0.6065\). (3) The joint likelihood ratio for successive conditional treatment densities is the ratio of their products, which equals the product of the individual ratios. (4) If \(q\) assigns positive probability to a region where \(g=0\), absolute continuity fails and no finite density ratio there can reweight observed data into that region. Truncation can cap defined ratios but cannot supply observations from a region absent under \(g\).

Clinical Biostats