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(100.70 + ,101.30 + ,99.80 + ,97.90 + ,97.60 + ,103.50 + ,96.50 + ,96.40 + ,103.10 + ,96.60 + ,97.00 + ,105.60 + ,96.60 + ,96.40 + ,105.70 + ,95.50 + ,94.70 + ,106.60 + ,91.80 + ,89.30 + ,107.00 + ,89.30 + ,85.90 + ,105.20 + ,87.00 + ,83.30 + ,105.70 + ,85.90 + ,81.50 + ,105.00 + ,88.00 + ,85.00 + ,105.10 + ,87.90 + ,84.80 + ,105.90 + ,89.20 + ,87.50 + ,105.30 + ,90.90 + ,89.00 + ,104.90 + ,91.60 + ,90.00 + ,103.20 + ,90.20 + ,89.60 + ,103.40 + ,89.10 + ,87.40 + ,104.40 + ,87.50 + ,84.80 + ,104.50 + ,86.30 + ,81.90 + ,105.90 + ,86.00 + ,81.10 + ,110.60 + ,84.40 + ,79.10 + ,112.40 + ,86.10 + ,80.50 + ,111.80 + ,91.00 + ,88.50 + ,111.00 + ,92.70 + ,90.90 + ,111.00 + ,88.00 + ,84.90 + ,109.10 + ,84.30 + ,80.00 + ,107.80 + ,82.20 + ,76.50 + ,107.20 + ,80.80 + ,75.40 + ,108.40 + ,79.40 + ,73.50 + ,107.50 + ,80.20 + ,74.30 + ,106.40 + ,82.20 + ,77.70 + ,106.20 + ,82.20 + ,77.90 + ,104.90 + ,81.20 + ,76.70 + ,106.20 + ,82.10 + ,77.20 + ,107.60 + ,88.10 + ,86.00 + ,107.00 + ,88.50 + ,86.90 + ,104.50 + ,92.10 + ,92.00 + ,105.10 + ,98.60 + ,101.70 + ,104.70 + ,100.90 + ,104.50 + ,103.70 + ,100.60 + ,101.70 + ,104.90 + ,101.10 + ,100.60 + ,105.90 + ,102.10 + ,100.30 + ,106.10 + ,103.60 + ,102.50 + ,106.10 + ,102.80 + ,101.00 + ,106.80 + ,108.30 + ,108.60 + ,106.40 + ,104.00 + ,103.40 + ,107.80 + ,106.10 + ,106.40 + ,107.60 + ,106.30 + ,106.60 + ,107.60 + ,109.00 + ,108.90 + ,108.40 + ,111.00 + ,110.50 + ,109.50 + ,113.70 + ,114.00 + ,109.20 + ,112.70 + ,112.80 + ,109.10 + ,110.30 + ,109.60 + ,110.00 + ,114.50 + ,116.00 + ,109.00 + ,119.30 + ,124.60 + ,109.00 + ,121.80 + ,129.00 + ,111.90 + ,125.40 + ,131.50 + ,109.30 + ,129.70 + ,138.60 + ,112.10 + ,129.40 + ,138.10 + ,112.10 + ,134.50 + ,146.30 + ,112.50 + ,141.20 + ,157.60 + ,113.60 + ,141.40 + ,158.40 + ,112.90 + ,152.20 + ,176.30 + ,114.00 + ,167.70 + ,199.90 + ,116.10 + ,173.30 + ,210.40 + ,116.50 + ,168.70 + ,202.60 + ,117.10 + ,172.60 + ,207.10 + ,117.10 + ,169.80 + ,202.00 + ,117.10 + ,172.00 + ,203.40 + ,116.50 + ,179.40 + ,216.30 + ,116.50 + ,174.60 + ,207.30 + ,116.30 + ,172.50 + ,203.50 + ,116.50 + ,172.60 + ,204.40 + ,119.20 + ,176.30 + ,203.70 + ,118.60 + ,178.90 + ,205.70 + ,117.50 + ,179.60 + ,208.00 + ,117.10 + ,179.90 + ,209.30 + ,117.60 + ,180.30 + ,208.70 + ,118.30 + ,180.90 + ,206.50 + ,118.60 + ,177.70 + ,204.50 + ,116.70) + ,dim=c(3 + ,80) + ,dimnames=list(c('TM' + ,'NF' + ,'GM') + ,1:80)) > y <- array(NA,dim=c(3,80),dimnames=list(c('TM','NF','GM'),1:80)) > 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/1d8wy1194560131.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) > 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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 12.6021, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.961179 > 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/2fbbu1194560132.tab") > > system("convert tmp/1d8wy1194560131.ps tmp/1d8wy1194560131.png") > > > proc.time() user system elapsed 0.691 0.196 0.771