Why Contrast Regimes?
A longitudinal treatment regime specifies what treatment to give as a person’s observed history evolves. A useful causal question is not only what outcome distribution would arise under one regime, but how that distribution differs from the one under a second regime. For a binary outcome, common comparisons are the risk difference and risk ratio. For an outcome measured on a numerical scale, a common comparison is the mean difference.
These contrasts are calculated from two regime-specific counterfactual distributions. Each distribution describes outcomes in the target population under one regime; the contrast then compares corresponding summaries of those distributions. Keeping those steps separate matters: a contrast is not calculated by comparing people who happened to receive different treatments at each time.
From Regime-Specific Distributions to Causal Contrasts
In a longitudinal setting, let \(L_t\) denote covariates measured before treatment \(A_t\), for times \(t=0,\ldots,K\), and let \(Y\) be the outcome measured after the final treatment. A regime \(d\) assigns \(A_t=d_t(\bar L_t,\bar A_{t-1})\) at each time using the history available then. Here, an overbar denotes the history through the indicated time. The potential outcome \(Y^d\) refers to the outcome that would result if the person followed that regime.
The causal interpretation of a contrast requires identification of the regime-specific distributions from observed data. The relevant assumptions are consistency (observed outcomes under a person’s followed regime equal that regime’s potential outcomes), sequential exchangeability (at each time, treatment assignment is independent of the future counterfactual outcomes of interest conditional on the measured treatment and covariate history), and positivity (each treatment value required by a regime has positive probability at histories occurring under that regime). The interventions must also be well-defined, and interference between individuals is assumed absent. These conditions allow the longitudinal g-formula to identify each regime distribution; without them, the calculations below describe contrasts in identified distributions only if identification is otherwise justified.
For discrete covariate histories and outcome values, the g-formula identifies the distribution under regime \(d\) by summing over the covariate histories. Writing \(\bar d(\bar l)\) for the treatment history generated recursively by applying \(d\) to covariate history \(\bar l\), the formula is:
For \(t=0\), the factor for \(L_0\) is its baseline distribution. For continuous covariates, the sum is replaced by integration. This formula produces one distribution for each regime. The risk or mean is then computed from that distribution, and the requested contrast compares the two resulting summaries.
Risk Differences and Risk Ratios
For a binary outcome, \(\psi_d=P(Y^d=1)\) is the probability of the event in the target population under regime \(d\). The risk difference compares event probabilities on an absolute scale. It is expressed in probability units, often reported as a percentage-point difference. The risk ratio compares them on a relative scale and is dimensionless.
A negative risk difference means the event risk is lower under \(d_1\) than under \(d_0\); a risk ratio below 1 gives the same direction when the denominator is positive. The risk ratio is undefined if \(\psi_{d_0}=0\). Even when defined, it can be unstable if the comparator risk is very small, so it is important to report the underlying risks as well as the ratio.
Worked Example: Comparing Risks Across Two Regimes
Consider a hypothetical target population divided into two baseline risk groups: 40% are in group 1 and 60% in group 2. Suppose the separately identified risks of an adverse event by the end of follow-up are as follows. Regime \(d_1\) is a hypothetical adaptive treatment policy; regime \(d_0\) is a hypothetical alternative policy. The conditional risks in this example are g-formula quantities under the stated regimes, not crude risks among observed treatment groups.
| Baseline group | Population proportion | Risk under \(d_1\) | Risk under \(d_0\) |
|---|---|---|---|
| 1 | 0.40 | 0.10 | 0.18 |
| 2 | 0.60 | 0.14 | 0.22 |
Standardize each regime’s risks over the same target population. Under \(d_1\), the event risk is
Under \(d_0\), it is
The risk difference, in the stated order, is \(0.124-0.204=-0.080\), or 8.0 percentage points lower under \(d_1\). The risk ratio is
Thus the hypothetical event risk under \(d_1\) is about 0.608 times the risk under \(d_0\), or about 39.2% lower on a relative scale because \(1-0.6078=0.3922\). Both calculations use the same separately identified marginal risks. The strata are weighted using the same target-population proportions under each regime, as required for this comparison.
Mean Differences
When the outcome is quantitative, the mean difference compares the expected outcome under each regime. Its units are the units of \(Y\), such as days, millimeters of mercury, or dollars. It is not a ratio and should not be interpreted as a percentage change unless an additional, explicitly defined calculation supports that interpretation.
For a discrete outcome, each expectation is the sum of outcome values multiplied by their probabilities. For a continuous outcome, the expectation is the corresponding integral. The two distributions need not have the same shape; the mean difference compares their averages, not every feature of their distributions.
Worked Example: Mean Difference in Follow-Up Days
Suppose a hypothetical analysis identifies the following distributions for the number of hospital days under two regimes. Each distribution sums to 1, so it describes the outcome for the full target population under that regime.
| Hospital days \(y\) | \(P(Y^{d_1}=y)\) | \(P(Y^{d_0}=y)\) |
|---|---|---|
| 0 | 0.20 | 0.10 |
| 5 | 0.50 | 0.40 |
| 10 | 0.30 | 0.50 |
The mean number of hospital days under \(d_1\) is
Under \(d_0\), the mean is
Therefore,
Under these hypothetical identified distributions, the average number of hospital days is 1.5 days lower under \(d_1\) than under \(d_0\). This mean contrast does not imply that every individual would have 1.5 fewer hospital days under \(d_1\); it is a difference between population averages.
One Distribution, Different Contrasts
A regime-specific distribution can answer several distinct questions. For example, a numerical outcome’s mean describes its average value, while the risk of exceeding a threshold describes the probability of a particular event. These summaries use the same distribution but target different features of it. Selecting a contrast should therefore follow the substantive question and the outcome’s scale.
Worked Example: Mean and Threshold Risk for Symptom Days
Suppose a hypothetical outcome is the number of symptom days during a fixed follow-up, which can be 0, 1, 2, or 3. The separately identified regime-specific distributions are:
| Symptom days \(y\) | \(P(Y^{d_1}=y)\) | \(P(Y^{d_0}=y)\) |
|---|---|---|
| 0 | 0.20 | 0.10 |
| 1 | 0.40 | 0.30 |
| 2 | 0.30 | 0.35 |
| 3 | 0.10 | 0.25 |
The regime-specific means are
and
The mean difference is \(1.30-1.75=-0.45\) symptom days. Now define a binary event as having at least 2 symptom days. Its risk under \(d_1\) is \(0.30+0.10=0.40\), and its risk under \(d_0\) is \(0.35+0.25=0.60\). Thus the threshold risk difference is \(0.40-0.60=-0.20\), or 20 percentage points lower, and the threshold risk ratio is \(0.40/0.60=0.667\). The mean difference and threshold-risk contrasts are both valid summaries, but they are not interchangeable: one compares average symptom days and the others compare the probability of reaching a particular threshold.
A Useful Identity for Binary Outcomes
If \(Y\) is coded as 1 for an event and 0 otherwise, then for each regime \(d\), \(Y^d\) is also an indicator. An indicator’s expectation equals its probability of being 1:
Consequently, for a binary outcome the mean difference is exactly the risk difference:
The risk ratio remains a different contrast, since it divides the risks rather than subtracting them. This identity also explains why coding an event as 1 and no event as 0 makes its mean equal to its event risk.
Common Pitfall: Mixing Up Absolute and Relative Comparisons
A risk ratio of 0.60 does not mean the risk is 60 percentage points lower. It means the risk under the numerator regime is 60% of the risk under the denominator regime, or 40% lower relative to that denominator risk. The absolute change depends on the risks themselves: a ratio of 0.60 corresponds to a risk difference of \(-0.02\) if the comparator risk is 0.05, but \(-0.20\) if it is 0.50.
A related mistake is to compare observed outcomes among people who received each treatment and call that comparison a regime effect. Those people may have different histories and may not represent the same target population. First identify each regime-specific outcome distribution under the relevant longitudinal assumptions; then calculate the selected contrast from those two distributions. Finally, keep the contrast’s ordering, scale, and units explicit.
Check Your Understanding
Use the definitions and calculations above to answer these questions.
- If the risks under \(d_1\) and \(d_0\) are 0.15 and 0.25, respectively, calculate the risk difference and risk ratio in the stated order and interpret both.
- Why must the risk ratio’s denominator be stated, and what happens to the ratio if the denominator risk is zero?
- For a discrete outcome with values 0 and 4 days and probabilities 0.75 and 0.25 under one regime, calculate the regime-specific mean.
- Explain why a mean difference of \(-2\) days does not imply that each person has two fewer days under the first regime.
- For a binary outcome coded 0 or 1, show why the regime-specific mean equals the regime-specific risk. Which contrast does the mean difference then equal?
- Describe why calculating a contrast from separately identified regime distributions differs from comparing observed outcomes among people who received different treatments.