Estimates the variance of Spearman rank correlations () using the Fieller correction.
var_error_spearman(r, n, correct_bias = TRUE)
A vector of sampling-error variances.
Vector of rank correlations.
Vector of sample sizes.
Logical argument that determines whether to correct error-variance estimates for small-sample bias in correlations (TRUE
) or not (FALSE
).
The sampling variance of a Spearman rank correlation is approximately:
var_e=1.06 (1-r^2)^2n-1var_e = 1.06 * (1 - r^2)^2 / (n - 1)
This can be corrected for bias in the sample correlation by first correcting the correlation (see correct_r_bias()
) prior to estimating the error variance.
Bishara, A. J., & Hittner, J. B. (2017). Confidence intervals for correlations when data are not normal. Behavior Research Methods, 49(1), 294–309. tools:::Rd_expr_doi("10.3758/s13428-016-0702-8")
var_error_spearman(r = .3, n = 30, correct_bias = TRUE)
var_error_spearman(r = .3, n = 30, correct_bias = FALSE)
Run the code above in your browser using DataLab