Tutorials › Marginal Structural Models › Complementary Log-Log Links as a Contrast to Pooled Logistic MSMs

Fitting MSMs for Survival Outcomes · Tutorial 201 of 501

Complementary Log-Log Links as a Contrast to Pooled Logistic MSMs

See why the complementary log-log link exactly represents proportional hazards over intervals, and when a pooled logistic coefficient is only an approximation to a hazard ratio.

Advanced 10 min read

What You'll Learn

  • Derive the complementary log-log model from interval-specific cumulative hazards.
  • Identify the assumptions that give its treatment coefficient a log hazard-ratio interpretation.
  • Calculate how logistic odds ratios differ from hazard ratios as interval risks increase.
  • Explain how interval width affects logistic, but not complementary log-log, treatment contrasts under proportional hazards.
  • Recognize diagnostics and model limitations when fitting weighted discrete-time survival MSMs.

From Interval Risks to Proportional Hazards

A discrete-time survival model represents follow-up in intervals and models the chance of an event during each interval among those still event-free at its start. The link function matters: a logistic model describes interval event odds, whereas the complementary log-log link has a direct connection to cumulative hazards. Under proportional hazards, that connection makes the complementary log-log treatment coefficient a log hazard ratio, even when interval risks are not small.

Let \(k=1,\ldots,K\) index intervals, with interval \(k\) having width \(\Delta_k\). Write \(p_k^a\) for the event probability during interval \(k\) under treatment regime \(a\), conditional on surviving event-free to the interval's start under that regime. Suppose the continuous-time hazard within interval \(k\) is constant and follows a proportional-hazards model:

$$ \lambda^a(t)=\lambda_{0k}\exp(\beta a), \qquad t \text{ in interval } k. $$

Here \(\lambda_{0k}>0\) is the baseline hazard rate in that interval. For a binary treatment, \(a\in\{0,1\}\), and \(\exp(\beta)\) is the hazard ratio comparing treatment with control. In a marginal structural model (MSM), this is a marginal, regime-specific hazard contrast when the model and causal identification assumptions hold; a weighted fit estimates the model in a pseudo-population intended to represent those regimes.

Definition: The complementary log-log transformation of an interval event probability \(p\), for \(0<p<1\), is \(\operatorname{cloglog}(p)=\log[-\log(1-p)]\). A discrete-time complementary log-log model specifies this transformed conditional event probability as a linear predictor.

Why the Complementary Log-Log Coefficient Is a Log Hazard Ratio

The relationship follows from the survival probability over one interval. With a constant hazard rate \(\lambda_{0k}\exp(\beta a)\), survival over an interval of width \(\Delta_k\) is the exponential of minus the hazard rate times the width. Therefore:

$$ 1-p_k^a=\exp\{-\lambda_{0k}\exp(\beta a)\Delta_k\}, \qquad p_k^a=1-\exp\{-\lambda_{0k}\exp(\beta a)\Delta_k\}. $$

Taking the complementary log-log transformation gives the linear predictor exactly:

$$ \log[-\log(1-p_k^a)] =\log(\lambda_{0k}\Delta_k)+\beta a. $$

Thus an interval-specific intercept can absorb the baseline cumulative hazard. Define \(\alpha_k=\log(\lambda_{0k}\Delta_k)\). A model with a separate intercept for every interval and a common treatment coefficient is \(\operatorname{cloglog}(p_k^a)=\alpha_k+\beta a\). Its treatment coefficient represents a log hazard ratio under the stated model. If intervals have unequal widths and the model instead parameterizes a common baseline hazard rate with an intercept, the offset \(\log(\Delta_k)\) must be included.

Theorem: If the hazard is constant within each interval and has the form \(\lambda^a(t)=\lambda_{0k}\exp(\beta a)\), then the conditional interval event probabilities satisfy \(\operatorname{cloglog}(p_k^a)=\log(\lambda_{0k}\Delta_k)+\beta a\). Proof: By the survival formula for a constant hazard, \(1-p_k^a=\exp\{-\lambda_{0k}\exp(\beta a)\Delta_k\}\). Hence \(-\log(1-p_k^a)=\lambda_{0k}\exp(\beta a)\Delta_k\). Taking the logarithm of both sides yields \(\log(\lambda_{0k}\Delta_k)+\beta a\), as required. \(\square\)

The same algebra holds if the baseline hazard varies within an interval, provided treatment multiplies it by the same \(\exp(\beta a)\) throughout that interval: replace \(\lambda_{0k}\Delta_k\) with the integrated baseline hazard over the interval. But if the treatment effect changes within an interval, this simple expression need not hold. The piecewise-constant model is useful because its assumptions and interval-specific baseline terms are explicit.

Worked Example: A Complementary Log-Log Model With Unequal Hazards

In one interval of width \(0.5\) years, suppose the control hazard rate is \(0.08\) per year and the treatment hazard ratio is \(1.5\). Calculate both interval risks and verify their complementary log-log contrast.

For control, the cumulative hazard over the interval is \(0.08(0.5)=0.04\), so \(p^0=1-e^{-0.04}\approx 0.03921\). For treatment, the hazard rate is \(0.08(1.5)=0.12\), giving cumulative hazard \(0.12(0.5)=0.06\) and \(p^1=1-e^{-0.06}\approx 0.05824\).

The transformed probabilities are \(\operatorname{cloglog}(p^0)=\log(0.04)\approx-3.21888\) and \(\operatorname{cloglog}(p^1)=\log(0.06)\approx-2.81341\). Their difference is \(\log(0.06/0.04)=\log(1.5)\approx0.40547\), exactly the log hazard ratio. The calculation does not require treating the interval risk as infinitesimal.

What the Logistic Link Estimates Instead

For the same interval model, the event probability is \(p=1-e^{-H}\), where \(H\) is the cumulative hazard over the interval. The odds of an event in that interval are therefore \(p/(1-p)=e^H-1\). If treatment multiplies the hazard by \(r>0\), its interval odds ratio is:

$$ \operatorname{OR}(H,r)=\frac{e^{rH}-1}{e^H-1}. $$

This odds ratio generally depends on \(H\), and so on the interval baseline hazard and interval width. It is not generally the hazard ratio \(r\). The next result makes the distinction precise for harmful treatment contrasts.

Theorem: If \(r>1\) and \(H>0\), then \(\operatorname{OR}(H,r)>r\). As \(H\) approaches zero, \(\operatorname{OR}(H,r)\) approaches \(r\). Proof: Define \(g(z)=(e^z-1)/z\) for \(z>0\). Its derivative is \(g'(z)=\{e^z(z-1)+1\}/z^2\). The numerator \(q(z)=e^z(z-1)+1\) satisfies \(q(0)=0\) and \(q'(z)=ze^z>0\) for \(z>0\), so \(g'(z)>0\). Thus \(g\) is strictly increasing. Rewriting the odds ratio gives \(\operatorname{OR}(H,r)=r\,g(rH)/g(H)>r\), because \(rH>H\). Finally, \(g(z)\) approaches \(1\) as \(z\) approaches zero, so the ratio approaches \(r\). \(\square\)

For small \(H\), the logistic contrast can approximate the hazard ratio. A second-order expansion shows both the approximation and its error. From the exponential series and the Taylor expansion of the logarithm, \(\log[(e^z-1)/z]=z/2+z^2/24+O(z^3)\) as \(z\) approaches zero. Subtracting this expression at \(z=H\) from the expression at \(z=rH\) gives:

$$ \log \operatorname{OR}(H,r) =\log r+\frac{r-1}{2}H+\frac{r^2-1}{24}H^2+O(H^3). $$

Exponentiating requires including the square of the first-order term. The corresponding odds-ratio expansion is:

$$ \operatorname{OR}(H,r) =r\left\{1+\frac{r-1}{2}H+ \left[\frac{r^2-1}{24}+\frac{(r-1)^2}{8}\right]H^2+O(H^3)\right\}. $$

Worked Example: A Logistic Odds Ratio That Is Not a Hazard Ratio

Let the control cumulative hazard over an interval be \(H=0.5\), and let the treatment hazard ratio be \(r=2\). Calculate the risks and the interval odds ratio.

The control risk is \(p^0=1-e^{-0.5}\approx0.39347\). Its odds are \(e^{0.5}-1\approx0.64872\). The treatment cumulative hazard is \(1\), giving risk \(p^1=1-e^{-1}\approx0.63212\) and odds \(e^1-1\approx1.71828\). Therefore the interval odds ratio is \(1.71828/0.64872\approx2.6487\), not the hazard ratio \(2\). Directly, the formula gives \((e^1-1)/(e^{0.5}-1)\approx2.6487\). The interval event probabilities are not so small that odds can be treated as risks.

Worked Example: Checking the Second-Order Approximation

Take \(r=2\) and \(H=0.05\). The corrected second-order expansion gives \(2\{1+0.05/2+[3/24+1/8](0.05)^2\}\). Since \(3/24+1/8=1/4\), this is \(2\{1+0.025+0.000625\}=2.05125\).

The exact odds ratio is \((e^{0.1}-1)/(e^{0.05}-1)\). Since \(e^{0.1}-1=(e^{0.05}-1)(e^{0.05}+1)\), this ratio equals \(e^{0.05}+1\approx2.05127\). The second-order approximation is close, and the calculation illustrates why exponentiating a log-scale expansion must retain the squared first-order contribution.

Interval Width, Model Assumptions, and Diagnostics

Under a constant hazard rate within an interval, \(H=\lambda_0\Delta\). Increasing the interval width increases \(H\), which moves the logistic odds ratio farther from the hazard ratio. Under the proportional-hazards model, the complementary log-log treatment coefficient remains \(\log(r)\), regardless of interval width, as long as the model assumptions and interval-specific baseline representation are correct.

Worked Example: Interval Width Changes the Logistic Contrast

Suppose the baseline hazard rate is \(0.1\) per year and the treatment hazard ratio is \(2\). For a width of \(0.1\) years, \(H=0.01\). The logistic odds ratio is \((e^{0.02}-1)/(e^{0.01}-1)=e^{0.01}+1\approx2.01005\). For a width of \(1\) year, \(H=0.1\), giving \((e^{0.2}-1)/(e^{0.1}-1)=e^{0.1}+1\approx2.10517\).

The identity used here is \((e^{2H}-1)/(e^H-1)=e^H+1\). For both widths, the complementary log-log contrast is \(\log(2)\), because the hazard ratio is unchanged. The logistic contrast changes because it compares interval odds, which depend on the interval risk.

A causal interpretation of a weighted MSM coefficient requires more than choosing a link. The specified marginal structural hazard model must be appropriate for the regimes being compared, and the causal identification conditions underlying the weights must hold. In practice these include consistency, adequate positivity, and control of treatment-confounding through the weighting strategy; any needed handling of loss to follow-up must also be valid. The treatment effect must have the time-constant form \(\exp(\beta a)\) if a single common coefficient is to represent a constant hazard ratio. If effects vary with time, a treatment-by-interval term or another suitable time-varying representation is needed.

Useful diagnostics include comparing observed and fitted interval event proportions within relevant weighted groups, checking whether fitted risks are in the range from zero to one, and examining whether residual patterns or treatment-by-time contrasts suggest a changing treatment effect. Compare estimates across defensible interval choices: marked changes in a logistic treatment coefficient may reflect interval-width sensitivity, while marked changes in either link can indicate misspecification, sparse events, unstable weights, or different approximations to the underlying process. A successful numerical fit alone does not establish proportional hazards or causal identification.

The complementary log-log link is not automatically preferable in every discrete-time analysis. It has a direct proportional-hazards interpretation when its assumptions apply, but that interpretation can be misleading if hazards are not proportional or the treatment effect changes within intervals. The logistic link models interval event odds and can be a reasonable approximation to a hazard contrast when interval risks are small; it is not an exact hazard-ratio model at general risks. A Cox model is a standard alternative for continuous event times under a proportional-hazards specification, but it is not the same grouped-interval likelihood. Choice among these approaches should follow the time resolution, scientific estimand, and plausibility of the assumptions—not just which coefficient is easiest to describe.

Common Mistake

A frequent mistake is to call a pooled logistic treatment coefficient a hazard ratio because the data are arranged as person-interval records. The logistic model's coefficient exponentiates to an interval odds ratio, not an interval hazard ratio. The two are close when interval cumulative hazards are small, but the formula \((e^{rH}-1)/(e^H-1)\) shows why they diverge as \(H\) grows. Use the complementary log-log link for the direct interval representation of a proportional-hazards model, and still check that its assumptions and the causal weighting conditions are justified.

Check Your Understanding

Try each question, then compare with the brief solutions below.

  1. If \(p=1-e^{-H}\), derive \(\operatorname{cloglog}(p)\) in terms of \(H\).
  2. Under a proportional-hazards model with hazard ratio \(r\), what does a common complementary log-log treatment coefficient represent?
  3. For \(H>0\) and \(r>1\), is the interval odds ratio greater than, equal to, or less than \(r\)?
  4. Why can changing interval width change a pooled logistic treatment coefficient even when the underlying hazard ratio is constant?
  5. Name one model assumption that could invalidate a constant complementary log-log treatment coefficient's interpretation as a single hazard ratio.

Solutions. (1) Since \(1-p=e^{-H}\), \(-\log(1-p)=H\), so \(\operatorname{cloglog}(p)=\log H\). (2) It is the log hazard ratio, provided the proportional-hazards interval model and causal identification assumptions hold. (3) It is greater than \(r\), by the increasing-\(g\) argument above. (4) The interval cumulative hazard changes with width, and the odds ratio \((e^{rH}-1)/(e^H-1)\) depends on \(H\). (5) For example, a treatment effect that varies over time is not represented by one common hazard-ratio coefficient.

Clinical Biostats