Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Frailty Dependence Among Recurrent Events

Competing Risks and Recurrent Events · Tutorial 433 of 697

Frailty Dependence Among Recurrent Events

You will learn to separate dependence due to unobserved subject heterogeneity from dependence due to event history, and see how each changes recurrent-event calculations.

Advanced 12 min read

What You'll Learn

  • Define a recurrent-event intensity conditional on a shared subject-level frailty.
  • Derive the covariance between event counts in separate intervals under gamma frailty.
  • Update frailty expectations using a subject’s observed event history.
  • Distinguish latent frailty dependence from explicit effects of previous events.
  • Calculate an expected count under a dynamic, non-explosive event-history model.
  • Recognize diagnostics and limitations of frailty models.

Why Recurrent Events Can Be Dependent

A subject who has several recurrent events may have a persistently higher event rate than another subject, even after accounting for measured covariates. That pattern can arise because subjects differ in unmeasured susceptibility. It can also arise because an event changes the subject’s subsequent event rate. These are different mechanisms: a shared frailty represents persistent latent heterogeneity, while an event-history effect represents a change associated with the subject’s accumulated events.

The distinction matters for interpretation and calculation. A frailty can make event counts in separate intervals dependent even when the intervals are independent conditional on that frailty. An explicit event-history effect instead makes the current intensity depend directly on the number or timing of prior events. If that history changes during an interval, the intensity changes within that interval too.

Definition: Let \(N_i(t)\) count recurrent events for subject \(i\) by time \(t\), and let \(Y_i(t)\) indicate whether the subject is under observation and at risk just before \(t\). A subject-level frailty \(Z_i>0\) is an unobserved random effect that multiplies the subject’s recurrent-event intensity. A basic frailty model is $$ \lambda_i(t\mid Z_i,\mathcal{H}_i(t-)) = Y_i(t) Z_i \lambda_0(t)\exp\{\boldsymbol{x}_i(t)^\top\boldsymbol{\beta}\}, $$ where \(\lambda_0(t)\) is a baseline intensity, \(\boldsymbol{x}_i(t)\) is a covariate vector, \(\boldsymbol{\beta}\) is its coefficient vector, and \(\mathcal{H}_i(t-)\) is the event and covariate history immediately before \(t\). In this basic model, prior events do not directly multiply the intensity; their information may nevertheless help predict \(Z_i\).

An intensity is a conditional rate: over a short interval of length \(dt\), the conditional probability of an event is approximately \(\lambda_i(t\mid\cdot)\,dt\). The model is often paired with independent frailties across subjects and a specified frailty distribution. Conditional on \(Z_i\) and modeled covariates, the event process must follow the assumed intensity model; censoring and observation processes must also be handled appropriately. The intensity alone does not assert that events are independent after marginalizing over \(Z_i\).

How Shared Frailty Induces Dependence

A particularly transparent calculation uses a gamma frailty with mean one and variance \(\theta>0\). Write its shape and rate as \(1/\theta\), so that \(E(Z_i)=1\) and \(\operatorname{Var}(Z_i)=\theta\). Suppose, for this calculation, that the subject stays at risk, covariates are fixed, and the intensity conditional on \(Z_i\) is \(Z_i\) times a deterministic baseline rate. For two disjoint time intervals \(A\) and \(B\), let \(H_A\) and \(H_B\) be the integrated baseline intensities over those intervals. Conditional on \(Z_i\), the counts \(N_i(A)\) and \(N_i(B)\) are independent Poisson variables with means \(Z_iH_A\) and \(Z_iH_B\), respectively.

The law of total covariance separates conditional variation from variation in the conditional means. The first term is zero because the counts are conditionally independent; the second term is positive when \(\theta>0\):

$$ \begin{aligned} \operatorname{Cov}\{N_i(A),N_i(B)\} &= E\{\operatorname{Cov}(N_i(A),N_i(B)\mid Z_i)\}\\ &\quad+\operatorname{Cov}\{E(N_i(A)\mid Z_i),E(N_i(B)\mid Z_i)\}\\ &=0+\operatorname{Cov}(Z_iH_A,Z_iH_B)\\ &=\theta H_AH_B. \end{aligned} $$

Thus subjects with large frailty tend to have more events in both intervals. This is dependence after averaging over the unobserved frailty, not a direct effect of an event in interval \(A\) on the intensity in interval \(B\). The calculation assumes the conditional Poisson structure and no event-history multiplier; it should not be transferred unchanged to a model in which past events alter the intensity.

Worked Example: Count Dependence Across Two Intervals

Suppose a hypothetical cohort follows the gamma frailty model just described, with frailty variance \(\theta=0.5\). For one subject, assume the integrated baseline intensities are \(H_A=0.4\) events in the first interval and \(H_B=0.6\) events in the second. These are integrated rates, not observed event counts.

Conditional on frailty, the two counts are independent Poisson variables. Their marginal covariance is therefore $$ \operatorname{Cov}\{N_i(A),N_i(B)\}=\theta H_AH_B =(0.5)(0.4)(0.6)=0.12. $$

For context, the marginal mean in interval \(A\) is \(E(Z_iH_A)=0.4\), and its variance is \(E(Z_iH_A)+\operatorname{Var}(Z_iH_A)=0.4+(0.5)(0.4^2)=0.48\). The corresponding variance in interval \(B\) is \(0.6+(0.5)(0.6^2)=0.78\). The correlation is $$ \frac{0.12}{\sqrt{(0.48)(0.78)}}\approx 0.1961. $$

The positive association in counts is induced by shared frailty. It does not establish that an event in the first interval caused a later event.

Learning About Frailty From Event History

Although the basic model has no direct event-history multiplier, observing events changes what is known about a subject’s frailty. Under the gamma frailty model and conditional Poisson assumptions, suppose the subject has accumulated \(n_i\) events over total integrated baseline intensity \(H_i\). Ignoring factors that do not involve \(Z_i\), the likelihood contribution for \(Z_i\) is proportional to \(Z_i^{n_i}\exp(-Z_iH_i)\). Multiplying this by the gamma prior density gives a gamma posterior with shape \(1/\theta+n_i\) and rate \(1/\theta+H_i\). Its mean is

$$ E(Z_i\mid \text{event history})= \frac{1/\theta+n_i}{1/\theta+H_i}. $$

More events than expected for the subject’s exposure tend to raise the posterior mean frailty; a long event-free period can lower it. The marginal intensity conditional on the observed history is consequently the baseline intensity multiplied by the current conditional expectation of frailty. This prediction reflects learning about latent susceptibility, not a causal effect of prior events.

Worked Example: Updating the Frailty Expectation

Consider a hypothetical subject with gamma frailty variance \(\theta=0.5\). By the current time, the subject has had \(n_i=3\) events over integrated baseline intensity \(H_i=0.7\). The prior shape and rate are both \(1/\theta=2\), so the posterior shape is \(2+3=5\) and its rate is \(2+0.7=2.7\). Therefore, $$ E(Z_i\mid \text{history})=\frac{5}{2.7}=1.852. $$

If the current baseline intensity is \(0.4\) events per year and the subject remains at risk, the posterior-averaged intensity is \(0.4(1.852)=0.7407\) events per year. This is a history-conditional prediction under the frailty model. It is not evidence that the three prior events themselves increased the subject’s event rate.

Frailty Versus an Explicit Effect of Previous Events

A model can include an explicit event-history term as well as frailty. For example, a multiplier \(g\{N_i(t-)\}\) can make the current intensity depend on the number of events strictly before \(t\). Frailty captures persistent subject-to-subject heterogeneity; \(g\) captures a specified association between accumulated event history and current intensity, conditional on frailty and other modeled information. The event-history coefficient is not automatically causal: time-varying health, treatment changes, or other confounding processes may influence both event history and subsequent risk.

The distinction is especially important when calculating expected counts. If the history multiplier changes after each event, it is not valid to hold its initial value fixed throughout a future interval and call the resulting rate-times-time quantity the expected count under the dynamic model. The following example uses a linear history multiplier, chosen so the process is non-explosive.

Worked Example: A Dynamic Event-History Effect

Suppose a hypothetical subject has intensity $$ \lambda_i(t\mid Z_i,N_i(t-))=Z_i a\{1+\gamma N_i(t-)\}, $$ with constant \(a=0.25\) events per year, \(\gamma=0.5\), \(Z_i=1\), and an initial count \(N_i(0)=1\). Consider a follow-up interval of length \(d=0.8\) years. Every new event increases the multiplier: it begins at \(1+0.5(1)=1.5\), then becomes \(2\) after one further event.

Let \(m(t)=E\{N_i(t)\mid Z_i=1\}\). For this pure-birth counting process, the instantaneous expected increase is the expected intensity, so $$ m'(t)=a\{1+\gamma m(t)\},\qquad m(0)=1. $$ Solving this differential equation gives $$ m(t)=\left(m(0)+\frac{1}{\gamma}\right)e^{a\gamma t}-\frac{1}{\gamma}. $$ At \(t=0.8\), the expected count is $$ m(0.8)=(1+2)e^{(0.25)(0.5)(0.8)}-2 =3e^{0.1}-2 \approx 1.3155. $$ The expected number of additional events in the interval is \(1.3155-1=0.3155\). This is the expectation under the dynamic history model, where the multiplier can change after each event.

For comparison only, freezing the initial multiplier at \(1.5\) would give the rate-times-duration quantity \((0.25)(1.5)(0.8)=0.3000\). That is a frozen-rate calculation, not the dynamic expectation. Here it is close to, but not equal to, the dynamic expected increment.

For \(\gamma>0\), the linear rate \(a(1+\gamma n)\) at count \(n\) does not produce infinitely many events in finite time: the sum of mean waiting times is proportional to \(\sum_{n\geq 1}1/(1+\gamma n)\), which diverges. By contrast, a multiplier \(\exp(\gamma N_i(t-))\) with \(\gamma>0\) gives rates growing geometrically in \(n\); the corresponding sum of mean waiting times can be finite, allowing explosion. Such a model needs explicit attention to non-explosion and cannot be treated as an ordinary finite-count process without qualification.

Model Choice, Diagnostics, and Limitations

Frailty and event-history effects can produce similar observed patterns of repeated events, so the data may not clearly distinguish them. Their scientific interpretations differ, however, and model comparisons should reflect the question being asked. Event-order-specific hazards allow the baseline risk to vary with event number; gap-time models reset the time scale after an event. Those approaches describe risk through event order or time since an event, rather than by a shared latent multiplier alone. A cluster-robust variance estimator can address uncertainty from within-subject correlation in some settings, but it does not provide a frailty distribution or subject-specific latent-risk predictions.

Useful checks include comparing predicted and observed recurrence counts over follow-up, examining whether residual patterns remain across subjects or time, and assessing sensitivity to the frailty distribution and baseline intensity. Large unexplained differences in individual recurrence counts can signal misspecified heterogeneity or event-history structure. A single frailty distribution may be inadequate if subgroups have distinct risk patterns. With few recurrent events per subject, the frailty variance can also be weakly identified. In addition, unobserved heterogeneity and an explicit history effect can be difficult to separate without adequate follow-up and event histories.

A common mistake is to reason, “The subject has already had an event, so multiply the rate by the event-history factor at the start of the interval and use that rate for the whole interval.” That is correct only as a frozen-rate approximation under an explicitly stated approximation. In a dynamic history model, every event can alter the subsequent intensity, so the expected count must account for that changing state, as in the differential-equation calculation above. A second mistake is to interpret positive frailty-induced association as evidence that prior events cause later events. The association can arise entirely from persistent, unobserved susceptibility.

Key takeaway: Shared frailty creates marginal dependence because repeated-event counts share the same latent multiplier. An explicit event-history term changes the conditional intensity as events accrue. These mechanisms can coexist, but their assumptions, calculations, diagnostics, and interpretations are distinct.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Under gamma frailty with variance \(\theta\), why can counts in disjoint intervals be dependent even if they are conditionally independent given frailty?
  2. For \(\theta=0.25\), \(H_A=0.2\), and \(H_B=0.5\), calculate the marginal covariance of interval counts.
  3. With \(\theta=0.5\), \(n_i=1\), and \(H_i=0.5\), calculate the posterior mean frailty.
  4. In the dynamic linear history model, what changes after an event, and why is a fixed initial rate-times-duration calculation not generally the expected count?

Solutions. (1) Both conditional means contain the same random \(Z_i\), so their covariance after averaging over frailty is \(\operatorname{Var}(Z_i)H_AH_B=\theta H_AH_B\). (2) \((0.25)(0.2)(0.5)=0.025\) squared-count units, or event-count covariance. (3) The posterior mean is \((2+1)/(2+0.5)=3/2.5=1.200\). (4) The count \(N_i(t-)\) increases by one, changing the multiplier from \(1+\gamma N_i(t-)\) to its value at the new count; the intensity therefore varies within the interval, and the expected count must average over possible event paths rather than hold the initial multiplier fixed.

Clinical Biostats