Why Conditional and Marginal Effects Can Differ
A proportional hazards model with frailty says that, for two individuals with the same frailty value, a covariate multiplies their instantaneous event hazards by a constant. It does not generally say that the same constant compares the hazards in the two covariate groups after frailty is unobserved and averaged out. The reason is selection over time: individuals with greater frailty tend to experience the event sooner, so the frailty distribution among survivors changes.
This distinction matters whenever a result is communicated to people who were not conditioned on a latent frailty value. A conditional effect describes a comparison at the same latent risk; a marginal effect describes the contrast between covariate groups as they exist in the population at a specified time. The earlier material on frailty selection and marginal hazard attenuation develops the selection idea; here the focus is its consequences for covariate contrasts.
For the standard marginal comparison below, assume \(Z\) is independent of \(X\), has a common distribution across covariate values, and has finite mean, conventionally scaled to \(E(Z)=1\). Also assume the conditional hazard model is correctly specified and the event-free survival conditional on \(X,Z\) is generated by that hazard. These are model assumptions, not consequences of observing a proportional hazards pattern. If censoring is present, estimating the model additionally requires an appropriate noninformative-censoring assumption conditional on the variables used in the analysis.
Deriving the Marginal Hazard
Write \(\Lambda_0(t)=\int_0^t\lambda_0(u)\,du\). Conditional on \(X=x,Z=z\), the cumulative hazard is \(z\exp(\beta x)\Lambda_0(t)\), so the conditional survival probability is \(\exp\{-z\exp(\beta x)\Lambda_0(t)\}\). Let \(L(s)=E\{\exp(-sZ)\}\) denote the Laplace transform of the frailty distribution. Averaging conditional survival over \(Z\) gives the marginal survival.
The marginal hazard is the negative time derivative of the log marginal survival. Differentiating the expectation is justified, for example, when the frailty distribution has a finite mean and the relevant derivatives are integrable. If \(s=\exp(\beta x)\Lambda_0(t)\), then \(L'(s)=-E\{Z\exp(-sZ)\}\). Applying the chain rule yields the following result.
The formula shows exactly why the conditional hazard ratio need not persist marginally. For a binary covariate, the marginal hazard ratio comparing \(X=1\) with \(X=0\) is $$ \exp(\beta)\, \frac{E\{Z\exp[-Z\exp(\beta)\Lambda_0(t)]\}/E\{\exp[-Z\exp(\beta)\Lambda_0(t)]\}} {E\{Z\exp[-Z\Lambda_0(t)]\}/E\{\exp[-Z\Lambda_0(t)]\}}. $$ The two groups have different survivor-weighted frailty means because their cumulative hazards differ. In particular, the marginal ratio can vary with time even though \(\exp(\beta)\) is constant conditional on frailty.
Worked Examples
Worked Example: Gamma Frailty Gives a Time-Varying Contrast
Suppose \(Z\) has a gamma distribution with mean 1 and variance \(\theta=0.5\), and \(X\) is binary with conditional hazard \(\lambda(t\mid x,z)=z\lambda_0(t)2^x\). Frailty is independent of \(X\), and the same baseline hazard applies in both groups. Find the marginal hazard ratio at a time when \(\Lambda_0(t)=0.4\).
For a gamma frailty with shape \(1/\theta\) and rate \(1/\theta\), \(L(s)=(1+\theta s)^{-1/\theta}\). Differentiating gives \(-L'(s)=(1+\theta s)^{-1/\theta-1}\). Therefore the survivor-weighted mean frailty is $$ \frac{-L'(s)}{L(s)}=\frac{1}{1+\theta s}, \qquad s=2^x\Lambda_0(t). $$ The marginal hazard is consequently \(\lambda_m(t\mid x)=\lambda_0(t)2^x/[1+\theta 2^x\Lambda_0(t)]\).
For \(X=0\), this is \(\lambda_0(t)/(1+0.5(0.4))=\lambda_0(t)/1.2=0.8333\lambda_0(t)\). For \(X=1\), it is \(2\lambda_0(t)/(1+0.5(2)(0.4))=2\lambda_0(t)/1.4=1.4286\lambda_0(t)\). Thus the marginal hazard ratio is \(1.4286/0.8333=1.7143\). The conditional hazard ratio is 2, so the marginal contrast is smaller at this time. This calculation assumes the specified gamma distribution, independence of \(Z\) and \(X\), and the common conditional baseline hazard.
Worked Example: Discrete Frailty and Changing Marginal Ratios
Let \(Z\) equal 0.5 or 1.5 with probability 0.5 each. This distribution has mean 1. Let \(\beta=\log(2)\), with \(Z\) independent of binary \(X\). Calculate the marginal hazard ratio when \(\Lambda_0(t)=0.5\) and when \(\Lambda_0(t)=1\).
For a given cumulative frailty exposure \(q\), the survivor-weighted mean frailty is $$ m(q)=\frac{0.5(0.5)e^{-0.5q}+0.5(1.5)e^{-1.5q}} {0.5e^{-0.5q}+0.5e^{-1.5q}}. $$ The marginal hazard ratio at time \(t\) is \(2m(2\Lambda_0(t))/m(\Lambda_0(t))\), since the cumulative exposures for \(X=1\) and \(X=0\) are \(2\Lambda_0(t)\) and \(\Lambda_0(t)\), respectively.
At \(\Lambda_0(t)=0.5\), the two survivor-weighted means are $$ m(0.5)=\frac{0.54898}{0.62558}=0.8775, \qquad m(1)=\frac{0.31898}{0.41483}=0.76894. $$ Hence the marginal ratio is \(2(0.76894)/0.8775=1.752\), to three significant figures.
At \(\Lambda_0(t)=1\), the values are $$ m(1)=\frac{0.31898}{0.41483}=0.76894, \qquad m(2)=\frac{0.12931}{0.20883}=0.61920. $$ The marginal ratio is \(2(0.61920)/0.76894=1.611\), to three significant figures. The conditional ratio remains 2 at both times, whereas the marginal ratio declines as frailer individuals are progressively removed from both survivor groups. The displayed numerator and denominator values are rounded; the reported ratios use the unrounded values.
Worked Example: Why Covariate–Frailty Dependence Changes the Marginal Effect
Suppose the conditional model has \(\beta=\log(2)\). In the \(X=0\) group, let \(Z\) equal 0.5 or 1.5 with equal probabilities, giving mean frailty 1. In the \(X=1\) group, let \(Z\) equal 1 or 2 with equal probabilities, giving mean frailty 1.5. At time zero, compare the marginal hazards.
At time zero there has been no survival selection, so each group’s marginal hazard is the conditional baseline multiplier averaged over its frailty distribution. The \(X=0\) hazard is \(\lambda_0(0)E(Z\mid X=0)=\lambda_0(0)\). The \(X=1\) hazard is \(2\lambda_0(0)E(Z\mid X=1)=3\lambda_0(0)\). Thus the marginal ratio at time zero is 3, while the conditional hazard ratio at the same \(Z\) is 2. The distributions have overlapping frailty support at \(Z=1\), and the conditional model still defines a ratio of 2 at a fixed frailty value.
This example does not satisfy the assumption that frailty is independent of \(X\) and identically distributed across groups. The value 3 is therefore not a contradiction: it is a marginal contrast that includes the groups’ different frailty distributions, not just the conditional covariate multiplier. Later in follow-up, the marginal contrast also reflects different survivor selection in the two groups.
Interpretation, Alternatives, and Diagnostics
A conditional hazard ratio answers: “At the same frailty value, how do the instantaneous hazards compare?” A marginal hazard ratio answers: “Among people with each covariate value who have survived event-free to this time, how do their instantaneous hazards compare after averaging over frailty?” These are distinct estimands. A marginal hazard ratio is not generally an average of individual hazard ratios, and it does not describe a single baseline population with an unchanged frailty distribution at every time.
| Quantity | Comparison | Typical behavior under frailty |
|---|---|---|
| Conditional hazard ratio | Same frailty value, different covariate values | Constant at \(\exp(\beta)\) under conditional proportional hazards |
| Marginal hazard ratio | Survivors in different covariate groups, averaged over frailty | Can vary with time because survivor frailty distributions differ |
| Marginal survival contrast | Population survival probabilities at a specified time | Can be reported as a survival difference or ratio at that time |
When the scientific target is a population-level comparison, marginal survival probabilities or their difference at a prespecified time can be easier to interpret than a time-varying marginal hazard ratio. The conditional hazard ratio remains useful when the scientific question explicitly concerns comparisons at the same latent risk, or when it is the parameter of the specified frailty model. Neither contrast should be described as causal without additional design and causal-identification assumptions.
Useful checks include examining whether the assumed conditional proportional hazards structure is plausible, whether the frailty distribution and its independence from covariates are defensible, and whether the marginal contrast changes materially over the observed follow-up range. A strong time pattern in an estimated marginal contrast is not by itself evidence that the conditional coefficient changes: it may be the expected consequence of frailty selection. Conversely, sparse late risk sets make marginal hazards unstable because few survivors remain, and the surviving individuals may represent a highly selected subset. Sensitivity of the marginal effect to plausible frailty distributions is important because equal mean and variance do not guarantee identical survivor-weighted means at all exposure values.
Common Pitfall and Key Takeaway
- Wrong reasoning: “The conditional model has a constant hazard ratio, so the marginal hazard ratio must also be constant.”
- Correction: Marginalization weights frailty values by survival to time \(t\). Because this weighting differs across covariate groups, their marginal hazards can have a time-varying ratio even when the conditional ratio is constant.
- Another pitfall: Treating an estimated marginal contrast as though it adjusts away covariate–frailty association. If frailty distributions differ by covariate, the marginal comparison includes that difference.
Check Your Understanding
Answer each question, then compare with the concise solutions below.
- What population comparison does a conditional hazard ratio describe, and what comparison does a marginal hazard ratio describe?
- Under independent gamma frailty with variance \(\theta\), write the marginal hazard for covariate value \(x\).
- In the discrete-frailty example, why did the marginal hazard ratio change between \(\Lambda_0(t)=0.5\) and \(\Lambda_0(t)=1\)?
- If frailty and the covariate are associated, which assumption behind the common-distribution marginalization fails?
- Does observing a time-varying marginal hazard ratio necessarily imply that the conditional coefficient \(\beta\) varies with time?
Solutions. (1) The conditional ratio compares covariate values at the same frailty; the marginal ratio compares the event-free survivors in the covariate groups after averaging over frailty. (2) It is \(\lambda_m(t\mid x)=\lambda_0(t)\exp(\beta x)/[1+\theta\exp(\beta x)\Lambda_0(t)]\). (3) Increasing cumulative hazard changes the frailty distribution among survivors differently in the two covariate groups, changing their survivor-weighted mean frailties. (4) The assumption that \(Z\) has the same distribution in every covariate group, equivalently independence of \(Z\) and \(X\), fails. (5) No. Frailty selection alone can make the marginal ratio time-varying while the conditional coefficient remains constant.