Why a Shared Random Intercept Creates Similarity
In clustered data, two observations from the same clinic, classroom, or other group may resemble one another because they share a cluster-level condition. A Gaussian random-intercept model represents one source of that resemblance with a shared cluster-specific deviation. The intraclass correlation coefficient (ICC) summarizes the marginal correlation between two distinct outcomes in the same cluster under this model.
The ICC is not the correlation between a response and its fitted value, nor is it the correlation of residuals after conditioning on the random intercept. It is a property of the model’s marginal outcome distribution: it compares the covariance induced by the shared random intercept with the total outcome variability.
Model and Assumptions
Let \(Y_{ij}\) be the continuous outcome for observation \(i\) in cluster \(j\), and let \(\mathbf{x}_{ij}\) be its fixed-effect covariate vector. The Gaussian random-intercept model is
Here \(\boldsymbol{\beta}\) is the vector of fixed-effect coefficients, \(b_j\) is the random intercept for cluster \(j\), and \(\varepsilon_{ij}\) is the observation-level residual. For the derivation below, assume
- \(b_j\sim N(0,\tau^2)\), independently across clusters;
- \(\varepsilon_{ij}\sim N(0,\sigma^2)\), independently across observations;
- all residuals are independent of all random intercepts; and
- \(\tau^2\geq 0\), \(\sigma^2\geq 0\), with fixed covariates treated as nonrandom for this calculation.
The fixed part \(\mathbf{x}_{ij}^{\mathsf T}\boldsymbol{\beta}\) can differ across observations. The random intercept is shared by every observation in a cluster, while each observation has its own residual. The model also assumes that, after accounting for the fixed effects and random intercept, there is no additional residual correlation within a cluster.
Deriving the ICC
Write \(\mu_{ij}=\mathbf{x}_{ij}^{\mathsf T}\boldsymbol{\beta}\). Conditional on \(b_j\), the outcome has mean \(\mu_{ij}+b_j\) and variance \(\sigma^2\). For two distinct observations \(i\) and \(k\) in cluster \(j\), their residuals are conditionally independent under the assumptions. The marginal covariance follows from the law of total covariance:
The fixed means are constants in this calculation, and the two outcomes share the same \(b_j\). For either observation, the law of total variance gives
The same marginal variance applies to \(Y_{kj}\). Therefore, if \(\tau^2+\sigma^2>0\), their correlation is their covariance divided by the product of their standard deviations:
This derivation also explains why the ICC is sometimes described as the proportion of marginal variance attributable to between-cluster variation. The numerator is the variance of the shared random intercept; the denominator is the sum of that variance and the residual variance. This description is specific to the stated model and its variance decomposition.
Worked Example: Calculating and Interpreting an ICC
Suppose a hypothetical continuous-outcome analysis estimates a cluster-intercept variance of \(\tau^2=9\) score-points squared and a residual variance of \(\sigma^2=16\) score-points squared. Calculate the ICC and interpret it.
The marginal variance of one outcome is
The covariance for two distinct observations in the same cluster is \(9\text{ score-points}^2\). Thus
Under this model, two distinct outcomes in the same cluster have marginal correlation \(0.360\). The model attributes \(36\%\) of the marginal outcome variance to between-cluster variation in the random intercept. It does not mean that 36% of an individual score is caused by cluster membership.
Worked Example: Covariance Within and Across Clusters
Consider a hypothetical model for a measurement in units \(u\), with \(\tau^2=4\,u^2\) and \(\sigma^2=6\,u^2\). For simplicity, suppose three observations share the same fixed mean. Find their marginal covariance matrix and the within-cluster correlation.
Each marginal variance is \(4+6=10\,u^2\). Each pair of distinct observations in this cluster shares the random intercept, so its covariance is \(4\,u^2\). The covariance matrix is therefore
For any distinct pair, the correlation is
If the model’s independent-cluster assumption holds, observations from different clusters have covariance zero. Their fixed means may differ, but distinct fixed means do not themselves create covariance.
Boundary Cases and Conditional Residuals
Variance components can lie on the boundary of their allowed range, so the formula’s denominator and the interpretation of correlation need checking. If \(\sigma^2>0\), the residuals are conditionally independent and have correlation zero. If \(\sigma^2=0\), each residual is degenerate at zero, and its correlation is undefined, not zero: a constant random variable has zero variance, so the correlation denominator is zero.
For the marginal outcomes, if \(\tau^2=0\) and \(\sigma^2>0\), the ICC is \(0\): there is no shared random-intercept variation. If \(\sigma^2=0\) and \(\tau^2>0\), the ICC is \(1\): after subtracting their fixed means, outcomes in the same cluster are identical because they share \(b_j\). If both variance components are zero, the marginal outcome variance is zero, so the outcome correlation and ICC are undefined.
Worked Example: Checking the Variance Boundaries
Suppose three hypothetical settings have the following variance components, in squared outcome units. Determine the ICC wherever it is defined and state whether the conditional residual correlation is defined.
Setting A: \(\tau^2=0\), \(\sigma^2=25\). The marginal variance is \(25>0\), so
Here \(\sigma^2>0\), so the conditionally independent residuals have correlation zero.
Setting B: \(\tau^2=4\), \(\sigma^2=0\). The marginal variance is \(4>0\), so
The residuals are all degenerate at zero, so their correlation is undefined. The marginal outcomes within a cluster, after subtracting their fixed means, are perfectly correlated through the shared random intercept.
Setting C: \(\tau^2=0\), \(\sigma^2=0\). The marginal variance is zero. The expression for the ICC has denominator zero, so the ICC is undefined; there is no outcome variation from which to define a correlation.
Interpretation, Alternatives, and Model Checks
The ICC is a concise summary of within-cluster similarity under the random-intercept model. It is useful when the question concerns how strongly outcomes from the same cluster are associated relative to the model’s total outcome variation. A high ICC indicates that the shared cluster component accounts for a substantial fraction of that variation; a low ICC indicates that the residual component is larger relative to the shared component.
The ICC is not the only way to describe clustering. The pairwise covariance \(\tau^2\) is in squared outcome units and gives the absolute shared variation; the ICC is dimensionless and expresses that covariance relative to total variance. Reporting both can be informative because the same ICC can arise from very different total variances. The variance components themselves also retain their distinct roles: \(\tau^2\) describes between-cluster intercept variation, while \(\sigma^2\) describes observation-level residual variation.
Before interpreting an ICC, check whether the model’s assumptions are plausible. In particular, look for remaining patterns in residuals within clusters, unequal residual spread, and clusters whose outcomes show structure not captured by a single shared intercept. If repeated observations have additional time-related dependence, for example, the independent-residual assumption may fail. A random-intercept ICC then describes only the dependence represented by that model and may not capture the full correlation pattern.
A common mistake is to say, “The conditional residual correlation is zero, so the ICC is zero.” These are different quantities. When \(\sigma^2>0\), conditional residual correlation is zero under the model, but the marginal outcome ICC can be positive because two outcomes share \(b_j\). When \(\sigma^2=0\), the conditional residual correlation is undefined rather than zero. Another mistake is to treat the ICC as a causal effect or as a universal measure of similarity independent of model assumptions. It is a model-based correlation, not evidence that being in a particular cluster causes an outcome.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A hypothetical model has \(\tau^2=5\) and \(\sigma^2=20\), in squared measurement units. Find the ICC and state its interpretation.
- For two distinct observations in the same cluster, what are their model-based covariance and marginal variance if \(\tau^2=3\) and \(\sigma^2=9\)?
- If \(\tau^2=7\) and \(\sigma^2=0\), what is the ICC, and is the conditional residual correlation zero or undefined?
- Why can a positive marginal ICC coexist with zero conditional residual correlation?
- Name one feature of the data that could make the random-intercept ICC an incomplete description of within-cluster dependence.
Solutions. (1) \(\operatorname{ICC}=5/(5+20)=0.200\). Under the model, two distinct outcomes in the same cluster have marginal correlation \(0.200\), and 20% of marginal variance is assigned to the random intercept. (2) Their covariance is \(\tau^2=3\) squared units, and each marginal variance is \(3+9=12\) squared units. (3) The marginal variance is positive and \(\operatorname{ICC}=7/(7+0)=1\). The conditional residual correlation is undefined because residuals are degenerate at zero. (4) Conditional residual correlation concerns the residuals after conditioning on the random intercept; marginal outcome correlation includes the shared \(b_j\), which contributes covariance \(\tau^2\). (5) For example, residual dependence across time within a cluster would violate the independent-residual assumption and could require a richer correlation structure.