|
|
|
 | :: Kendall tau Correlation Matrix - Free Statistics Software (Calculator) :: | |
|
All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.
This free online software (calculator) computes the (multivariate) correlation plot based on Kendall tau rank correlations. The diagonal of the matrix displays the histogram of each data series. The upper half of the matrix contains the scatterplots (and smooth curve) for every combination of pairs of data series. In the lower half of the matrix a number is displayed that represents the p-value of the Kendall tau rank correlation. For every scatterplot (in the upper half) there is a corresponding p-value in the lower half. The name of each row/column of the matrix is displayed on the diagonal (above the histogram).
This software module can be used to quickly identify and explore associations between the variables in a multivariate dataset. We use Kendall tau rank correlations because they have desirable properties (such as robustness) compared to other types of correlation (Spearman rank correlation or Pearson correlation).
For an in-depth comparison between various types of correlation see: Arndt, S., Turvey, C., Andreasen, N. (1999), Correlating and predicting psychiatric symptom ratings:Spearmans r versus Kendalls tau correlation, Journal of Psychiatric Research, 33, 97-104
Click here to edit the underlying code of this R Module.Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits! Click here to edit the underlying code of this R Module.
| Source code of R module | | 1 | panel.tau <- function(x, y, digits=2, prefix="", cex.cor) | | 2 | { | | 3 | usr <- par("usr"); on.exit(par(usr)) | | 4 | par(usr = c(0, 1, 0, 1)) | | 5 | rr <- cor.test(x, y, method="kendall") | | 6 | r <- round(rr$p.value,2) | | 7 | txt <- format(c(r, 0.123456789), digits=digits)[1] | | 8 | txt <- paste(prefix, txt, sep="") | | 9 | if(missing(cex.cor)) cex <- 0.5/strwidth(txt) | | 10 | text(0.5, 0.5, txt, cex = cex) | | 11 | } | | 12 | panel.hist <- function(x, ...) | | 13 | { | | 14 | usr <- par("usr"); on.exit(par(usr)) | | 15 | par(usr = c(usr[1:2], 0, 1.5) ) | | 16 | h <- hist(x, plot = FALSE) | | 17 | breaks <- h$breaks; nB <- length(breaks) | | 18 | y <- h$counts; y <- y/max(y) | | 19 | rect(breaks[-nB], 0, breaks[-1], y, col="grey", ...) | | 20 | } | | 21 | bitmap(file="test1.png") | | 22 | pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main) | | 23 | dev.off() | | 24 | load(file="createtable") | | 25 | a<-table.start() | | 26 | a<-table.row.start(a) | | 27 | a<-table.element(a,"Kendall tau rank correlations for all pairs of data series",3,TRUE) | | 28 | a<-table.row.end(a) | | 29 | a<-table.row.start(a) | | 30 | a<-table.element(a,"pair",1,TRUE) | | 31 | a<-table.element(a,"tau",1,TRUE) | | 32 | a<-table.element(a,"p-value",1,TRUE) | | 33 | a<-table.row.end(a) | | 34 | n <- length(y[,1]) | | 35 | n | | 36 | cor.test(y[1,],y[2,],method="kendall") | | 37 | for (i in 1:(n-1)) | | 38 | { | | 39 | for (j in (i+1):n) | | 40 | { | | 41 | a<-table.row.start(a) | | 42 | dum <- paste("tau(",dimnames(t(x))[[2]][i]) | | 43 | dum <- paste(dum,",") | | 44 | dum <- paste(dum,dimnames(t(x))[[2]][j]) | | 45 | dum <- paste(dum,")") | | 46 | a<-table.element(a,dum,header=TRUE) | | 47 | r <- cor.test(y[i,],y[j,],method="kendall") | | 48 | a<-table.element(a,r$estimate) | | 49 | a<-table.element(a,r$p.value) | | 50 | a<-table.row.end(a) | | 51 | } | | 52 | } | | 53 | a<-table.end(a) | | 54 | table.save(a,file="mytable.tab") |
|
| Cite this software as: | | Wessa P., (2008), Multivariate Correlation Matrix (v1.0.4) in Free Statistics Software (v1.1.23-r5), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ | | | The R code is based on : | | | Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988), The New S Language, Wadsworth & Brooks/Cole.
| | | | | | | | | | | | | |
|
To cite Wessa.net in publications use: Wessa, P. (2010), Free Statistics Software, Office for Research Development and Education, version 1.1.23-r5, URL http://www.wessa.net/
© Resa
R&D, and the 'Office for Research, Development, and Education' - All rights reserved. Academic license for non-commercial use only.
This website is an intellectual
and physical property of Resa R&D. This includes: html content,
graphical illustrations (gif files), computer software, online or electronic
documentation, associated media, and printed materials. The free use of the scientific content, services, and applications in this website is
granted for non commercial use only. In any case,
the source (url) should always be clearly displayed. Under no circumstances are
you allowed to reproduce, copy or redistribute the design, layout, or any
content of this website (for commercial use) including any materials contained
herein without the express written permission of Resa R&D or the Office for Research, Development, and Education.
Information provided
on this web site is provided "AS IS" without warranty of any kind, either
express or implied, including, without limitation, warranties of
merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information
and periodically update the information, and software without notice. However, Resa
R&D makes no warranties or representations
as to the accuracy or completeness of such information (or software), and it assumes no
liability or responsibility for errors or omissions in the content of this web
site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and
under no legal theory shall Resa R&D be liable to you or any other
person for any direct, indirect, special, incidental, exemplary, or
consequential damages arising from your access to, or use of, this web site.
Software Version : 1.1.23-r5 Algorithms & Software : Prof. dr. P. Wessa Facilities : Resa R&D - Office for Research, Development, and Education Server : www.wessa.net
Comments, Feedback & Errors | Privacy Policy | Statistics Resources | Wessa.net Home
|
|
|
|
|
|
|
|