Diff for "FAQ/rankit" - CBU statistics Wiki
location: Diff for "FAQ/rankit"
Differences between revisions 6 and 7
Revision 6 as of 2013-01-07 12:16:07
Size: 1318
Editor: PeterWatson
Comment:
Revision 7 as of 2013-02-05 12:06:54
Size: 2216
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
__Reference__ Wilcox (1994) also suggested an alternative, the percentile-bend correlation, to the Pearson correlation which is less sensitive to outliers than the Pearson correlation. The percentile-bend correlation can be run in R and is available in the file Rallfun-v20.R written by Rand Wilcox (which is downloadable from [https://r-forge.r-project.org/scm/viewvc.php/pkg/R/Rallfun-v20.R?view=markup&root=wrs&pathrev=23 here] and can be added into a folder such as the R library (default folder) and into a R session via the source command. The pbcor function produces the correlation and the results of a significance test whilst the corb function produces a 95% confidence interval.

{{{
source("Rallfun-v20.R")
x <- c(2,3,1,2)
y <- c(1,5,4,3)
pbcor(x,y,beta=0.2)
corb(x,y,nbott=599)
}}}


__References__
Line 16: Line 27:

Wilcox RR (1994) The percentage bend correlation coefficient. ''Psychometrika'' '''59''' 601–616.

Rankit correlations

The rankit correlation is easily computed in any statistical package using a transform of the two variables being correlated and has been recommended by Bishara and Hittner (2012) when correlating data that is assymmetric or heavy tailed. They conclude that

"With most sample sizes (n > 20), Type I and Type II error rates were minimized by transforming the data to a normal shape prior to assessing the Pearson correlation. Among transformation approaches, a general purpose rank-based inverse normal transformation (i.e., transformation to rankit scores) was most beneficial. However, when samples were both small (n < 10) and extremely nonnormal, a permutation test often outperformed other alternatives, including various bootstrap tests."

The rankit transformation for x is of form

rankit(x) = $$\mbox{INV.NORMAL}(\frac{x - 0.5){n})$$

Wilcox (1994) also suggested an alternative, the percentile-bend correlation, to the Pearson correlation which is less sensitive to outliers than the Pearson correlation. The percentile-bend correlation can be run in R and is available in the file Rallfun-v20.R written by Rand Wilcox (which is downloadable from [https://r-forge.r-project.org/scm/viewvc.php/pkg/R/Rallfun-v20.R?view=markup&root=wrs&pathrev=23 here] and can be added into a folder such as the R library (default folder) and into a R session via the source command. The pbcor function produces the correlation and the results of a significance test whilst the corb function produces a 95% confidence interval.

source("Rallfun-v20.R")
x <- c(2,3,1,2)
y <- c(1,5,4,3)
pbcor(x,y,beta=0.2)
corb(x,y,nbott=599)

References

Bishara AJ and Hittner JB (2012) Testing the Significance of a Correlation With Nonnormal Data: Comparison of Pearson, Spearman, Transformation, and Resampling Approaches. Psychological Methods 17(3) 399-417. Note than a Pdf copy of this paper may be downloaded for free by CBSU users using the Psychnet weblink.

Wilcox RR (1994) The percentage bend correlation coefficient. Psychometrika 59 601–616.

  • [:FAQ/permy: The permutation test for a bivariate correlation is usable in R]

None: FAQ/rankit (last edited 2013-03-08 10:17:41 by localhost)