r.bw | R Documentation |
Calculates biweight midvariance if one variable is given and biweight midvariances, midcovariance and midcorrelation if two variables are given. Biweight midcorrelation is a robust alternative to Pearson's r.
r.bw(X, Y=NULL)
X |
A numeric vector |
Y |
An optional second numeric variable. |
Biweight statistics are robust to violations of normality. Like the sample median the sample midvariance has a breakdown point of approximately 0.5. The triefficiency of the biweight midvariance was the highest for any of the 150 measures of scale compared by Lax (1985).
Returns the biweight variance if one variable is given, and the biweight midvariances, midcovariance and midcorrelation if two variables are given.
Ken Aho
Lax, D. A. (1985) Robust estimators of scale: finite sample performance in long-tailed symmetric distributions. Journal of the American Statistical Association, 80 736-741.
Wilcox, R. R. (2005) Introduction to Robust Estimation and Hypothesis Testing, Second Edition. Elsevier, Burlington, MA.
cor
, r.pb
x<-rnorm(100)
y<-rnorm(100)
r.bw(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.