Tutorials › Causal Inference › Comparing Sustained and Adaptive Policies in a Worked Example

The G-Formula and Dynamic Regimes · Tutorial 727 of 972

Comparing Sustained and Adaptive Policies in a Worked Example

Work through how sequential models and the g-formula produce comparable counterfactual outcome means for fixed and covariate-triggered treatment policies.

Advanced 9 min read

What You'll Learn

  • Define sustained and covariate-triggered policies over a two-period treatment history
  • Identify the sequential models and causal assumptions needed for g-computation
  • Calculate policy-specific means by averaging predictions over the same covariate distribution
  • Compute and interpret a contrast between the policy means
  • Explain why comparing observed treatment groups does not calculate the g-formula contrast

Why Compare Policies Using the Same Population?

A treatment policy specifies what treatment to assign at each point in time, using information available at that point. One policy might assign treatment at both visits to everyone. Another might assign the first treatment to everyone, then use an intermediate health measure to decide who receives treatment at the second visit. Comparing these policies asks a practical question: what average outcome would the same target population have under each policy?

The comparison requires more than contrasting outcomes among people who happened to follow different treatment histories. The histories may differ in their covariates and prognosis. Instead, g-computation uses sequential models to predict outcomes under each policy, averages those predictions over the covariate histories that would arise under that policy, and then averages over a common baseline target population.

Definition: A sustained policy assigns a specified treatment at each time, regardless of the evolving covariate history. An adaptive policy assigns treatment at a later time according to a rule based on covariates observed by then. The counterfactual mean under policy \(g\), written \(\mu(g)\), is the expected outcome that the target population would have under that policy.

Setup: Two Visits and One Intermediate Covariate

Consider two treatment times. Let \(A_1\) and \(A_2\) denote treatment at the first and second visits, with values 0 or 1. Let \(X\) be a baseline covariate, and let \(L_1\) be a binary covariate measured after the first treatment but before the second. Let \(Y\) be a continuous outcome measured after the second treatment. In the example, \(Y\) is symptom burden in points, so lower values are better.

We will compare two policies. The sustained policy assigns \(A_1=1\) and \(A_2=1\) to everyone. The adaptive policy assigns \(A_1=1\) to everyone, then assigns \(A_2=L_1\): people with \(L_1=1\) receive the second treatment, while those with \(L_1=0\) do not. Both policies begin with the same first treatment. Their later assignments differ for people with \(L_1=0\).

The fitted models in this hypothetical example are deliberately simple. The first models the intermediate covariate under the first treatment:

$$ P(L_1=1\mid X,A_1=1)= \begin{cases} 0.40, & X=0,\\ 0.70, & X=1. \end{cases} $$

The second is the conditional outcome-mean model:

$$ E(Y\mid X,L_1,A_1,A_2) =10+2X+3L_1+2A_1+4A_2. $$

For this calculation, the target population has equal proportions with \(X=0\) and \(X=1\). The conditional mean model is used to predict \(Y\) at each covariate and treatment history specified by a policy. The model for \(L_1\) supplies the probabilities used to average over the intermediate histories.

Assumptions for a causal interpretation: Consistency means that a person's observed outcome and covariate history equal the counterfactual history under the treatment actually received. Sequential exchangeability means that, conditional on \(X\), first-visit treatment is independent of the relevant counterfactual covariate and outcome values, and, conditional on \(X,A_1,L_1\), second-visit treatment is independent of the relevant counterfactual outcome. Positivity requires a positive probability of each treatment action required by a policy at histories that occur in the target population. The fitted conditional models must also correctly represent the covariate probabilities and outcome means needed for the calculation. These assumptions let the observed-data models identify the policy-specific counterfactual means; fitting models alone does not guarantee them.

Worked Example: Constructing the Intermediate-History Distribution

Worked Example: Constructing the Intermediate-History Distribution

Suppose the target population contains 1,000 people: 500 with \(X=0\) and 500 with \(X=1\). Under either policy, \(A_1=1\). Use the fitted covariate model to find the expected numbers with each value of \(L_1\) in each baseline group.

For \(X=0\), the model gives \(P(L_1=1\mid X=0,A_1=1)=0.40\). Thus the expected number with \(L_1=1\) is \(500(0.40)=200\), and the expected number with \(L_1=0\) is \(500(1-0.40)=300\).

For \(X=1\), the corresponding probability is 0.70. The expected numbers are \(500(0.70)=350\) with \(L_1=1\) and \(500(1-0.70)=150\) with \(L_1=0\).

These are model-implied expected counts, not a claim that an actual sample must contain exactly those counts. The overall target-population probability of \(L_1=1\), under the common first treatment, is

$$ P(L_1=1\mid A_1=1) =0.50(0.40)+0.50(0.70) =0.55. $$

This distribution is needed for both policies because they have the same first treatment and baseline target population. The policies will use different second treatments for some histories, but neither changes the already measured \(L_1\).

Worked Example: Mean Under the Sustained Policy

Worked Example: Mean Under the Sustained Policy

Under the sustained policy, both treatments equal 1 for every person. First substitute \(A_1=1\) and \(A_2=1\) into the outcome model. For \(X=0\), the predicted mean is 16 when \(L_1=0\) and 19 when \(L_1=1\). For \(X=1\), the corresponding predictions are 18 and 21.

Average these predictions over the intermediate-covariate probabilities within each baseline group. For \(X=0\):

$$ E(Y^g\mid X=0) =(1-0.40)(16)+(0.40)(19) =0.60(16)+0.40(19) =17.20. $$

For \(X=1\):

$$ E(Y^g\mid X=1) =(1-0.70)(18)+(0.70)(21) =0.30(18)+0.70(21) =20.10. $$

Finally, average over the same target population's baseline distribution, which assigns probability 0.50 to each value of \(X\):

$$ \mu(g_{\text{sustained}}) =0.50(17.20)+0.50(20.10) =18.65\text{ points}. $$

Under the assumptions stated above and the fitted models used here, the sustained policy's estimated counterfactual mean symptom burden is 18.65 points in this target population.

Worked Example: Mean Under the Adaptive Policy and the Contrast

Worked Example: Mean Under the Adaptive Policy

Now assign \(A_1=1\) to everyone and set \(A_2=L_1\). The second treatment is therefore 0 when \(L_1=0\), and 1 when \(L_1=1\). Substituting those assignments into the same outcome model gives the following predicted means: for \(X=0\), 12 at \(L_1=0\) and 19 at \(L_1=1\); for \(X=1\), 14 at \(L_1=0\) and 21 at \(L_1=1\).

For \(X=0\), average over the model-implied \(L_1\) distribution:

$$ E(Y^{g_{\text{adaptive}}}\mid X=0) =0.60(12)+0.40(19) =7.20+7.60 =14.80. $$

For \(X=1\):

$$ E(Y^{g_{\text{adaptive}}}\mid X=1) =0.30(14)+0.70(21) =4.20+14.70 =18.90. $$

Standardize to the same 50:50 baseline distribution:

$$ \mu(g_{\text{adaptive}}) =0.50(14.80)+0.50(18.90) =16.85\text{ points}. $$

Define the contrast as sustained minus adaptive. Then

$$ \mu(g_{\text{sustained}})-\mu(g_{\text{adaptive}}) =18.65-16.85 =1.80\text{ points}. $$

Because higher symptom burden is worse, the model-based comparison favors the adaptive policy by 1.80 points on average in this hypothetical target population. This is a contrast of two counterfactual means, not the difference between observed groups who happened to receive the two treatment histories.

Why the Averaging Step Matters

For either policy, the g-formula calculation can be written as an average over baseline covariates and then over the intermediate covariate values that would arise under its first treatment. In this example, both policies set \(A_1=1\), so they use the same probabilities for \(L_1\). Their outcome predictions differ because the adaptive policy's second treatment depends on \(L_1\).

$$ \mu(g) = \sum_x P(X=x) \sum_{l_1\in\{0,1\}} E\!\left(Y\mid X=x,A_1=1,L_1=l_1,A_2=g_2(x,l_1)\right) P(L_1=l_1\mid X=x,A_1=1). $$

Here \(g_2(x,l_1)\) denotes the second treatment assigned by policy \(g\) at that history. For the sustained policy it equals 1 for both values of \(L_1\); for the adaptive policy it equals \(l_1\). The formula makes two features of the comparison explicit: the policy determines which outcome prediction to use at each history, and the history probabilities determine how much weight that prediction receives. The final outer average uses the target population's baseline distribution for both policies.

A short check on the contrast is possible from the model itself. The policies differ only when \(L_1=0\). In that history, the sustained policy uses \(A_2=1\), while the adaptive policy uses \(A_2=0\). The outcome model assigns a difference of 4 points to this change in \(A_2\), regardless of \(X\) or \(L_1\). The target-population probability of \(L_1=0\) is \(1-0.55=0.45\). Therefore:

$$ \mu(g_{\text{sustained}})-\mu(g_{\text{adaptive}}) =4(0.45)=1.80\text{ points}. $$

This agrees with the direct standardization. It is a check specific to this additive model: with treatment interactions or a different outcome model, the treatment contrast could vary across histories, and the full weighted calculation would be needed.

Common Mistake: Comparing Observed Treatment Histories

A tempting but incorrect shortcut is to compare the observed mean outcome among people who received treatment at both visits with the observed mean among people who received the adaptive pattern. Those groups need not have the same distribution of \(X\) or \(L_1\). In particular, \(L_1\) is measured after the first treatment and may be related to prognosis; it also determines the adaptive policy's second treatment. The crude observed-group difference therefore need not equal the policy contrast.

G-computation instead applies the fitted models to each target-population history and averages according to the history distribution under the policy being evaluated. This distinction also explains why simply inserting the policy's treatment values into an outcome model and averaging without accounting for \(L_1\) is incomplete: the policy mean must include the possible covariate histories and their probabilities.

Key takeaway: A fair policy comparison uses the same target population, the same fitted sequential models, and a separate g-formula average for each policy. The treatment rule changes the predictions at histories where the rules differ; the covariate model supplies the weights for averaging over histories.

Check Your Understanding

Use the models and target population in the examples to answer the following.

  1. Under the sustained policy, what outcome-model prediction is used for a person with \(X=1\) and \(L_1=0\)? Show the treatment values substituted.
  2. Why does the adaptive policy use the same \(L_1\) probabilities as the sustained policy in this example?
  3. Write the adaptive policy's second-treatment rule in terms of \(L_1\), and state what treatment it assigns when \(L_1=0\).
  4. Interpret the 1.80-point contrast in context, including which policy has the lower predicted mean symptom burden.
  5. Why would comparing observed people with different treatment histories not, by itself, establish the counterfactual policy contrast?
Clinical Biostats