Why Cluster Risks Are Shrunk
A cluster with an unusually high event rate may truly have higher underlying risk than other clusters. But when its event count is small, the observed rate can also reflect chance variation. Empirical Bayes estimation balances these possibilities: it combines the cluster’s data with a population distribution for cluster frailties, estimated from all clusters. The result is a cluster-specific estimate that is pulled toward the population mean, with the strength of that pull depending on how much information the cluster contributes.
Here, “risk” means a cluster’s relative event intensity, represented by its frailty, rather than an absolute probability of an event. In the gamma shared-frailty model, frailty is positive and multiplies the conditional event intensity. We focus on estimating frailties for clusters that have been observed; prediction for a new cluster is a different target.
The exposure \(E_j\) summarizes how much event intensity the cluster would accumulate if its frailty were one. For example, in a recurrent-event model it can be formed by integrating the baseline intensity, covariate effects, and at-risk process over the cluster’s observed follow-up. If those quantities are estimated, \(E_j\) is estimated too. The count-and-exposure likelihood used below applies when, conditional on frailty and the model covariates, the event count has the stated Poisson form.
Posterior Frailty and the Shrinkage Formula
Write \(a=1/\theta\). The gamma prior for \(U_j\) then has shape \(a\) and rate \(a\), so its mean is \(a/a=1\). Given a cluster’s event count \(H_j\), the part of its likelihood that depends on \(u\) is proportional to \(u^{H_j}\exp(-E_ju)\). Multiplying by the prior density gives the posterior distribution.
The shape and rate determine both the posterior mean and variance. The posterior mean is a natural empirical Bayes point estimate when squared-error loss is used; the posterior variance describes uncertainty about the cluster frailty, conditional on the fitted population parameters.
The estimate has a direct shrinkage interpretation. The crude cluster rate relative to the frailty-one reference is \(H_j/E_j\), when \(E_j>0\). Rewriting the posterior mean gives
Thus the posterior mean is a weighted average of the crude rate and the prior mean of one. The data weight is \(E_j/(a+E_j)\), while the prior weight is \(a/(a+E_j)\); the two sum to one. Greater exposure gives the cluster’s observed rate more weight. The event count affects the crude rate and the posterior distribution, while exposure determines the data weight in this particular weighted-average expression.
Worked Calculations
Worked Example: A Low-Count Cluster Is Pulled Toward One
Suppose a fitted model gives \(\theta=1.421875=91/64\), so \(a=1/\theta=64/91\approx0.7033\). A hypothetical observed cluster has \(H=1\) event and exposure \(E=2\). Calculate its posterior mean and show the shrinkage.
The posterior distribution is \(\operatorname{Gamma}(a+H,a+E)\). Substituting the values gives shape \(1+64/91=155/91\) and rate \(2+64/91=246/91\). Therefore,
The crude rate is \(H/E=1/2=0.5\). The data weight is \(E/(a+E)=2/(2+64/91)=91/123\approx0.7398\), and the prior weight is \(32/123\approx0.2602\). The weighted calculation is
The estimate lies between the crude rate of 0.5 and the prior mean of 1, as a weighted average must. This is an estimated relative intensity, not a probability of an event.
Worked Example: The Same Count With Different Exposure
Using the same fitted value \(a=64/91\), compare two hypothetical clusters that each have \(H=8\) events, but have exposures \(E=2\) and \(E=4\). Calculate each posterior mean and variance.
For the cluster with \(E=2\), the posterior shape is \(8+64/91=792/91\), and the rate is \(2+64/91=246/91\). Thus,
For the cluster with \(E=4\), the shape remains \(792/91\), but the rate is \(4+64/91=428/91\). Its posterior summaries are
Both clusters have eight events, but their crude rates differ: \(8/2=4\) for the first and \(8/4=2\) for the second. Their empirical Bayes estimates are lower than those crude rates because they are shrunk toward one. The larger exposure gives the second cluster more data weight and results in a smaller posterior variance in this comparison.
Worked Example: Similar Crude Rates, Different Uncertainty
Compare hypothetical clusters with \((H,E)=(2,1)\) and \((H,E)=(8,4)\), again using \(a=64/91\). Both have crude rate \(H/E=2\). Calculate their posterior means and variances, then compare their relative uncertainty.
For \((H,E)=(2,1)\), the posterior shape is \(2+64/91=246/91\), and the rate is \(1+64/91=155/91\). Hence,
For \((H,E)=(8,4)\), the posterior mean is approximately \(1.850\), and the variance is approximately \(0.3934\), as calculated in the preceding example. Its estimate is closer to the common crude rate of 2 because its exposure is greater.
The absolute posterior variance alone needs care: it depends on both the posterior mean and the posterior shape. For a gamma distribution with shape \(k\), the coefficient of variation is \(1/\sqrt{k}\). Here the shapes are \(246/91\) and \(792/91\), giving coefficients of variation \(\sqrt{91/246}\approx0.6082\) and \(\sqrt{91/792}\approx0.3390\), respectively. The higher-count cluster has less relative posterior uncertainty, even though the two crude rates agree.
Empirical Bayes in Practice
The adjective “empirical” means the population distribution is learned from the observed clusters rather than fixed in advance. In a fitted frailty model, parameters such as \(\theta\), regression coefficients, and baseline-intensity parameters are estimated using information across clusters. Those fitted quantities determine \(a\) and the exposures \(E_j\). The estimate for a particular cluster is then obtained by substituting them into its posterior distribution.
This plug-in calculation is conditional on the fitted population parameters. It does not fully account for uncertainty in estimating \(\theta\), the regression coefficients, or the baseline intensity. A posterior interval computed from the plug-in gamma distribution is therefore conditional on those fitted quantities; it should not be described as incorporating all sources of model-fitting uncertainty.
A useful check is that the posterior mean must be between the prior mean and the crude rate whenever both are defined, because it is a weighted average with nonnegative weights that sum to one. If an implementation gives a value outside that range, check the gamma parameterization, the exposure, or the calculation. Also verify that exposure and count refer to the same cluster and follow-up definition.
Check that the conditional event-count likelihood and the gamma shared-frailty distribution are appropriate for the analysis.
Use the estimated frailty variance to calculate \(a=1/\theta\), and calculate each cluster’s exposure \(E_j\) under frailty one.
Form the posterior shape \(a+H_j\) and rate \(a+E_j\), then calculate its mean and variance.
Describe the posterior mean as a model-based relative intensity estimate and the variance as conditional on the fitted population parameters.
Assumptions, Alternatives, and Limitations
The derivation requires a gamma prior for the frailties and a count likelihood proportional to \(u^{H_j}\exp(-E_ju)\). It also relies on the model’s conditional event process and exposure being correctly specified. For example, if recurrent events have additional dependence or event-order effects not represented by the shared frailty, the count likelihood may not capture their information correctly. Informative censoring or an incorrect at-risk process can also distort the exposure. The gamma conjugate update does not repair such model misspecification.
Empirical Bayes estimates are often more stable than crude cluster rates, especially for clusters with little exposure. But shrinkage can conceal genuine extremes if the population distribution is poorly fitted, and estimates are sensitive to the estimated frailty variance: a smaller \(\theta\) means a larger \(a\), which gives the population mean more weight. As \(\theta\) approaches zero, the prior concentrates near one and cluster estimates are pulled strongly toward one.
The main alternatives answer related but distinct questions. A crude rate \(H_j/E_j\) uses only the cluster’s observations and can be highly variable for small counts. A full Bayesian analysis can propagate uncertainty in the population parameters rather than plugging in estimates, at the cost of specifying and computing a joint posterior. The posterior frailty prediction for an observed cluster uses the cluster’s data and the fitted frailty distribution; the empirical Bayes posterior mean is a particular plug-in summary of that prediction. None of these approaches turns an estimated association into a causal effect.
Common Mistakes
- Calling frailty a probability. Frailty is a positive multiplier of conditional event intensity; a value of 1.5 does not mean a 150% event probability.
- Confusing the gamma rate with its scale. With shape and rate, the mean is shape divided by rate and the variance is shape divided by rate squared. Substituting a scale in place of a rate changes the update.
- Assuming every cluster is shrunk by the same amount. The data weight \(E_j/(a+E_j)\) depends on exposure, not just on the observed event count.
- Treating a plug-in posterior variance as total uncertainty. It is conditional on fitted hyperparameters and exposures; their estimation uncertainty is not automatically included.
- Comparing absolute variances without considering scale. The coefficient of variation can clarify relative uncertainty when posterior means differ.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- For \(a=1\), \(H=3\), and \(E=2\), give the posterior shape, rate, and mean frailty estimate.
- For fixed \(a\), what happens to the data weight \(E/(a+E)\) as exposure increases?
- Two clusters have the same crude rate, but one has much greater exposure. Which receives more weight on its crude rate in the posterior mean?
- Why does a plug-in empirical Bayes posterior variance not represent all uncertainty in the fitted model?
Solutions. (1) The posterior is \(\operatorname{Gamma}(1+3,1+2)=\operatorname{Gamma}(4,3)\), so its mean is \(4/3\approx1.333\). (2) The weight increases toward one because \(E/(a+E)\) increases with \(E\) for \(a>0\). (3) The cluster with greater exposure receives more weight on its crude rate, since its data weight is \(E/(a+E)\). (4) The plug-in posterior conditions on estimated population parameters and exposures; it does not by itself propagate uncertainty in estimating them.