Skip to contents

rho0 = 0: t = r sqrt((n - 2) / (1 - r^2)) on n - 2 df (cor.test, eq 7.389); "fisher": z = (atanh(r) - atanh(rho0)) sqrt(n - 3) (eq 7.399); "samiuddin": t = (r - rho0) sqrt(n - 2) / sqrt((1 - r^2)(1 - rho0^2)) on n - 2 df (eq 7.393).

Usage

corrho(r, n, rho0 = 0, alternative = "two-sided", method = "fisher")

Arguments

r

Sample correlation.

n

Number of pairs.

rho0

Hypothesised correlation.

alternative

"two-sided", "greater" or "less".

method

"fisher" or "samiuddin".

Value

Named list: statistic, p_value, distribution, df, method, r, n, rho0.

References

Samiuddin, M. (1970). Biometrika 57, 461-464. Hedderich, Sachs & Reynarowych (2023), eqs (7.389), (7.393), (7.399).

Examples

corrho(0.966, 14, 0.8)$statistic
#> [1] 3.084745