Skip to contents

Bonett & 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).

Usage

corwsn(
  theta,
  width,
  method = c("pearson", "spearman", "kendall"),
  conf_level = 0.95,
  approach = c("exact", "two-stage")
)

Arguments

theta

Planning value of the correlation.

width

Required width.

method

"pearson", "spearman" or "kendall".

conf_level

Confidence level.

approach

"exact" or "two-stage".

Value

Named list: n, width_at_n.

References

Bonett, D. G. & Wright, T. A. (2000). Psychometrika 65, 23-28.

Examples

corwsn(0.5, 0.2, "spearman")$n
#> [1] 246