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(98.71 + ,103.5 + ,97.9 + ,108.5 + ,98.54 + ,103.2 + ,96.6 + ,112.3 + ,98.2 + ,103.1 + ,96.2 + ,116.6 + ,96.92 + ,102.9 + ,95.8 + ,115.5 + ,99.06 + ,102.9 + ,96 + ,120.1 + ,99.65 + ,102.9 + ,96.2 + ,132.9 + ,99.82 + ,103.2 + ,96.5 + ,128.1 + ,99.99 + ,103 + ,95.4 + ,129.3 + ,100.33 + ,103.7 + ,96.2 + ,132.5 + ,99.31 + ,104.2 + ,96.8 + ,131 + ,101.1 + ,104.7 + ,97 + ,124.9 + ,101.1 + ,104.8 + ,97.1 + ,120.8 + ,100.93 + ,104.9 + ,96.6 + ,122 + ,100.85 + ,104.8 + ,95.8 + ,122.1 + ,100.93 + ,104.6 + ,96.2 + ,127.4 + ,99.6 + ,104.6 + ,96 + ,135.2 + ,101.88 + ,105.2 + ,95.9 + ,137.3 + ,101.81 + ,105.2 + ,95.8 + ,135 + ,102.38 + ,105.4 + ,96 + ,136 + ,102.74 + ,106.1 + ,96.2 + ,138.4 + ,102.82 + ,107.6 + ,96.8 + ,134.7 + ,101.72 + ,107.9 + ,96.9 + ,138.4 + ,103.47 + ,107.9 + ,97.2 + ,133.9 + ,102.98 + ,108.8 + ,98.9 + ,133.6 + ,102.68 + ,109.6 + ,98.9 + ,141.2 + ,102.9 + ,109.5 + ,98.8 + ,151.8 + ,103.03 + ,109.4 + ,99 + ,155.4 + ,101.29 + ,109.9 + ,99.6 + ,156.6 + ,103.69 + ,110.7 + ,99.9 + ,161.6 + ,103.68 + ,110 + ,100.1 + ,160.7 + ,104.2 + ,110.4 + ,99.9 + ,156 + ,104.08 + ,110.7 + ,100.5 + ,159.5 + ,104.16 + ,110.9 + ,100.7 + ,168.7 + ,103.05 + ,111.2 + ,101.3 + ,169.9 + ,104.66 + ,111.9 + ,101.3 + ,169.9 + ,104.46 + ,112.7 + ,101.7 + ,185.9 + ,104.95 + ,114.1 + ,103 + ,190.8 + ,105.85 + ,114.3 + ,104.7 + ,195.8 + ,106.23 + ,114.6 + ,104.5 + ,211.9 + ,104.86 + ,115 + ,104.6 + ,227.1 + ,107.44 + ,115.6 + ,104.2 + ,251.3 + ,108.23 + ,115.6 + ,104.5 + ,256.7 + ,108.45 + ,116.2 + ,104.8 + ,251.9 + ,109.39 + ,116 + ,104.7 + ,251.2 + ,110.15 + ,116.2 + ,104.6 + ,270.3 + ,109.13 + ,116.3 + ,104.5 + ,267.2 + ,110.28 + ,116.1 + ,104.7 + ,243 + ,110.17 + ,116.6 + ,104.8 + ,229.9 + ,109.99 + ,116.5 + ,106.2 + ,187.2 + ,109.26 + ,115.7 + ,105.6 + ,178.2 + ,109.11 + ,114.8 + ,104.5 + ,175.2 + ,107.06 + ,114.3 + ,104.2 + ,192.4 + ,109.53 + ,115.2 + ,104.1 + ,187 + ,108.92 + ,115.2 + ,103.3 + ,184 + ,109.24 + ,114.7 + ,103.8 + ,194.1 + ,109.12 + ,113.8 + ,103.3 + ,212.7 + ,109 + ,114.2 + ,103.7 + ,217.5 + ,107.23 + ,114.2 + ,103.5 + ,200.5 + ,109.49 + ,114.1 + ,103.7 + ,205.9 + ,109.04 + ,113.8 + ,103.4 + ,196.5 + ,109.02 + ,113.9 + ,102.8 + ,206.3) + ,dim=c(4 + ,61) + ,dimnames=list(c('HICP' + ,'AFPBI' + ,'AFPBU' + ,'PIDT') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('HICP','AFPBI','AFPBU','PIDT'),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/1vcis1257863715.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 = 9.2879, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8193361 > 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/21zrs1257863715.tab") > > system("convert tmp/1vcis1257863715.ps tmp/1vcis1257863715.png") > > > proc.time() user system elapsed 0.486 0.232 0.598