R version 2.8.1 (2008-12-22) Copyright (C) 2008 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(98.8 + ,99.2 + ,104.08 + ,106.9 + ,100.5 + ,93.6 + ,103.86 + ,101.25 + ,110.4 + ,104.2 + ,107.47 + ,105.82 + ,96.4 + ,95.3 + ,111.1 + ,118.98 + ,101.9 + ,102.7 + ,117.33 + ,130.92 + ,106.2 + ,103.1 + ,119.04 + ,132.83 + ,81 + ,100 + ,123.68 + ,118.27 + ,94.7 + ,107.2 + ,125.9 + ,109.32 + ,101 + ,107 + ,124.54 + ,106.04 + ,109.4 + ,119 + ,119.39 + ,116.05 + ,102.3 + ,110.4 + ,118.8 + ,114.83 + ,90.7 + ,101.7 + ,114.81 + ,111.9 + ,96.2 + ,102.4 + ,117.9 + ,134.32 + ,96.1 + ,98.8 + ,120.53 + ,117.92 + ,106 + ,105.6 + ,125.15 + ,124.62 + ,103.1 + ,104.4 + ,126.49 + ,127.91 + ,102 + ,106.3 + ,131.85 + ,131.62 + ,104.7 + ,107.2 + ,127.4 + ,120.3 + ,86 + ,108.5 + ,131.08 + ,117.75 + ,92.1 + ,106.9 + ,122.37 + ,106.62 + ,106.9 + ,114.2 + ,124.34 + ,113.33 + ,112.6 + ,125.9 + ,119.61 + ,113.87 + ,101.7 + ,110.6 + ,119.97 + ,111.25 + ,92 + ,110.5 + ,116.46 + ,106.84 + ,97.4 + ,106.7 + ,117.03 + ,114.72 + ,97 + ,104.7 + ,120.96 + ,113.25 + ,105.4 + ,107.4 + ,124.71 + ,118.68 + ,102.7 + ,109.8 + ,127.08 + ,125.75 + ,98.1 + ,103.4 + ,131.91 + ,122.55 + ,104.5 + ,114.8 + ,137.69 + ,124.53 + ,87.4 + ,114.3 + ,142.46 + ,120.69 + ,89.9 + ,109.6 + ,144.32 + ,115.93 + ,109.8 + ,118.3 + ,138.06 + ,137.2 + ,111.7 + ,127.3 + ,124.45 + ,124.48 + ,98.6 + ,112.3 + ,126.71 + ,121.12 + ,96.9 + ,114.9 + ,121.83 + ,115.84 + ,95.1 + ,108.2 + ,122.51 + ,122.57 + ,97 + ,105.4 + ,125.48 + ,112.47 + ,112.7 + ,122.1 + ,127.77 + ,115.81 + ,102.9 + ,113.5 + ,128.03 + ,128.61 + ,97.4 + ,110 + ,132.84 + ,131.29 + ,111.4 + ,125.3 + ,133.41 + ,126.79 + ,87.4 + ,114.3 + ,139.99 + ,116.55 + ,96.8 + ,115.6 + ,138.53 + ,105.38 + ,114.1 + ,127.1 + ,136.12 + ,109.15 + ,110.3 + ,123 + ,124.75 + ,114.2 + ,103.9 + ,122.2 + ,122.88 + ,120.15 + ,101.6 + ,126.4 + ,121.46 + ,118.39 + ,94.6 + ,112.7 + ,118.4 + ,113.5 + ,95.9 + ,105.8 + ,122.45 + ,115.1 + ,104.7 + ,120.9 + ,128.94 + ,129.99 + ,102.8 + ,116.3 + ,133.25 + ,128.08 + ,98.1 + ,115.7 + ,137.94 + ,135.64 + ,113.9 + ,127.9 + ,140.04 + ,121.44 + ,80.9 + ,108.3 + ,130.74 + ,121.3 + ,95.7 + ,121.1 + ,131.55 + ,117.69 + ,113.2 + ,128.6 + ,129.47 + ,110.07 + ,105.9 + ,123.1 + ,125.45 + ,114.9 + ,108.8 + ,127.7 + ,127.87 + ,121.15 + ,102.3 + ,126.6 + ,124.68 + ,123.28) + ,dim=c(4 + ,60) + ,dimnames=list(c('iptot' + ,'ipvg' + ,'indfr' + ,'indgr ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('iptot','ipvg','indfr','indgr '),1:60)) > 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/rcomp/tmp/192ud1258030124.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 > dev.off() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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 = 3.8848, p-value = 0.0001024 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3448473 > 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/rcomp/tmp/23fz71258030124.tab") > > system("convert tmp/192ud1258030124.ps tmp/192ud1258030124.png") > > > proc.time() user system elapsed 0.420 0.370 0.805