R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(110.40 + ,109.20 + ,99.90 + ,72.50 + ,96.40 + ,88.60 + ,99.80 + ,59.40 + ,101.90 + ,94.30 + ,99.80 + ,85.70 + ,106.20 + ,98.30 + ,100.30 + ,88.20 + ,81.00 + ,86.40 + ,99.90 + ,62.80 + ,94.70 + ,80.60 + ,99.90 + ,87.00 + ,101.00 + ,104.10 + ,100.00 + ,79.20 + ,109.40 + ,108.20 + ,100.10 + ,112.00 + ,102.30 + ,93.40 + ,100.10 + ,79.20 + ,90.70 + ,71.90 + ,100.20 + ,132.10 + ,96.20 + ,94.10 + ,100.30 + ,40.10 + ,96.10 + ,94.90 + ,100.60 + ,69.00 + ,106.00 + ,96.40 + ,100.00 + ,59.40 + ,103.10 + ,91.10 + ,100.10 + ,73.80 + ,102.00 + ,84.40 + ,100.20 + ,57.40 + ,104.70 + ,86.40 + ,100.00 + ,81.10 + ,86.00 + ,88.00 + ,100.10 + ,46.60 + ,92.10 + ,75.10 + ,100.10 + ,41.40 + ,106.90 + ,109.70 + ,100.10 + ,71.20 + ,112.60 + ,103.00 + ,100.50 + ,67.90 + ,101.70 + ,82.10 + ,100.50 + ,72.00 + ,92.00 + ,68.00 + ,100.50 + ,145.50 + ,97.40 + ,96.40 + ,96.30 + ,39.70 + ,97.00 + ,94.30 + ,96.30 + ,51.90 + ,105.40 + ,90.00 + ,96.80 + ,73.70 + ,102.70 + ,88.00 + ,96.80 + ,70.90 + ,98.10 + ,76.10 + ,96.90 + ,60.80 + ,104.50 + ,82.50 + ,96.80 + ,61.00 + ,87.40 + ,81.40 + ,96.80 + ,54.50 + ,89.90 + ,66.50 + ,96.80 + ,39.10 + ,109.80 + ,97.20 + ,96.80 + ,66.60 + ,111.70 + ,94.10 + ,97.00 + ,58.50 + ,98.60 + ,80.70 + ,97.00 + ,59.80 + ,96.90 + ,70.50 + ,97.00 + ,80.90 + ,95.10 + ,87.80 + ,96.80 + ,37.30 + ,97.00 + ,89.50 + ,96.90 + ,44.60 + ,112.70 + ,99.60 + ,97.20 + ,48.70 + ,102.90 + ,84.20 + ,97.30 + ,54.00 + ,97.40 + ,75.10 + ,97.30 + ,49.50 + ,111.40 + ,92.00 + ,97.20 + ,61.60 + ,87.40 + ,80.80 + ,97.30 + ,35.00 + ,96.80 + ,73.10 + ,97.30 + ,35.70 + ,114.10 + ,99.80 + ,97.30 + ,51.30 + ,110.30 + ,90.00 + ,97.30 + ,49.00 + ,103.90 + ,83.10 + ,97.30 + ,41.50 + ,101.60 + ,72.40 + ,97.30 + ,72.50 + ,94.60 + ,78.80 + ,98.10 + ,42.10 + ,95.90 + ,87.30 + ,96.80 + ,44.10 + ,104.70 + ,91.00 + ,96.80 + ,45.10 + ,102.80 + ,80.10 + ,96.80 + ,50.30 + ,98.10 + ,73.60 + ,96.80 + ,40.90 + ,113.90 + ,86.40 + ,96.80 + ,47.20 + ,80.90 + ,74.50 + ,96.80 + ,36.90 + ,95.70 + ,71.20 + ,96.80 + ,40.90 + ,113.20 + ,92.40 + ,96.80 + ,38.30 + ,105.90 + ,81.50 + ,96.80 + ,46.30 + ,108.80 + ,85.30 + ,96.80 + ,28.40 + ,102.30 + ,69.90 + ,96.80 + ,78.40 + ,99.00 + ,84.20 + ,96.90 + ,36.80 + ,100.70 + ,90.70 + ,97.10 + ,50.70 + ,115.50 + ,100.30 + ,97.10 + ,42.80) + ,dim=c(4 + ,61) + ,dimnames=list(c('iptot' + ,'ipkl' + ,'pkl' + ,'invkl') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('iptot','ipkl','pkl','invkl'),1:61)) > 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: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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/1g2z31257197097.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 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > 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 = 4.7558, p-value = 1.976e-06 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4193197 > 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/2t94e1257197097.tab") > > system("convert tmp/1g2z31257197097.ps tmp/1g2z31257197097.png") > > > proc.time() user system elapsed 0.498 0.195 0.570