Introduction
Standard survival models often begin with the assumption that individuals provide independent survival information after conditioning on the observed covariates. That assumption becomes problematic when patients are naturally grouped into clusters.
Examples include patients treated at the same clinical center, members of the same family, patients from the same physician practice, eyes from the same patient, or recurrent events belonging to the same subject.
Individuals in the same cluster may share characteristics that are not completely captured by the measured covariates. Their event risks may therefore be correlated.
A frailty model addresses this problem by introducing an unobserved random effect into the survival model.
What Is Clustered Survival Data?
Suppose patients are grouped into \(G\) clusters, with several patients belonging to each cluster.
Let \(T_{ij}\) denote the survival time for individual \(i\) in cluster \(j\). The index \(j\) identifies the cluster and \(i\) identifies the individual within that cluster.
Examples of clustering include:
- Patients nested within hospitals or treatment centers
- Patients nested within physicians
- Members of the same family
- Multiple organs or lesions measured within a patient
- Repeated survival events within the same individual
- Subjects enrolled through different geographic regions
The central statistical problem is that two individuals in the same cluster may have more similar event risks than two randomly selected individuals from different clusters.
| Setting | Possible Cluster | Source of Dependence |
|---|---|---|
| Multicenter clinical trial | Site | Local practice patterns, patient mix, care processes |
| Familial survival study | Family | Shared genetics and environment |
| Ophthalmic study | Patient | Two eyes from the same person |
| Physician-level study | Physician | Common treatment practices |
Why Ordinary Cox Regression Can Be Problematic
A conventional Cox proportional hazards model can be written as:
This model treats individuals as conditionally independent given the observed covariates.
But suppose two patients are treated at the same hospital. Even after adjusting for age, disease severity, treatment, and other measured factors, the patients may still have similar underlying risks.
If that shared risk is ignored, the model can underestimate the amount of dependence in the data and may produce standard errors that are too small.
The Basic Frailty Model
A shared frailty Cox model introduces a cluster-specific random effect \(u_j\). The hazard for individual \(i\) in cluster \(j\) becomes:
Here:
- \(h_0(t)\) is the baseline hazard.
- \(\mathbf{x}_{ij}\) is the vector of observed covariates.
- \(\boldsymbol{\beta}\) contains the fixed-effect regression coefficients.
- \(u_j\) is the unobserved frailty for cluster \(j\).
Clusters with larger frailty values have systematically higher event hazards, while clusters with smaller frailty values have lower event hazards.
Why Is It Called "Frailty"?
The term frailty comes from the idea that some individuals or groups are intrinsically more susceptible to the event than others for reasons that are not fully observed.
In a clustered study, however, the frailty can be interpreted more broadly as a latent random effect.
It does not necessarily represent biological frailty in the ordinary clinical sense. A site-level frailty, for example, might capture unmeasured differences in clinical practice rather than patient vulnerability.
Shared Frailty Creates Within-Cluster Dependence
Consider two individuals \(i\) and \(k\) in the same cluster \(j\). Their hazards are:
Both hazards contain the same \(u_j\).
Therefore, when \(u_j\) is unusually large, both individuals tend to have higher hazards. When \(u_j\) is small, both tend to have lower hazards.
This shared latent quantity induces statistical dependence between their survival outcomes.
The Distribution of Frailty
A frailty model requires a probability distribution for the random effect. Two common choices are the gamma and log-normal distributions.
Gamma Frailty
A common parameterization sets the frailty mean to one:
and its variance to:
where \(\theta\) measures the amount of unobserved heterogeneity.
The gamma distribution is attractive because it has a convenient mathematical form for survival models.
Log-Normal Frailty
An alternative is to model the logarithm of frailty as normally distributed:
A convenient parameterization can be chosen so that \(E(u_j)=1\).
The log-normal specification can be attractive when the multiplicative random effect is naturally viewed on the logarithmic scale.
| Feature | Gamma Frailty | Log-Normal Frailty |
|---|---|---|
| Random effect | Positive multiplier | Positive multiplier |
| Common scale | Mean 1 | Mean 1 after parameterization |
| Variance parameter | Frailty variance | Variance of log frailty |
| Mathematical convenience | Very high | More computationally demanding |
| Typical use | Classical shared frailty models | Flexible random-effects formulation |
Why Is the Mean Frailty Usually Set to 1?
There is an identifiability issue between the baseline hazard and the average frailty.
Suppose every frailty value were multiplied by a constant \(c\). The same multiplicative change could be absorbed into the baseline hazard.
To establish a scale, frailty models commonly impose:
The frailty variance then describes how much clusters differ around that common average risk level.
Interpreting the Frailty Variance
The frailty variance is one of the most important quantities in the model.
Under the gamma parameterization:
If \(\theta\) is close to zero, there is little evidence of substantial between-cluster heterogeneity.
A larger \(\theta\) indicates greater variation in underlying cluster-level risk.
| Frailty Variance | Interpretation |
|---|---|
| Near 0 | Little residual heterogeneity between clusters |
| Moderate | Meaningful cluster-level heterogeneity |
| Large | Substantial variation in underlying risk across clusters |
Frailty and Hazard Ratios
For two individuals in the same cluster, if their covariates differ by one unit for covariate \(x_k\), the conditional hazard ratio is:
The shared frailty cancels when comparing two individuals within the same cluster.
For example, if:
then:
meaning that, conditional on the same cluster frailty, the hazard is approximately 30% lower for the group with the favorable covariate level.
Conditional Versus Marginal Interpretation
This distinction is particularly important in frailty models.
The conditional hazard describes risk for an individual given a particular cluster frailty.
A marginal analysis averages over the distribution of frailty.
Because the hazard function is nonlinear, these two quantities are generally not identical.
| Interpretation | Question |
|---|---|
| Conditional | What is the hazard for an individual given the cluster's latent frailty? |
| Marginal | What is the average population-level relationship after integrating over frailty? |
Frailty Versus Cluster-Robust Standard Errors
A common alternative to frailty modeling is to retain an ordinary Cox model but use a cluster-robust sandwich variance estimator.
These approaches solve related but different problems.
| Approach | Main Purpose | Models Heterogeneity? |
|---|---|---|
| Shared frailty | Explicitly model latent cluster-level risk | Yes |
| Cluster-robust variance | Protect standard errors against within-cluster dependence | No explicit random effect |
| Stratified Cox model | Allow different baseline hazards by cluster/stratum | Not as a random effect |
The appropriate approach depends on the scientific question and the structure of the clustering.
Frailty Versus Stratification
Suppose a multicenter clinical trial contains 50 sites. A stratified Cox model can allow each site to have its own baseline hazard.
A shared frailty model instead treats site-specific risk as arising from a distribution of latent effects.
Conceptually:
When Is a Frailty Model Especially Useful?
Frailty models are particularly useful when:
- Clusters are naturally defined by the study design.
- There are multiple individuals per cluster.
- Unobserved cluster-level heterogeneity is scientifically plausible.
- The number of clusters is sufficiently informative for estimating a variance component.
- The investigator wants to quantify residual heterogeneity rather than only correct standard errors.
A Clinical Trial Example
Consider a multicenter oncology trial in which patients are followed for progression-free survival.
Patients are enrolled at 30 clinical sites. Some sites may systematically enroll patients with more advanced disease or have different treatment-management practices.
Even after adjusting for measured baseline prognostic factors, patients treated within the same site may have correlated survival outcomes.
| Variable | Description |
|---|---|
| Time | Progression-free survival time |
| Status | 1 = progression/death, 0 = censored |
| Treatment | Experimental versus control |
| Age | Baseline age |
| ECOG | Baseline performance status |
| Site | Clinical center |
A shared site frailty model can be written:
Here \(u_j\) captures unobserved site-level variation in progression risk.
Interpreting the Clinical Trial Model
Suppose the treatment coefficient is:
Then:
Conditional on the site frailty and the other covariates, the estimated hazard of progression or death is approximately 30% lower in the experimental treatment group.
The frailty variance separately quantifies residual variation among clinical sites.
What Does a High-Frailty Site Mean?
Suppose two otherwise similar patients belong to different sites.
If:
then site A has twice the multiplicative frailty of site B:
Conditional on the same observed covariates and baseline hazard, the instantaneous hazard associated with site A is therefore twice that associated with site B.
Frailty and the Intracluster Association
The frailty variance can be related to the degree of dependence among survival times within a cluster.
For gamma frailty, a commonly used measure is the intracluster dependence parameter:
Larger values indicate stronger residual dependence generated by shared unobserved heterogeneity.
The exact interpretation of a correlation coefficient for censored survival outcomes requires care because survival data are not simply continuous Gaussian observations. Therefore, the frailty variance is usually preferable to treating it as an ordinary Pearson correlation.
Marginal Survival Under Gamma Frailty
One of the useful mathematical properties of gamma frailty is that integrating over the frailty distribution produces a closed-form marginal survival expression under the standard shared-frailty formulation.
Let the conditional cumulative hazard be:
Then the conditional survival function is:
Integrating over a gamma frailty distribution produces a marginal survival function that differs from the conditional survival function.
Frailty Selection Over Time
Frailty models have an important survival-selection interpretation.
Suppose a population contains both high-risk and low-risk clusters.
High-frailty individuals or clusters tend to experience events earlier. As time progresses, the individuals who remain event-free become increasingly enriched for lower frailty.
Therefore, the average frailty among survivors can decrease over time even when the underlying conditional model has a proportional hazards structure.
Shared Versus Nested Frailty
Some studies contain more than one clustering level.
For example, patients may be nested within physicians and physicians may be nested within hospitals.
A hierarchical frailty model can include multiple random effects:
where one frailty may represent a hospital-level effect and another a physician-level effect.
The exact specification depends on the nesting structure and the software used.
Frailty for Recurrent Events
Frailty is also useful when multiple events belong to the same subject.
For example, a patient may experience repeated disease exacerbations. The patient-specific frailty captures persistent differences in event propensity that are not fully explained by measured covariates.
A simplified formulation is:
Here the frailty is shared across recurrent events from the same individual.
R Implementation
The survival package provides a convenient way to fit
shared frailty models using the Cox model framework.
Suppose the dataset is called trial and contains:
time— survival timestatus— event indicatortreatment— treatment groupage— agesite— clinical site
library(survival) fit <- coxph( Surv(time, status) ~ treatment + age + frailty(site), data = trial ) summary(fit)
The frailty(site) term introduces a shared random effect
for patients belonging to the same site.
Gamma Frailty in R
The classical specification uses gamma frailty:
fit_gamma <- coxph(
Surv(time, status) ~ treatment + age +
frailty(site, distribution = "gamma"),
data = trial
)
summary(fit_gamma)
The estimated frailty variance provides information about residual between-site heterogeneity.
Log-Normal Frailty in R
A log-normal frailty model can also be considered:
fit_lognormal <- coxph(
Surv(time, status) ~ treatment + age +
frailty(site, distribution = "gaussian"),
data = trial
)
summary(fit_lognormal)
The exact interpretation of the random-effect variance differs from the gamma parameterization, so the numerical estimates should not be compared directly without accounting for the scale.
Extracting the Model Results
summary(fit_gamma) coef(fit_gamma) exp(coef(fit_gamma))
For fixed effects, exponentiating the coefficient gives the estimated conditional hazard ratio.
For example:
hr_treatment <- exp(coef(fit_gamma)["treatment"]) hr_treatment
A More Flexible Frailty Model with coxme
For more complex mixed-effects Cox models, the
coxme package provides a dedicated framework for
Cox mixed-effects models.
library(coxme)
fit_coxme <- coxme(
Surv(time, status) ~
treatment + age + (1 | site),
data = trial
)
summary(fit_coxme)
The notation:
(1 | site)
represents a random intercept for site.
This makes the relationship between frailty models and mixed-effects models particularly clear: the frailty is effectively a random effect acting on the survival hazard scale.
Nested Random Effects
Suppose patients are nested within physicians and physicians are nested within hospitals. A more complex model could conceptually contain:
coxme(
Surv(time, status) ~
treatment + age +
(1 | hospital/physician),
data = trial
)
The exact syntax and supported structures should be verified against the software version being used, especially for production analyses.
Model Comparison
Researchers may compare models with and without frailty to determine whether the additional random effect materially improves the model.
For example:
fit_no_frailty <- coxph(
Surv(time, status) ~ treatment + age,
data = trial
)
fit_frailty <- coxph(
Surv(time, status) ~ treatment + age +
frailty(site),
data = trial
)
AIC(fit_no_frailty, fit_frailty)
Information criteria can help with model comparison, but the decision should not be based on AIC alone.
Testing Whether Frailty Is Needed
A natural question is whether the estimated frailty variance is meaningfully different from zero.
This is not always a straightforward ordinary Wald test because a variance parameter lies on the boundary of its parameter space.
Therefore, naive application of standard large-sample tests can be misleading. Likelihood-based comparisons, simulation, or other methods appropriate to the specific model may be preferable.
Diagnostics for Frailty Models
Frailty models require many of the same diagnostic considerations as ordinary survival models, but there are additional questions concerning the random effect.
Useful checks include:
- Proportional hazards assumptions for fixed effects
- Functional form of continuous covariates
- Influential clusters
- Number and size of clusters
- Estimated frailty variance
- Sensitivity to the assumed frailty distribution
- Model convergence
- Potentially extreme estimated random effects
Checking the Proportional Hazards Assumption
Frailty does not automatically solve violations of proportional hazards.
For a standard Cox model, one common diagnostic is:
cox.zph(fit_no_frailty)
For more complex mixed-effects survival models, diagnostic strategies may depend on the software and model formulation.
Influential Clusters
A single cluster containing many observations can exert substantial influence on the estimated frailty distribution and fixed effects.
For example, if one clinical site enrolls 30% of the entire study population, that site may have disproportionate influence on the estimated random-effect variance.
Investigators should therefore examine cluster sizes and consider sensitivity analyses when unusually large or unusual clusters exist.
Small Numbers of Clusters
Frailty models are most naturally motivated when there is meaningful replication across clusters.
If there are only a handful of clusters, estimating a population-level variance component can be unstable.
For example, a trial with only three hospitals provides very limited information about the distribution of hospital-level frailty.
Large Versus Small Clusters
Both the number of clusters and the number of observations within each cluster matter.
| Structure | Main Consideration |
|---|---|
| Many clusters, few subjects each | Good information about between-cluster variation, but cluster effects may be weakly estimated individually |
| Few clusters, many subjects each | Individual cluster effects may be well informed, but population-level variance estimation can be unstable |
| Many clusters, many subjects each | Generally favorable for estimating heterogeneity and fixed effects |
Gamma Versus Log-Normal: A Sensitivity Analysis
Because frailty is unobserved, its distribution is not directly testable in the same way as an observed variable.
A useful sensitivity analysis can therefore compare reasonable frailty distributions.
If the treatment conclusion changes substantially, the dependence on the assumed frailty distribution should be discussed.
Frailty Models and Missing Covariates
Frailty should not be viewed as a substitute for important measured covariates.
Suppose site quality is strongly related to patient prognosis and is only partly captured by the measured variables. A frailty term may absorb some residual variation.
But if an important prognostic factor is known and measured, it should generally be included in the model when scientifically appropriate.
Frailty Models in Multicenter Clinical Trials
The use of site frailty in randomized clinical trials requires particular care.
Randomization generally protects treatment assignment from systematic confounding under the trial design, but clustering can still affect precision and modeling.
Whether site should be modeled as a frailty, fixed effect, stratification factor, or through robust inference depends on:
- The number of sites
- Patients per site
- The role of site in randomization
- Site heterogeneity
- The prespecified statistical analysis plan
- The estimand of interest
Frailty and the Estimand
The choice of frailty model should be connected to the scientific estimand.
For example, an investigator may want to estimate the treatment effect conditional on the latent cluster structure, or may instead want a population-average effect.
These are not necessarily the same target.
Complete R Example
The following example illustrates a typical workflow.
library(survival)
# Standard Cox model
fit_cox <- coxph(
Surv(time, status) ~ treatment + age + ecog,
data = trial
)
summary(fit_cox)
# Shared gamma frailty for site
fit_gamma <- coxph(
Surv(time, status) ~
treatment + age + ecog +
frailty(site, distribution = "gamma"),
data = trial
)
summary(fit_gamma)
# Extract treatment hazard ratio
exp(coef(fit_gamma)["treatment"])
The analysis can then be extended with sensitivity analyses and diagnostic checks.
Worked Interpretation
Suppose the fitted model produces the following conceptual results:
| Quantity | Estimate | Interpretation |
|---|---|---|
| Treatment HR | 0.72 | Lower conditional hazard under experimental treatment |
| 95% CI | 0.58–0.90 | Evidence compatible with a treatment-associated reduction |
| Frailty variance | 0.35 | Meaningful residual site-level heterogeneity |
A suitable narrative might be:
After adjustment for the prespecified covariates and shared site-level frailty, the estimated hazard ratio for the experimental treatment was 0.72, indicating an estimated 28% lower conditional hazard of the event compared with control. The nonzero frailty variance indicated residual heterogeneity among clinical sites.
Common Mistakes
- Ignoring clustering. Patients within the same site, family, or subject may not provide independent survival information.
- Assuming frailty is the same as a fixed cluster effect. A frailty model treats cluster effects as draws from a population distribution.
- Interpreting the frailty variance as an ordinary correlation. The relationship between random-effect variance and dependence in survival data is more complicated than Pearson correlation.
- Using frailty to replace important covariates. Frailty captures residual heterogeneity but does not automatically remove confounding.
- Ignoring the number of clusters. A small number of clusters can make variance-component estimation unstable.
- Assuming the fixed-effect hazard ratio is marginal. Conditional and marginal effects can differ.
- Ignoring the proportional hazards assumption. Frailty does not automatically fix time-varying treatment effects.
- Comparing gamma and log-normal variance estimates directly. Their variance parameters are on different scales.
- Reporting only the treatment hazard ratio. A frailty analysis should also document the clustering structure and heterogeneity component.
- Using a complex frailty structure without justification. Random effects should correspond to a meaningful clustering structure and be supported by the available data.
A Practical Frailty-Model Workflow
What Should Be Reported in a Statistical Analysis Plan?
A clinical trial or observational survival analysis using frailty should clearly document:
- The clustering variable
- The scientific rationale for clustering
- The estimand
- The fixed-effect covariates
- The frailty distribution
- The random-effect structure
- The software and procedure used
- The method for estimating the variance component
- Handling of sparse clusters
- Approach to missing data
- Proportional hazards diagnostics
- Sensitivity analyses
- Interpretation of the treatment effect
Reporting a Frailty Analysis
A concise results table might look like:
| Parameter | Estimate | 95% CI / SE |
|---|---|---|
| Treatment hazard ratio | 0.72 | 0.58–0.90 |
| Age hazard ratio | 1.02 | 1.01–1.03 |
| ECOG hazard ratio | 1.45 | 1.20–1.76 |
| Frailty variance | 0.35 | Model-based estimate |
The report should state that the hazard ratios are interpreted conditional on the frailty structure rather than presenting them as automatically marginal effects.
When a Frailty Model May Not Be the Best Choice
Frailty is powerful, but it is not universally appropriate.
Another method may be preferable when:
- The number of clusters is extremely small.
- The scientific objective requires a population-average effect.
- Cluster-specific baseline hazards are more appropriate than a shared random-effect distribution.
- A robust sandwich approach is sufficient for the inferential goal.
- The clustering structure is not scientifically meaningful.
- The model becomes too complex for the available information.
Frailty Models Versus Alternative Approaches
| Method | Best Conceptual Use |
|---|---|
| Shared frailty | Model latent cluster-level heterogeneity |
| Cluster-robust Cox model | Robust inference under within-cluster dependence |
| Stratified Cox model | Allow different baseline hazards across known strata |
| Fixed cluster effects | Estimate cluster-specific effects when cluster levels themselves are of interest |
| Marginal survival models | Target population-average effects |
The Most Important Concept
A frailty model is best understood as a survival model with an unobserved random effect.
The random effect captures persistent differences in event risk between clusters that are not explained by the observed covariates.
For a shared frailty model:
The observed covariates explain systematic differences between individuals, while \(u_j\) captures residual differences between clusters.
This produces three central components:
- Fixed effects describe observed covariate associations.
- Frailty describes unobserved cluster-level heterogeneity.
- Survival dependence arises because members of the same cluster share the same latent frailty.
References
Vaupel, J.W., Manton, K.G. & Stallard, E. (1979).
The impact of heterogeneity in individual frailty on the dynamics of
mortality.
Demography, 16, 439–454.
Clayton, D.G. (1978).
A model for association in bivariate life tables and its application
in epidemiological studies of familial tendency in chronic disease incidence.
Biometrika, 65, 141–151.
Hougaard, P. (2000).
Analysis of Multivariate Survival Data.
Springer.
Therneau, T.M. & Grambsch, P.M. (2000).
Modeling Survival Data: Extending the Cox Model.
Springer.
Wienke, A. (2011).
Frailty Models in Survival Analysis.
Chapman & Hall/CRC.
Duchateau, L. & Janssen, P. (2008).
The Frailty Model.
Springer.