Abstract
Accurate statistical inference for clustered data-common in multi-center clinical trials and longitudinal studies-poses significant challenges due to within-cluster correlation. Rank-based tests like the logrank, Wilcoxon, and Datta-Satten are valued for robustness but often suffer inflated Type I error rates under standard asymptotic approximations. While exact permutation tests offer theoretical accuracy, they are computationally impractical for large datasets, highlighting a methodological gap. This paper proposes a double saddlepoint approximation framework to deliver accurate p-values and confidence intervals for a wide class of rank-based tests. The method is built on a novel permutation distribution reformulation via block urn design, which preserves cluster integrity. This reformulation enables the test statistic's distribution to be represented as a sum of independent conditional random variables, from which a joint cumulant generating function can be derived for saddlepoint computation. The approach supports analyses with right-censored survival data and tied ranks. Extensive simulations confirm that the saddlepoint method accurately controls Type I error rates, performing identically to permutation-based benchmarks but with a vast reduction in computational cost. A case study on clinical trial data demonstrates the practical importance of this accuracy, showing how our approach avoids a potential false-positive conclusion reported by the standard asymptotic method. Ultimately, this research provides biostatisticians with a tool that is at once practical, efficient, and statistically rigorous for analyzing clustered data.