Skip to contents

tanh(atanh(r) -/+ z_(1 - alpha/2) / sqrt(n - 3)) as cor.test (Hedderich, Sachs & Reynarowych 2023, eqs 6.151-6.154). method = "hotelling" uses Hotelling's (1953) correction z_H = z - (3 z + r) / (4 n) with standard error 1 / sqrt(n - 1) (eq 6.153).

Usage

corrci(r, n, conf_level = 0.95, method = c("fisher", "hotelling"))

Arguments

r

Sample correlation in (-1, 1).

n

Number of pairs (> 3).

conf_level

Confidence level.

method

"fisher" or "hotelling".

Value

Named list: lower, upper, z, se_z.

References

Hotelling, H. (1953). JRSS B 15, 193-232.

Examples

corrci(0.687, 50)[c("lower", "upper")]
#> $lower
#> [1] 0.5052731
#> 
#> $upper
#> [1] 0.8103824
#>