
Sample size for a correlation confidence interval of given width
Source:R/correlation_width_sample_size.R
corwsn.RdBonett & Wright (2000): the interval tanh(atanh(theta) -/+ z c / sqrt(n - b)) with b = 3, c = 1 (Pearson); b = 3, c^2 = 1 + theta^2 / 2 (Spearman); b = 4, c^2 = 0.437 (Kendall tau-a). approach = "exact" returns the smallest n whose width is at most width; "two-stage" their approximation n0 = 4 c^2 (1 - theta^2)^2 (z / w)^2 + b, n = ceiling((n0 - b) (w0 / w)^2 + b). The exact search reproduces 67 of the 72 entries of Hedderich, Sachs & Reynarowych (2023, Table 7.85).