var_error_spearman: Estimate the error variance of Spearman rank correlations
Description
Estimates the variance of Spearman rank correlations (\(\rho\)) using the Fieller correction.
Usage
var_error_spearman(r, n, correct_bias = TRUE)
Value
A vector of sampling-error variances.
Arguments
r
Vector of rank correlations.
n
Vector of sample sizes.
correct_bias
Logical argument that determines whether to correct error-variance estimates for small-sample bias in correlations (TRUE) or not (FALSE).
Details
The sampling variance of a Spearman rank correlation is approximately:
$$var_{e}=\frac{1.06 \times (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.
References
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")