Between- and Within-Cluster Spearman Rank Correlations
- PMID: 39853810
- PMCID: PMC11758474
- DOI: 10.1002/sim.10326
Between- and Within-Cluster Spearman Rank Correlations
Abstract
Clustered data are common in practice. Clustering arises when subjects are measured repeatedly, or subjects are nested in groups (e.g., households, schools). It is often of interest to evaluate the correlation between two variables with clustered data. There are three commonly used Pearson correlation coefficients (total, between-, and within-cluster), which together provide an enriched perspective of the correlation. However, these Pearson correlation coefficients are sensitive to extreme values and skewed distributions. They also vary with data transformation, which is arbitrary and often difficult to choose, and they are not applicable to ordered categorical data. Current nonparametric correlation measures for clustered data are only for the total correlation. Here we define population parameters for the between- and within-cluster Spearman rank correlations. The definitions are natural extensions of the Pearson between- and within-cluster correlations to the rank scale. We show that the total Spearman rank correlation approximates a linear combination of the between- and within-cluster Spearman rank correlations, where the weights are functions of rank intraclass correlations of the two random variables. We also discuss the equivalence between the within-cluster Spearman rank correlation and the covariate-adjusted partial Spearman rank correlation. Furthermore, we describe estimation and inference for the three Spearman rank correlations, conduct simulations to evaluate the performance of our estimators, and illustrate their use with data from a longitudinal biomarker study and a clustered randomized trial.
Keywords: clustered data; nonparametric correlation measures; rank association measures.
© 2025 The Author(s). Statistics in Medicine published by John Wiley & Sons Ltd.
Conflict of interest statement
The authors declare no conflicts of interest.
Figures




References
-
- Snijders T. and Bosker R., Multilevel Analysis: An Introduction to Basic and Advanced Multilevel Modeling (London: Sage Publishers, 1999).
-
- Ferrari P., Al‐Delaimy W. K., Slimani N., et al., “An Approach to Estimate Between‐ and Within‐Group Correlation Coefficients in Multicenter Studies: Plasma Carotenoids as Biomarkers of Intake of Fruits and Vegetables,” American Journal of Epidemiology 162, no. 6 (2005): 591–598. - PubMed
-
- Spearman C., “The Proof and Measurement of Association between Two Things,” Journal of Psychopathology and Clinical Science 15, no. 1 (1904): 72–101.
-
- Kendall M. G., “A New Measure of Rank Correlation,” Biometrika 30, no. 1–2 (1938): 81–89.
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources