Confidence intervals for two-sided tests on correlation coefficients.
Confidence intervals for two-sided tests on correlation coefficients.
The twopcor function tests whether the difference between two Pearson correlations is 0. The twocor function performs the same test on a robust correlation coefficient (percentage bend correlation or Winsorized correlation).
corfun: Either "pbcor" for percentage based correlation or "wincor" for Winsorized correlation.
tr: amount of Winsorization.
beta: bending constant.
...: currently ignored.
Details
It is tested whether the first correlation coefficient (based on x1 and y1) equals to the second correlation coefficient (based on x2 and y2). Both approaches return percentile bootstrap CIs.
Returns
twopcor and twocor return an object of class "twocor" containing:
r1: robust correlation coefficient
r2: value of the test statistic
ci: confidence interval
p.value: p-value
call: function call
References
Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.