Why marginal and conditional hazard ratios can differ
A hazard at time \(t\) describes the instantaneous event rate among people who have remained event-free up to \(t\). That last condition matters: the people still at risk at a later time are a selected subset of the original population. If treatment changes who survives, the two treatment groups can have different compositions of prognostic characteristics in their risk sets, even when treatment was randomized at baseline.
This selection can make the marginal hazard ratio differ from the conditional hazard ratio and change over follow-up. It is a feature of the hazard as a conditional-on-survival quantity, not, by itself, evidence of confounding. The introductory material on interpreting marginal structural hazard ratios distinguishes the target marginal contrast from a conditional model coefficient; here the focus is why those contrasts need not coincide.
A conditional hazard is instead defined within levels of covariates, for example \(\lambda(t\mid A=a,Z=z)\). A conditional proportional-hazards model may assert that this hazard ratio is constant across \(z\) and time. That assertion does not imply that the ratio of the marginal hazards is constant.
Deriving the marginal hazard
Suppose the conditional survival function under regime \(a\) is \(S_a(t\mid z)\), with conditional hazard \(\lambda_a(t\mid z)\). Assume event times are continuously distributed, the conditional survival function is absolutely continuous, and the following integrals are finite. To differentiate the mixture under the integral, also assume that on each compact time interval the conditional density is dominated by an integrable function of \(z\). These conditions allow differentiation under the integral sign.
To verify the result, the conditional event-time density is \(f_a(t\mid z)=\lambda_a(t\mid z)S_a(t\mid z)\). The marginal density is therefore \(f_a(t)=\int f_a(t\mid z)\,dF_Z(z)\). Differentiating the marginal survival gives \(S_a'(t)=-f_a(t)\), so that \(-S_a'(t)/S_a(t)=f_a(t)/S_a(t)\). Substitution of the conditional density yields the displayed formula. \(\square\)
The formula can also be read as an expectation under the distribution of \(Z\) among survivors. Specifically, define
Then \(\lambda_a^m(t)=E[\lambda_a(t\mid Z)\mid T^a>t]\), with survival understood under regime \(a\). This survivor distribution generally differs between regimes, even though the baseline distribution \(F_Z\) is the same.
Constant conditional effects do not ensure constant marginal effects
Consider a conditional proportional-hazards model
The conditional hazard ratio is \(\theta\) at every time and covariate value. The marginal-hazard formula, however, gives
The two averages of the baseline hazard use different survivor distributions. If treatment affects survival and \(Z\) is prognostic, those distributions will generally diverge over time. At baseline, before any survival selection, they agree; later, they need not.
At time zero, \(S_1(0\mid z)=S_0(0\mid z)=1\). The marginal hazards are therefore \(\lambda_1^m(0)=\theta E[\lambda_0(0\mid Z)]\) and \(\lambda_0^m(0)=E[\lambda_0(0\mid Z)]\). Their ratio is \(\theta\), provided the denominator is positive. For positive follow-up times, the survival terms in the two averages differ, which is why the same cancellation is unavailable. \(\square\)
Worked examples
Worked Example: A randomized treatment with a changing marginal ratio
Let \(Z\) be low- or high-risk with probability \(0.5\) in each group. Suppose the untreated hazards are \(0.05\) and \(0.5\) per time unit, respectively, and treatment doubles each conditional hazard. Treatment is randomized, so it is independent of \(Z\); there is no baseline confounding. The conditional hazard ratio is exactly \(2\) in both strata.
At time \(t=1\), control survival is \(e^{-0.05}\) in the low-risk stratum and \(e^{-0.5}\) in the high-risk stratum. The marginal survival and event-density numerator are
Thus \(\lambda_0^m(1)=0.1754134005/0.7788800421\approx0.225212\). Under treatment, the stratum-specific hazards are \(0.1\) and \(1\), giving
Therefore \(\lambda_1^m(1)=0.2291815915/0.6363584295\approx0.360145\), and the marginal hazard ratio at \(t=1\) is approximately \(0.360145/0.225212=1.599\), not \(2\). Yet at \(t=0\), the marginal hazards are \(0.5(0.05)+0.5(0.5)=0.275\) and \(0.5(0.1)+0.5(1)=0.55\), giving a ratio of \(2\). The change arises from differential survival, not confounding.
Worked Example: How the risk-set composition changes
Use the same two-stratum model at \(t=1\). The fraction of control survivors who are high-risk is their high-risk survivor mass divided by total control survival:
Among treated survivors, the corresponding fraction is
The high-risk fraction is lower among treated survivors because treatment has removed more high-risk individuals from the event-free risk set. Averaging the conditional hazards using these survivor proportions gives approximately \(0.611(0.05)+0.389(0.5)=0.225\) for control and \(0.711(0.1)+0.289(1)=0.360\) for treatment. These reproduce the marginal hazards in the first example, up to rounding. Baseline randomization balanced \(Z\); it did not make the later survivor sets compositionally identical.
Worked Example: When the marginal ratio stays constant
Suppose instead that everyone has the same baseline hazard \(\lambda_0(t)\), regardless of \(Z\), and treatment multiplies it by \(\theta\). Conditional survival is then \(S_a(t\mid z)=\exp[-\theta^a\Lambda_0(t)]\), where \(\Lambda_0(t)=\int_0^t\lambda_0(u)\,du\). This survival does not depend on \(z\), so mixing over \(Z\) changes nothing:
For example, with \(\lambda_0(t)=0.2\) and \(\theta=1.5\), the marginal hazards are \(0.2\) and \(0.3\) at every time, and their ratio is \(1.5\). Thus prognostic heterogeneity is central to the selection mechanism: treatment alone does not force a marginal ratio to change.
Interpretation, alternatives, and diagnostics
A conditional Cox coefficient and a marginal hazard ratio answer different questions. The conditional coefficient compares hazards at the same covariate value under its model. A marginal structural hazard contrast compares regime-specific hazards after averaging over the target baseline population and then conditioning on survival under each regime. The latter is often the causal target in a survival MSM; it is not obtained by simply averaging conditional hazard ratios.
If the marginal hazard ratio changes with time, a Cox MSM with one treatment coefficient imposes a proportional-hazards restriction that the true marginal hazards may not satisfy. Its fitted coefficient can still be a useful summary, but it should not automatically be described as the pointwise causal hazard ratio at every time. The value can depend on the follow-up period and the event and censoring patterns contributing information to the fit. A time-varying treatment effect or a direct comparison of regime-specific survival curves may be more informative when the scientific question concerns how effects evolve.
Survival curves, risk differences at a specified time, and restricted mean survival time contrasts are alternatives that avoid interpreting one hazard ratio as a complete summary. They have their own estimands and assumptions; they should be selected to match the question rather than treated as interchangeable with a hazard ratio.
- Check risk-set composition. Baseline balance does not ensure balance among those still at risk. Compare the prognostic profile of survivors across regimes over follow-up when it can be assessed.
- Assess proportionality of the marginal contrast. A visible time pattern in estimated regime-specific hazards, or evidence of treatment-by-time variation, cautions against a constant marginal hazard ratio.
- Separate selection from confounding. The examples show different survivor composition even under randomization. In observational analyses, confounding and informative censoring can add further problems; noncollapsibility does not remove the need for the relevant identification assumptions.
- Check the target and model. A marginal structural interpretation requires the regime-specific survival distributions to be identified under the design or weighting assumptions and the outcome model to represent the intended contrast adequately.
Common mistake
Wrong reasoning: “Treatment is randomized and the conditional hazard ratio is \(2\), so the marginal hazard ratio must be \(2\) at every time. Any difference indicates confounding or a faulty calculation.”
Correction: Randomization balances baseline covariates, but it does not make the groups of survivors at later times have the same covariate distribution. The marginal hazard averages conditional hazards within each regime’s own risk set. When prognosis varies across \(Z\), those averages can differ from the conditional ratio and from one another over time, as the calculations above verify.
Check Your Understanding
Answer each question, then check the worked solutions below.
- In one sentence, explain why treatment randomization does not guarantee equal covariate distributions among survivors at time \(t>0\).
- If \(Z\) is not prognostic and the conditional hazard ratio is \(\theta\), what is the marginal hazard ratio under the homogeneous-hazard model?
- At time zero, the mean untreated hazard over the baseline population is \(0.4\) and the conditional proportional-hazards ratio is \(1.5\). What are the two marginal hazards and their ratio at time zero?
- Does a marginal hazard ratio of \(1.6\) when the conditional ratio is \(2\) prove confounding? Explain.
Solutions. (1) Treatment can affect survival differently across prognostic strata, so the members of each later risk set are selected differently even if the baseline groups were balanced. (2) The marginal ratio remains \(\theta\), because the conditional hazard is the same across \(Z\), so averaging over survivors does not change it. (3) The untreated marginal hazard is \(0.4\); the treated marginal hazard is \(1.5(0.4)=0.6\); the ratio is \(0.6/0.4=1.5\). (4) No. Noncollapsibility and survival selection can produce that difference in a randomized study; confounding is not implied by the difference alone.