Tutorials › Competing Risks and Multi-State Models › Conditional Likelihoods for Clustered Event Data

Frailty and Clustered Events · Tutorial 619 of 699

Conditional Likelihoods for Clustered Event Data

Learn to build and check the event-history likelihood for clustered subjects conditional on a shared frailty, and distinguish it from the marginal likelihood.

Advanced 12 min read

What You'll Learn

  • Write the conditional likelihood for recurrent-event histories using counting processes and at-risk indicators.
  • Combine event-time intensity factors with integrated hazard contributions over observed follow-up.
  • Account for shared frailty across cluster members and repeated events within a member.
  • Interpret right censoring under conditionally independent censoring.
  • Diagnose common errors involving frailty powers, risk time, and conditional versus marginal likelihood.

Why Condition on the Shared Frailty?

A shared frailty represents unobserved risk common to members of a cluster. Conditional on that frailty, members’ event processes may be modeled as independent; marginally, they are dependent because they share the same latent risk multiplier. A likelihood conditional on the frailty makes the contribution of each observed event and each event-free period explicit. It is also the starting point for constructing a likelihood when the frailty is latent, although that requires integrating over its distribution.

The earlier material on recurrent-event models supplies the event-history perspective: a subject may experience several events, and the at-risk period must be specified. Here the focus is the likelihood conditional on the shared frailty, including what happens to the likelihood when observation ends without another event.

Definition: For cluster \(j\), let \(U_j>0\) be its shared frailty, treated as fixed when conditioning. For member \(i\), let \(N_{ij}(t)\) count recurrent events by time \(t\), and let \(Y_{ij}(t)\) indicate whether that member is under observation and at risk just before \(t\). A common conditional intensity model is $$ \lambda_{ij}(t\mid U_j)=Y_{ij}(t)U_j\lambda_0(t)\exp\{x_{ij}(t)^\top\beta\}. $$ Here \(\lambda_0(t)\) is the baseline event rate, \(x_{ij}(t)\) is a covariate vector, and \(\beta\) is its coefficient vector. The frailty multiplier is shared by all members of cluster \(j\).

An intensity is an instantaneous event rate conditional on the modeled history and the frailty. In this formulation, the event rate at time \(t\) does not depend on how many events have already occurred, except insofar as event history changes covariates or the at-risk indicator. This is a recurrent-event model in which another event can occur after a previous one. If the scientific model specifies a different post-event process, such as a new clock after each event, its intensity and likelihood must be written for that process instead.

Constructing the Conditional Likelihood

Let \(t_{ijk}\) denote the observed event times for member \(i\) in cluster \(j\), and let \(d_{ij}=N_{ij}(\tau_{ij})\) be the number of events observed by that member’s end of follow-up \(\tau_{ij}\). Under the stated intensity model, the conditional likelihood contribution is the product of the intensity at each event time, multiplied by the exponential of minus the integrated intensity over the member’s at-risk follow-up. Multiplying across members gives the cluster contribution.

$$ L_j(U_j\mid\text{data})= \prod_i \left[ \prod_{k=1}^{d_{ij}} \left\{ U_j\lambda_0(t_{ijk}) \exp\bigl(x_{ij}(t_{ijk})^\top\beta\bigr) \right\} \right] \exp\left\{ -U_j\sum_i\int_0^{\tau_{ij}} Y_{ij}(t)\lambda_0(t)\exp\bigl(x_{ij}(t)^\top\beta\bigr)\,dt \right\}. $$

The event factors appear once per observed event. Thus, if there are \(D_j=\sum_i d_{ij}\) events in cluster \(j\), the event factors together contain \(U_j^{D_j}\). The integrated-hazard term also contains the shared frailty, but as an exponential penalty for all time at risk across cluster members. These two appearances have different roles: observed events contribute intensity, while event-free risk time contributes survival.

The displayed expression assumes continuous event times and no tied events requiring a special discrete-time or tied-event likelihood. It also assumes the conditional intensity model is correctly specified and that the observation and censoring process is conditionally independent of the event process, given modeled information and the frailty. Under that censoring assumption, censoring ends the event-risk exposure at the censoring time; it does not add an event-intensity factor or a separate event-process factor for being censored. Informative censoring requires a joint model or other adjustment.

Key result: The log conditional likelihood for cluster \(j\) can be written $$ \ell_j= D_j\log U_j+ \sum_i\sum_{k=1}^{d_{ij}} \left[ \log\lambda_0(t_{ijk})+ x_{ij}(t_{ijk})^\top\beta \right] -U_j\sum_i\int_0^{\tau_{ij}} Y_{ij}(t)\lambda_0(t)\exp\bigl(x_{ij}(t)^\top\beta\bigr)\,dt. $$ This form makes the frailty power, event-time terms, and accumulated exposure visible.

Why Event Factors and Event-Free Time Both Appear

The likelihood form follows from dividing follow-up into very short intervals. Conditional on the history and frailty, an interval of length \(dt\) has event probability approximately \(\lambda(t\mid U)dt\), while the probability of no event is approximately \(1-\lambda(t\mid U)dt\). Multiplying no-event probabilities over event-free intervals gives the exponential of minus the integrated intensity, since \(\log(1-\lambda dt)\) is approximately \(-\lambda dt\). At an observed event time, the density contribution is the intensity itself.

$$ \prod_{\text{event-free intervals}}(1-\lambda(t\mid U)dt) \ \longrightarrow\ \exp\left\{-\int Y(t)\lambda(t\mid U)\,dt\right\}; \qquad \text{each event contributes }\lambda(t\mid U). $$

This is the counting-process likelihood in its event-time and compensator form. It explains why merely multiplying event rates is insufficient: that would reward high rates for matching observed events without penalizing them for predicting events during long event-free periods. Conversely, using only the integrated hazard would discard the event-time information.

Worked Example: Two Cluster Members, One Event Each

Suppose a hypothetical cluster has two members, each with one observed event. The conditional event rate is constant at \(\lambda_0=0.12\) per month, the covariate multiplier is 1 for both, and the shared frailty is \(U_j=0.30\). Member A is at risk for 25 months and member B for 10 months. Assume independent right censoring where follow-up ends and no other risk interruption.

Each event contributes \(U_j\lambda_0=0.30(0.12)\) per month. The two integrated intensities are \(0.30(0.12)(25)=0.90\) for A and \(0.30(0.12)(10)=0.36\) for B. Therefore

$$ L_j=0.30^2(0.12)^2\exp[-(0.90+0.36)] =0.001296\exp(-1.26) \approx 0.0003676. $$

Equivalently, the event part is \(0.30(0.12)\times0.30(0.12)=0.001296\), and the event-free part is \(\exp(-1.26)\approx0.2837\); their product is approximately \(0.0003676\). The likelihood density has units of month\(^{-2}\), because there are two continuous event times. The event-free periods include all 35 months at risk, including time ending in censoring; censoring contributes exposure but is not counted as an event.

Worked Example: Repeated Events and Censoring in One Cluster

Consider a hypothetical cluster with a shared frailty \(U_j=1.5\) and constant baseline rate \(\lambda_0=0.20\) per year. Both members have covariate multiplier 1. Member A has three recurrent events during 3 years of observation. Member B has no events and is independently censored after 2 years. The model allows recurrent events without a change in rate after each event.

There are \(D_j=3\) events, so the event factors multiply to \((1.5\times0.20)^3=0.30^3=0.027\), with units year\(^{-3}\). Total time at risk is \(3+2=5\) person-years, so the integrated intensity is \(1.5\times0.20\times5=1.5\). The conditional cluster likelihood is

$$ L_j=(0.30)^3\exp(-1.5) =0.027(0.22313) \approx 0.006025. $$

The likelihood density is approximately \(0.006025\) year\(^{-3}\). Member B’s zero-event follow-up contributes \(\exp[-1.5(0.20)(2)]=\exp(-0.60)\), not a factor for an event and not a factor of 1 that erases the two years at risk. The product of the two members’ contributions is \(0.30^3\exp[-0.90-0.60]\), the same cluster likelihood.

Changing Baseline Rates and Risk Intervals

With a time-varying baseline rate, calculate the integrated hazard separately over intervals on which the rate or covariates are constant, then add those pieces. If a subject temporarily leaves the risk set, the corresponding period has \(Y_{ij}(t)=0\) and contributes no event-process exposure. Re-entry can be represented by setting \(Y_{ij}(t)=1\) again, provided that this observation scheme is appropriate for the model.

Worked Example: Piecewise Baseline Rate With a Censored Member

Suppose a hypothetical two-member cluster has \(U_j=0.50\), unit covariate multipliers, and a baseline rate of \(0.10\) per month through month 4 and \(0.20\) per month afterward. Member A is observed from month 0 to month 6 and has events at months 2 and 5. Member B is observed from month 0 to month 3, has no event, and is then independently censored.

For A, the baseline cumulative hazard over months 0–6 is \(0.10(4)+0.20(2)=0.80\). For B, it is \(0.10(3)=0.30\). The shared-frailty integrated intensity across both members is \(0.50(0.80+0.30)=0.55\). The two event rates are \(0.50(0.10)=0.05\) per month at month 2 and \(0.50(0.20)=0.10\) per month at month 5. Hence

$$ L_j=(0.05)(0.10)\exp(-0.55) =0.005(0.57695) \approx 0.002885. $$

This is a likelihood density in month\(^{-2}\). The censoring of B at month 3 truncates its exposure at 3 months; it does not imply that B had an event at month 3. Using the baseline rate after month 4 for all of A’s follow-up, or extending B’s risk time beyond month 3, would change the likelihood incorrectly.

Reading, Checking, and Using the Likelihood

Several checks help catch errors before likelihood calculations are used for estimation:

  • Count events before assigning the frailty power. The exponent of \(U_j\) in the event factors is the total number of events in the cluster, not the number of members. A member with three events contributes three event factors.
  • Audit total at-risk time. Sum only the intervals for which \(Y_{ij}(t)=1\), including event-free follow-up that ends in right censoring. Do not count time after censoring or during a specified off-risk interval.
  • Match each event to its rate at that time. With time-varying baseline rates or covariates, event factors use the values at each event time; the integrated term uses their values over the full risk intervals.
  • Check units. Each event intensity contributes inverse-time units, while the exponent is dimensionless. With \(D_j\) continuous event times, the likelihood density has units of time\(^{-D_j}\).

A common mistake is to treat the shared frailty as if it were separately redrawn for every event or every member. That would produce different frailty powers and eliminate the intended common cluster effect. In the shared-frailty model, the same \(U_j\) multiplies every member’s rate throughout the modeled cluster follow-up. Another mistake is to call the expression above a marginal likelihood. It is conditional on a specified \(U_j\). When the frailty is unobserved, a population likelihood must average this conditional likelihood over the frailty distribution; conditioning is not the same as integrating.

The conditional likelihood is useful for seeing the structure of the model, and it is the integrand used in likelihood methods for latent frailty. But it does not by itself supply an estimable observed-data likelihood if \(U_j\) is unknown and latent. The mean cumulative function approach targets recurrent-event burden without requiring this conditional intensity specification, while a cluster-robust variance approach addresses dependence in uncertainty estimates rather than imposing a shared-frailty event-rate model. Those approaches answer different questions and are not interchangeable likelihoods.

Limitation: A correct calculation does not guarantee a correct model. The conditional likelihood relies on the specified intensity, risk intervals, covariate history, and censoring assumptions. In particular, a shared multiplicative frailty alone may not represent time-varying dependence, event-order effects, or informative dropout. Model assessment and sensitivity analysis are needed when those features are plausible.

Check Your Understanding

Work out each item, then compare with the solutions below.

  1. A cluster has one event in each of two members, with \(U=0.5\), constant rate \(0.10\) per month, and 4 and 6 months at risk. What is its conditional likelihood contribution?
  2. One member has two events, and another has none. What is the power of \(U_j\) in the event factors? Does the event-free member contribute to the integrated-hazard term?
  3. In one sentence, explain how independent right censoring enters this event-process likelihood.
  4. A calculation uses \(U_j^3\) for a cluster with four observed events. Identify the error and state the correct power.

Solutions. (1) The event factors are \([0.5(0.10)]^2=0.0025\); the integrated intensity is \(0.5(0.10)(4+6)=0.5\). Thus \(L=0.0025e^{-0.5}\approx0.001516\) month\(^{-2}\). (2) The event-factor power is \(U_j^2\), since there are two observed events; the event-free member contributes its at-risk time to the integrated hazard. (3) Independent right censoring ends observation and hence at-risk exposure, but adds no event factor or separate event-process censoring factor. (4) The power must be \(U_j^4\), one factor for each observed event; using \(U_j^3\) omits an event.

Clinical Biostats