Correlation and Regression
Estimate the sample size required to detect a non-zero Spearman rank correlation with a specified power and significance level. The calculation follows the PASS Spearman's Rank Correlation Tests framework: bivariate normal simulation under the alternative hypothesis, Spearman rank correlation, and the corresponding correlation t-test.
This calculator follows the methodology documented for PASS's Spearman's Rank Correlation Tests (Simulation) procedure. The null hypothesis is that the population Spearman rank correlation is zero, while the alternative hypothesis is that it is non-zero. PASS uses Monte Carlo simulation to estimate power under the alternative and significance level under the null.
For each simulated sample, the observations are converted to ranks, with tied observations receiving average ranks. Spearman's rank correlation is then the ordinary Pearson correlation calculated between the two rank variables.
PASS states that the t-test approximation is recommended when N ≥ 19. For a two-sided test, a simulated sample is counted as a rejection when the absolute value of the resulting t-statistic exceeds the two-sided Student t critical value at the specified α level.
Under the alternative hypothesis, the calculator generates paired observations from a bivariate normal distribution having the specified Pearson correlation ρ1. It then computes Spearman's rank correlation for each simulated sample and applies the test statistic above. Power is the proportion of simulated samples that reject the null.
The sample-size search begins at N = 19 and identifies the smallest evaluable N whose estimated power reaches the requested target. Because this is a Monte Carlo calculation, the estimated power has simulation variability. Increasing the number of simulations reduces that variability but increases computation time.
The correlation entered for the alternative is the Pearson correlation used to generate the bivariate-normal simulation population. As PASS notes, the corresponding Spearman correlation calculated from the ranks will generally differ slightly from the Pearson correlation used to generate the data.
If a dropout rate is specified, the evaluable sample size is inflated after the statistical calculation. The enrollment requirement is calculated as: