Why Compare Frailty Structures?
For recurrent events in clusters, dependence may arise because people in the same cluster share unmeasured risk, because some individuals have persistently higher event rates than others, or because both mechanisms operate. A shared frailty represents cluster-level heterogeneity; an individual frailty represents additional person-level heterogeneity. Choosing between them matters: the models can yield different likelihoods, variance estimates, and predictions even when their average event rates are similar.
The comparison is meaningful only when the candidate models use the same observations, follow-up definition, covariates, baseline specification, and likelihood convention. A larger maximized likelihood is not by itself evidence that a more complex model is preferable; it will generally be at least as large when the simpler model is nested within it. Information criteria and scientific plausibility also matter.
For clarity, consider a piecewise-constant Poisson rate model. Conditional on the frailties, counts are independent Poisson variables with means \(e_{ij}\lambda\exp(x_{ij}^{T}\beta)Z_jW_{ij}\). Here \(\lambda\) is a baseline rate, \(x_{ij}\) is a covariate vector, and \(\beta\) is its coefficient vector. Set \(Z_j=1\) in the individual-only model and \(W_{ij}=1\) in the shared-only model. The no-frailty model sets both to 1. In applications with time-varying rates or recurrent-event histories, the corresponding conditional event-process likelihood replaces this simple count likelihood; the essential comparison still requires the same observation model across fits.
The basic assumptions are that the specified conditional event model is adequate, that the frailty distribution and independence structure are reasonable, and that censoring and observation processes are handled appropriately. In particular, an exposure offset must reflect actual at-risk time, and the model must not treat an unobserved period as event-free follow-up. These assumptions should be assessed rather than inferred merely from a successful optimizer.
What the Likelihood Comparison Measures
In the shared-only model, conditional independence given \(Z_j\) does not imply marginal independence. Integrating over the common frailty couples all counts in a cluster. Write \(\mu_{ij}=e_{ij}\lambda\exp(x_{ij}^{T}\beta)\), \(N_j=\sum_iY_{ij}\), and \(M_j=\sum_i\mu_{ij}\). Integrating the gamma density gives the cluster likelihood contribution
In the individual-only model, each person’s count has its own gamma mixture, so the marginal likelihood factors across individuals. In the combined model, integrating \(Z_j\) and each \(W_{ij}\) does not generally reduce to a product of two simple negative-binomial likelihoods: conditional on \(Z_j\), the individual frailty mixture still depends on \(Z_j\). The combined likelihood should therefore be evaluated by the appropriate integration or likelihood algorithm, not by multiplying the shared-only and individual-only likelihoods.
Worked Example: Integrating One Shared Frailty
Consider one hypothetical cluster with two individuals, each with conditional Poisson mean \(\mu_i=0.4Z\). The shared frailty has variance \(\theta_S=0.5\), so its gamma shape and rate are both 2. Suppose the observed counts are \(Y_1=0\) and \(Y_2=2\). Treat the rate and exposure as fixed for this likelihood calculation.
The total count is \(N=2\) and total conditional mean without frailty is \(M=0.8\). Substitution in the integrated shared-frailty likelihood gives
The joint probability is not the product of two marginal probabilities because the same \(Z\) affects both people. For contrast, under an individual-only model with the same variance \(0.5\), the two independent marginal probabilities are \(P(Y_1=0)=(1+0.5(0.4))^{-2}\approx0.6944\) and \(P(Y_2=2)=3(0.5(0.4))^2/(1+0.5(0.4))^4\approx0.05787\). Their product is about \(0.04019\). This is a comparison at specified parameter values, not a comparison of maximized fits.
Compare Maximized Fits on the Same Data
Each candidate should be fitted by maximizing its own marginal likelihood, including the frailty integration. Use the same event records and covariates, and make sure that all likelihoods include the same constants and treatment of censoring. For a nested comparison, the larger model’s maximized likelihood cannot be smaller than that of the smaller model when both are optimized over the same parameter space and the smaller model is obtained by setting a variance to zero.
The following hypothetical output is for one dataset of 40 clusters. Each model contains the same two baseline and covariate parameters; the variance parameters are additional. The listed values are assumed to be maximized log likelihoods from a common likelihood convention.
| Model | Frailty variance estimates | Number of parameters \(k\) | Maximized log likelihood | AIC |
|---|---|---|---|---|
| Shared-only | \(\hat\theta_S=0.42\) | 3 | \(-512.4\) | 1030.8 |
| Individual-only | \(\hat\theta_I=0.18\) | 3 | \(-510.8\) | 1027.6 |
| Combined | \(\hat\theta_S=0.31,\ \hat\theta_I=0.11\) | 4 | \(-508.9\) | 1025.8 |
Worked Example: Likelihood and AIC Comparison
For the shared-only fit, \(k=3\) and \(\ell=-512.4\). Since \(\mathrm{AIC}=-2\ell+2k\),
For the combined fit, \(k=4\) and \(\ell=-508.9\), giving \(\mathrm{AIC}_{S+I}=-2(-508.9)+2(4)=1017.8+8=1025.8\). The combined model improves the maximized log likelihood by \(3.5\) over shared-only, while adding one parameter; its AIC is lower by \(5.0\). Its AIC is also \(1.8\) lower than that of the individual-only fit. In this hypothetical comparison, AIC favors the combined model among these three candidates, but that is a relative measure of expected information loss, not proof that both frailty mechanisms are true.
The shared variance estimate falls from \(0.42\) in the shared-only fit to \(0.31\) in the combined fit. This is not contradictory: once individual heterogeneity is represented separately, less residual variation may be attributed to cluster differences. The fitted variances are conditional on each model’s structure; they should not be compared as if they were estimates of an invariant quantity.
Why the Variance Components Change Predictions
Frailty variances affect the distribution of future counts, not their mean under this mean-one parameterization. For example, for \(m\) individuals in a new cluster with equal conditional mean \(H\) per person, the expected total count is \(mH\) in all three models. But the variance differs because the frailties induce different dependence patterns.
For shared-only frailty, the total count conditional on \(Z\) is Poisson with mean \(mHZ\). The law of total variance gives \(\operatorname{Var}(N)=mH+(mH)^2\theta_S\). Under individual-only frailty the counts are independent marginally, each with variance \(H+H^2\theta_I\), so \(\operatorname{Var}(N)=mH+mH^2\theta_I\). In the combined model, the random total intensity is \(HZ\sum_iW_i\). Since \(E(Z^2)=1+\theta_S\), \(E(W_i)=1\), and \(E[(\sum_iW_i)^2]=m^2+m\theta_I\), its variance is
Worked Example: Predictive Variability for a New Cluster
Use the hypothetical combined-fit estimates \(\hat\theta_S=0.31\) and \(\hat\theta_I=0.11\). Suppose a new cluster has \(m=2\) individuals, each with expected count \(H=0.6\) over the prediction period. These are new-cluster predictions, so no cluster-specific posterior estimate is being used.
All three models give expected total count \(mH=2(0.6)=1.2\). Shared-only predicts variance \(1.2+(1.2)^2(0.31)=1.6464\). Individual-only predicts variance \(1.2+2(0.6)^2(0.11)=1.2792\). For the combined model, the variance is
Thus these fits have the same predicted mean count but different predictive dispersion. Shared frailty creates dependence between individuals in the same cluster, while individual frailty contributes person-level heterogeneity. The larger combined-model variance here reflects both components and their interaction in the random total intensity. This variance is not itself a prediction interval; constructing one requires the predictive distribution, not just its first two moments.
Justification and Practical Diagnostics
The variance formulas follow directly from conditional variance. For the combined model, write \(N\mid Z,W\sim\operatorname{Poisson}(HZ\sum_iW_i)\). Therefore, \(\operatorname{Var}(N)=E\{\operatorname{Var}(N\mid Z,W)\}+\operatorname{Var}\{E(N\mid Z,W)\}\). The first term is \(mH\), because \(E(Z\sum_iW_i)=m\). For the second term, independence yields \(E[(Z\sum_iW_i)^2]=(1+\theta_S)(m^2+m\theta_I)\); subtracting its squared mean \(m^2\) gives \(m\theta_I+\theta_S(m^2+m\theta_I)\). This establishes the displayed result and shows why simply adding the two variance estimates would be wrong.
A comparison should include checks that can reveal a poor fit or a numerical problem:
- Check optimizer convergence, gradient size, and whether estimates change with reasonable starting values. A variance estimate near a boundary may signal weak information, not a stable component.
- Compare observed and model-predicted cluster-level event-count distributions, including the number of zero-event clusters and the upper tail. A model can match the overall mean while missing clustering or extreme counts.
- Inspect residual patterns against follow-up time, covariates, cluster size, and exposure. Systematic patterns can indicate a misspecified rate, time trend, or observation process rather than the wrong frailty level alone.
- Check whether conclusions are driven by a few large clusters or by unequal cluster sizes. Refit under plausible baseline and frailty-distribution choices when the variance estimates are sensitive.
- Verify that conditional event assumptions are plausible. Frailty does not automatically correct event-history dependence, changing risk after prior events, or informative dropout.
A shared-only and an individual-only model are generally not nested within one another. Their likelihood difference therefore does not have the usual simple likelihood-ratio test interpretation. The combined model contains either simpler model as a boundary case when the corresponding variance is zero, but testing a zero variance is also a boundary problem; ordinary chi-square reference distributions need not apply. The earlier material on testing zero frailty variance at the boundary is relevant when formal testing is required. AIC or a carefully justified boundary-aware procedure is preferable to an unqualified ordinary likelihood-ratio test.
Information criteria are useful but have limits. AIC ranks candidates only relative to the set considered and does not establish causal interpretation, correct specification, or transportability. Variance estimates can be weakly identified, particularly when few clusters are observed or follow-up is limited. Shared and individual components may trade off, so uncertainty in both estimates and predictions should be considered. Sensitivity to the assumed frailty distribution also matters: the earlier material on sensitivity to frailty distribution addresses how conclusions can change when the gamma assumption is altered.
Common Mistakes and Model Choice
A frequent mistake is to say that a combined fit “proves” both types of heterogeneity because its log likelihood is largest. The log likelihood is expected to increase as parameters are added; compare the gain with complexity and assess fit, uncertainty, and scientific plausibility. Another mistake is to interpret \(\hat\theta_S\) from a shared-only fit as directly comparable to \(\hat\theta_S\) from a combined fit. The estimates answer different conditional questions because the models allocate heterogeneity differently.
The main alternatives have distinct uses. Shared-only models are parsimonious when cluster-level dependence is the target and individual heterogeneity is not needed. Individual-only models allow persistent person-to-person variation but do not induce dependence between distinct individuals in a cluster. Combined models can represent both sources, but require more information and may be unstable in small datasets. Cluster-robust standard errors, covered in the earlier material on frailty versus cluster-robust standard errors, adjust uncertainty for dependence without specifying a frailty distribution; they do not provide the same latent-risk structure or frailty-based predictions.
Use the same event data, risk intervals, covariates, baseline formulation, censoring treatment, and likelihood convention.
Maximize each marginal likelihood, check convergence and boundaries, and examine whether variance estimates are stable.
Use likelihood and an appropriate complexity criterion, inspect predictions and diagnostics, and report that variance components depend on the chosen model.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a shared-only gamma frailty model, why are two individuals’ counts in the same cluster generally dependent after the shared frailty is integrated out?
- A combined fit has log likelihood \(-240.0\) with four parameters. A shared-only fit has log likelihood \(-242.2\) with three parameters. Calculate both AIC values and state which is lower.
- For \(m=3\), \(H=0.5\), and individual-only variance \(\theta_I=0.2\), calculate the predicted mean and variance of the total count.
- Why is an ordinary likelihood-ratio test not automatically justified for comparing shared-only with individual-only fits?
- What does a decrease in the shared variance estimate after adding an individual frailty suggest, and what does it not prove?
Solutions. (1) Both counts depend on the same random multiplier \(Z_j\); integrating over it induces marginal dependence even though the counts are conditionally independent given \(Z_j\). (2) Combined AIC is \(-2(-240.0)+2(4)=488.0\). Shared-only AIC is \(-2(-242.2)+2(3)=490.4\). The combined model has AIC lower by \(2.4\), a relative ranking rather than proof that it is correct. (3) The mean is \(mH=3(0.5)=1.5\). The variance is \(mH+mH^2\theta_I=1.5+3(0.25)(0.2)=1.65\). (4) The models are generally non-nested, so the usual likelihood-ratio reference distribution does not apply. Also, a comparison involving zero frailty variance places a parameter on the boundary. (5) It suggests some heterogeneity previously attributed to cluster differences is allocated to individual differences under the combined specification. It does not establish that the new component is true or that the estimates are stable; uncertainty, fit, and sensitivity must also be assessed.