Tutorials › Marginal Structural Models › Deriving Risk-Difference and Risk-Ratio Contrasts

Longitudinal Targeted Maximum Likelihood · Tutorial 377 of 501

Deriving Risk-Difference and Risk-Ratio Contrasts

Learn how to transform two targeted regime-specific risks into risk-difference and risk-ratio estimates, and combine their influence functions correctly.

Advanced 10 min read

What You'll Learn

  • Define risk-difference and risk-ratio contrasts from two regime-specific risks.
  • Derive each contrast’s influence function by differentiating its parameter map.
  • Use joint asymptotic linearity to justify transforming targeted risk estimates.
  • Work through numerical examples, including the denominator contribution to a risk-ratio influence function.
  • Identify why a zero or small reference risk makes a risk ratio undefined or unstable.
  • Distinguish risk contrasts from alternative scales and from averages of individual ratios.

From Regime-Specific Risks to Contrasts

Longitudinal TMLE can target the risk under each of two treatment regimes separately. A scientific question often concerns not either risk alone, but their contrast: how much does one regime change risk compared with another? The risk difference and risk ratio answer this question on different scales. Their estimates are simple transformations of the targeted risks, but their influence functions must account for how both risks vary.

Let \(d_1\) and \(d_0\) denote two regimes, and let \(\psi_1=\psi_{d_1}\) and \(\psi_0=\psi_{d_0}\) be their regime-specific risks for a binary outcome. For causal interpretation, the usual identification conditions are needed: consistency, sequential exchangeability, and positivity, with censoring appropriately handled if outcomes can be unobserved. The focus here is the contrast after the two risks have been identified and targeted.

Definition: The risk difference comparing \(d_1\) with \(d_0\) is \(\Delta=\psi_1-\psi_0\). If \(\psi_0>0\), the risk ratio is \(R=\psi_1/\psi_0\). The ordering matters: reversing the regimes changes the sign of the risk difference and reciprocates the risk ratio.

Write \(\hat\psi_1\) and \(\hat\psi_0\) for the two targeted regime-specific risk estimates. The plug-in contrast estimates are

$$ \hat\Delta=\hat\psi_1-\hat\psi_0, \qquad \hat R=\frac{\hat\psi_1}{\hat\psi_0}, $$

where the ratio estimate is defined only when \(\hat\psi_0>0\). These expressions use the same two risk estimates targeted for their respective regimes; no separate targeting step is required merely to form either contrast.

Influence Functions for the Contrasts

Suppose \(D_1(O)\) and \(D_0(O)\) are the efficient influence functions for \(\psi_1\) and \(\psi_0\) under the observed-data model. Each is a mean-zero, square-integrable function of one observed data unit \(O\). In particular, a regular one-dimensional submodel with score \(S(O)\) has risk derivatives \(\left.\frac{d}{d\epsilon}\psi_j(P_\epsilon)\right|_{\epsilon=0}=E[D_j(O)S(O)]\), for \(j=0,1\). The contrast influence functions follow by differentiating the maps \(g(x,y)=x-y\) and \(h(x,y)=x/y\).

Theorem: If the two regime-specific risks are pathwise differentiable with influence functions \(D_1,D_0\), then the risk difference has influence function \(D_\Delta=D_1-D_0\). If \(\psi_0>0\), the risk ratio has influence function $$ D_R=\frac{D_1}{\psi_0}-\frac{\psi_1}{\psi_0^2}D_0. $$

Proof. Along a regular submodel, write \(\psi_j(\epsilon)=\psi_j(P_\epsilon)\). Differentiating the difference gives

$$ \left.\frac{d}{d\epsilon}\{\psi_1(\epsilon)-\psi_0(\epsilon)\}\right|_{\epsilon=0} =E[(D_1-D_0)S]. $$

Thus \(D_1-D_0\) represents the derivative of the risk difference against every score. For the ratio, the ordinary quotient rule gives

$$ \left.\frac{d}{d\epsilon} \frac{\psi_1(\epsilon)}{\psi_0(\epsilon)} \right|_{\epsilon=0} = \frac{\psi_1'(0)}{\psi_0} -\frac{\psi_1}{\psi_0^2}\psi_0'(0) = E\left[ \left\{ \frac{D_1}{\psi_0} -\frac{\psi_1}{\psi_0^2}D_0 \right\}S \right]. $$

Both displayed functions have mean zero because \(E[D_1]=E[D_0]=0\). They are square-integrable when the component influence functions are square-integrable; for the ratio, the coefficients are finite because \(\psi_0>0\). They therefore represent the pathwise derivatives of their respective contrasts, proving the stated formulas. \(\square\)

Why the Plug-In Estimates Have These Influence Functions

The same formulas also describe the first-order sampling behavior of the transformed targeted estimates. Assume the two risks are jointly asymptotically linear, meaning

$$ \begin{pmatrix} \hat\psi_1-\psi_1\\ \hat\psi_0-\psi_0 \end{pmatrix} = \frac{1}{n}\sum_{i=1}^n \begin{pmatrix} D_1(O_i)\\ D_0(O_i) \end{pmatrix} +o_p(n^{-1/2}). $$

Joint asymptotic linearity is important: both estimates come from the same observed sample, so their fluctuations can be dependent. For the risk difference, subtraction is exact, giving

$$ \hat\Delta-\Delta = \frac{1}{n}\sum_{i=1}^n\{D_1(O_i)-D_0(O_i)\} +o_p(n^{-1/2}). $$

For the ratio, assume additionally that \(\psi_0>0\), so that with probability tending to one the denominator estimate lies in a neighborhood bounded away from zero. The function \(h(x,y)=x/y\) has continuous second derivatives on such a neighborhood. Taylor expansion around \((\psi_1,\psi_0)\) gives a first-order term \( (\hat\psi_1-\psi_1)/\psi_0-\psi_1(\hat\psi_0-\psi_0)/\psi_0^2\), plus a remainder bounded by a constant times \(\{|\hat\psi_1-\psi_1|+|\hat\psi_0-\psi_0|\}^2\). Joint asymptotic linearity implies both errors are \(O_p(n^{-1/2})\), so this remainder is \(O_p(n^{-1})=o_p(n^{-1/2})\). Substituting the two linear expansions therefore yields

$$ \hat R-R = \frac{1}{n}\sum_{i=1}^n \left\{ \frac{D_1(O_i)}{\psi_0} -\frac{\psi_1}{\psi_0^2}D_0(O_i) \right\} +o_p(n^{-1/2}). $$

This derivation explains the denominator contribution: changing the reference-regime risk changes the ratio even if the numerator risk stays fixed. The formulas concern the first-order behavior of the plug-in contrasts; they do not imply that a ratio is well behaved when its reference risk is close to zero.

Worked Contrast Calculations

Worked Example: Risk Difference and Risk Ratio From Two Targeted Risks

Suppose the targeted risks are \(\hat\psi_1=0.30\) and \(\hat\psi_0=0.15\). The estimated risk difference is

$$ \hat\Delta=0.30-0.15=0.15. $$

On the risk scale, the estimated risk under \(d_1\) is 15 percentage points higher than under \(d_0\). The estimated risk ratio is

$$ \hat R=\frac{0.30}{0.15}=2. $$

Thus the estimated risk under \(d_1\) is twice the risk under \(d_0\). The two numbers describe different scales of contrast; neither is an odds ratio. Their interpretation also depends on the regime ordering: swapping \(d_1\) and \(d_0\) gives a risk difference of \(-0.15\) and a risk ratio of \(0.5\).

Worked Example: Combining Risk-Ratio Influence-Function Contributions

Continue with \(\psi_1=0.30\) and \(\psi_0=0.15\). Suppose that for one observed data unit the regime-specific influence-function values are \(D_1=0.03\) and \(D_0=0.01\). The risk-difference influence-function value is

$$ D_\Delta=0.03-0.01=0.02. $$

For the ratio, apply both terms of the quotient-rule formula:

$$ \begin{aligned} D_R &=\frac{0.03}{0.15} -\frac{0.30(0.01)}{(0.15)^2}\\ &=0.20-\frac{0.003}{0.0225}\\ &=0.20-0.1333\ldots\\ &=0.0667\ldots. \end{aligned} $$

The numerator contribution is \(0.20\); the reference-risk contribution is subtracted and equals approximately \(0.1333\). The combined value is therefore approximately \(0.0667\), not \(-1.133\). This calculation checks both the product \(0.30(0.01)=0.003\) and the denominator square \((0.15)^2=0.0225\).

Worked Example: Shared Data and Cancellation in a Risk Difference

Consider four equally weighted observed data units, with paired influence-function values

$$ (D_1,D_0)\in \{(0.04,0.03),(-0.04,-0.03),(0.02,-0.01),(-0.02,0.01)\}. $$

The mean of the four \(D_1\) values is \((0.04-0.04+0.02-0.02)/4=0\), and the mean of the four \(D_0\) values is \((0.03-0.03-0.01+0.01)/4=0\). The corresponding risk-difference influence-function values are

$$ D_1-D_0\in\{0.01,-0.01,0.03,-0.03\}. $$

These also average to zero. The pairing matters: the two component values move together for the first two units, so subtraction cancels much of their variation there. Adding separate uncertainty summaries for the two risks while ignoring their dependence would miss this feature. The contrast influence function is formed observation by observation from the paired values.

Assumptions, Diagnostics, and Alternatives

The algebraic transformations require only the two risk estimates. Their causal interpretation requires the assumptions that identify each regime-specific risk from observed data. Their first-order influence-function interpretation also requires the component risks to be pathwise differentiable and their estimates to admit the joint asymptotic linear expansion used above. For the ratio, a strictly positive reference risk is essential. If \(\psi_0=0\), the ratio is undefined; if it is very small, the coefficient \(1/\psi_0\) and especially \(\psi_1/\psi_0^2\) can be large.

Useful diagnostics begin with the targeted risks themselves. Check that both estimates are on the risk scale, lie in \([0,1]\), correspond to the intended regimes, and use the same outcome definition and target population. For a ratio, check that \(\hat\psi_0\) is positive and not so small that modest estimation changes produce a large change in the contrast. Also inspect the two component influence-function contributions separately: a large denominator contribution can dominate even when both estimated risks look plausible. A valid contrast formula cannot repair unstable risk estimation or a failure of the assumptions needed to identify the risks.

The risk difference is often easier to interpret in absolute terms, while the risk ratio expresses relative change and is undefined at a zero reference risk. An odds ratio is a different contrast and should not be substituted for a risk ratio, especially when interpreting changes in risk. Standardization or other g-methods can provide estimates of the same regime-specific risks; once two risks on the same target population and scale are available, the contrast transformations and their calculus are the same.

Common pitfall: Do not treat the ratio influence function as \(D_1/\psi_0\) alone. That omits the effect of estimating the denominator. The correct second term is \(-\psi_1D_0/\psi_0^2\). Also do not report a risk ratio when the reference risk is zero, or interpret a large ratio with a tiny reference risk without checking its stability.

Check Your Understanding

Use the definitions and derivations above to answer these questions; complete solutions follow.

  1. If \(\psi_1=0.12\) and \(\psi_0=0.08\), calculate the risk difference and risk ratio.
  2. For \(\psi_1=0.20\), \(\psi_0=0.10\), \(D_1=0.02\), and \(D_0=0.01\), calculate both contrast influence-function values.
  3. Why does the risk-ratio influence function contain a term involving \(D_0\)?
  4. What happens to the risk ratio if \(\psi_0=0\), and why is a very small positive \(\psi_0\) also a warning?

Solutions. (1) \(\Delta=0.12-0.08=0.04\), and \(R=0.12/0.08=1.5\). (2) \(D_\Delta=0.02-0.01=0.01\). Also \(D_R=0.02/0.10-0.20(0.01)/(0.10)^2=0.20-0.002/0.01=0.20-0.20=0\). (3) The ratio changes when either its numerator or denominator changes; differentiating \(x/y\) with respect to \(y\) gives \(-x/y^2\), producing the \(D_0\) term. (4) At \(\psi_0=0\), division by zero makes the ratio undefined. Near zero, the coefficients \(1/\psi_0\) and \(\psi_1/\psi_0^2\) can be large, so small risk-estimation errors can have a substantial effect on the ratio.

Clinical Biostats