R version 2.6.0 (2007-10-03) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(0.9383 + ,90.8 + ,15 + ,467.037 + ,0.9217 + ,96.4 + ,3 + ,460.070 + ,0.9095 + ,90 + ,2 + ,447.988 + ,0.892 + ,92.1 + ,-2 + ,442.867 + ,0.8742 + ,97.2 + ,1 + ,436.087 + ,0.8532 + ,95.1 + ,1 + ,431.328 + ,0.8607 + ,88.5 + ,-1 + ,484.015 + ,0.9005 + ,91 + ,-6 + ,509.673 + ,0.9111 + ,90.5 + ,-13 + ,512.927 + ,0.9059 + ,75 + ,-25 + ,502.831 + ,0.8883 + ,66.3 + ,-26 + ,470.984 + ,0.8924 + ,66 + ,-9 + ,471.067 + ,0.8833 + ,68.4 + ,1 + ,476.049 + ,0.87 + ,70.6 + ,3 + ,474.605 + ,0.8758 + ,83.9 + ,6 + ,470.439 + ,0.8858 + ,90.1 + ,2 + ,461.251 + ,0.917 + ,90.6 + ,5 + ,454.724 + ,0.9554 + ,87.1 + ,5 + ,455.626 + ,0.9922 + ,90.8 + ,0 + ,516.847 + ,0.9778 + ,94.1 + ,-5 + ,525.192 + ,0.9808 + ,99.8 + ,-4 + ,522.975 + ,0.9811 + ,96.8 + ,-2 + ,518.585 + ,1.0014 + ,87 + ,-1 + ,509.239 + ,1.0183 + ,96.3 + ,-8 + ,512.238 + ,1.0622 + ,107.1 + ,-16 + ,519.164 + ,1.0773 + ,115.2 + ,-19 + ,517.009 + ,1.0807 + ,106.1 + ,-28 + ,509.933 + ,1.0848 + ,89.5 + ,-11 + ,509.127 + ,1.1582 + ,91.3 + ,-4 + ,500.857 + ,1.1663 + ,97.6 + ,-9 + ,506.971 + ,1.1372 + ,100.7 + ,-12 + ,569.323 + ,1.1139 + ,104.6 + ,-10 + ,579.714 + ,1.1222 + ,94.7 + ,-2 + ,577.992 + ,1.1692 + ,101.8 + ,-13 + ,565.464 + ,1.1702 + ,102.5 + ,0 + ,547.344 + ,1.2286 + ,105.3 + ,0 + ,554.788 + ,1.2613 + ,110.3 + ,4 + ,562.325 + ,1.2646 + ,109.8 + ,7 + ,560.854 + ,1.2262 + ,117.3 + ,5 + ,555.332 + ,1.1985 + ,118.8 + ,2 + ,543.599 + ,1.2007 + ,131.3 + ,-2 + ,536.662 + ,1.2138 + ,125.9 + ,6 + ,542.722 + ,1.2266 + ,133.1 + ,-3 + ,593.530 + ,1.2176 + ,147 + ,1 + ,610.763 + ,1.2218 + ,145.8 + ,0 + ,612.613 + ,1.249 + ,164.4 + ,-7 + ,611.324 + ,1.2991 + ,149.8 + ,-6 + ,594.167 + ,1.3408 + ,137.7 + ,-4 + ,595.454 + ,1.3119 + ,151.7 + ,-4 + ,590.865 + ,1.3014 + ,156.8 + ,-2 + ,589.379 + ,1.3201 + ,180 + ,2 + ,584.428 + ,1.2938 + ,180.4 + ,-5 + ,573.100 + ,1.2694 + ,170.4 + ,-15 + ,567.456 + ,1.2165 + ,191.6 + ,-16 + ,569.028 + ,1.2037 + ,199.5 + ,-18 + ,620.735 + ,1.2292 + ,218.2 + ,-13 + ,628.884 + ,1.2256 + ,217.5 + ,-23 + ,628.232 + ,1.2015 + ,205 + ,-10 + ,612.117 + ,1.1786 + ,194 + ,-10 + ,595.404 + ,1.1856 + ,199.3 + ,-6 + ,597.141 + ,1.2103 + ,219.3 + ,-3 + ,593.408 + ,1.1938 + ,211.1 + ,-4 + ,590.072 + ,1.202 + ,215.2 + ,-7 + ,579.799 + ,1.2271 + ,240.2 + ,-7 + ,574.205 + ,1.277 + ,242.2 + ,-7 + ,572.775 + ,1.265 + ,240.7 + ,-3 + ,572.942 + ,1.2684 + ,255.4 + ,0 + ,619.567 + ,1.2811 + ,253 + ,-5 + ,625.809 + ,1.2727 + ,218.2 + ,-3 + ,619.916 + ,1.2611 + ,203.7 + ,3 + ,587.625 + ,1.2881 + ,205.6 + ,2 + ,565.742 + ,1.3213 + ,215.6 + ,-7 + ,557.274 + ,1.2999 + ,188.5 + ,-1 + ,560.576 + ,1.3074 + ,202.9 + ,0 + ,548.854 + ,1.3242 + ,214 + ,-3 + ,531.673 + ,1.3516 + ,230.3 + ,4 + ,525.919 + ,1.3511 + ,230 + ,2 + ,511.038 + ,1.3419 + ,241 + ,3 + ,498.662 + ,1.3716 + ,259.6 + ,0 + ,555.362 + ,1.3622 + ,247.8 + ,-10 + ,564.591 + ,1.3896 + ,270.3 + ,-10 + ,541.657) + ,dim=c(4 + ,81) + ,dimnames=list(c('y' + ,'x' + ,'z' + ,'t ') + ,1:81)) > y <- array(NA,dim=c(4,81),dimnames=list(c('y','x','z','t '),1:81)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > main = 'Kendall tau Correlation Plot' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > panel.tau <- function(x, y, digits=2, prefix='', cex.cor) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(0, 1, 0, 1)) + rr <- cor.test(x, y, method='kendall') + r <- round(rr$p.value,2) + txt <- format(c(r, 0.123456789), digits=digits)[1] + txt <- paste(prefix, txt, sep='') + if(missing(cex.cor)) cex <- 0.5/strwidth(txt) + text(0.5, 0.5, txt, cex = cex) + } > panel.hist <- function(x, ...) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(usr[1:2], 0, 1.5) ) + h <- hist(x, plot = FALSE) + breaks <- h$breaks; nB <- length(breaks) + y <- h$counts; y <- y/max(y) + rect(breaks[-nB], 0, breaks[-1], y, col='grey', ...) + } > postscript(file="/var/www/html/rcomp/tmp/1lh8f1196018938.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd 4: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd > dev.off() null device 1 > load(file='/var/www/html/rcomp/createtable') > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Kendall tau rank correlations for all pairs of data series',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'tau',1,TRUE) > a<-table.element(a,'p-value',1,TRUE) > a<-table.row.end(a) > n <- length(y[,1]) > n [1] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 8.6627, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.655758 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste('tau(',dimnames(t(x))[[2]][i]) + dum <- paste(dum,',') + dum <- paste(dum,dimnames(t(x))[[2]][j]) + dum <- paste(dum,')') + a<-table.element(a,dum,header=TRUE) + r <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,r$estimate) + a<-table.element(a,r$p.value) + a<-table.row.end(a) + } + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2eq7a1196018938.tab") > > system("convert tmp/1lh8f1196018938.ps tmp/1lh8f1196018938.png") > > > proc.time() user system elapsed 0.778 0.217 0.845