r.pb {asbio} | R Documentation |
The percentage bend correlation is a robust alternative to Pearson's product moment correlation.
r.pb(X, Y, beta = 0.2)
X |
A quantitative vector |
Y |
A second quantitative vector |
beta |
Bend criterion |
The percentage bend correlation belongs to class of correlation measures which protect against marginal distribution (X and Y) outliers. In this way it is similar to Kendall's τ, Spearman's ρ, and biweight midcovariance. A second class of robust correlation measures which take in to consideration the overall structure of the data (O estimators) are discussed by Wilcox (2005, pg. 389). A value for the bend criterion beta
is required in the R.pb
function; beta
= 0.2 is recommended by Wilcox (2005).
A dataframe with the correlation, test statistic and P-value for the null hypothesis of independence are returned.
Ken Aho
Wilcox, R. R. (2005) Introduction to Robust Estimation and Hypothesis Testing, Second Edition. Elsevier, Burlington, MA.
x<-rnorm(100) y<-rnorm(100) r.pb(x,y)