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(100 + ,100 + ,100 + ,100 + ,100 + ,114.242116 + ,89.82300885 + ,100.1383126 + ,93.5483871 + ,115.8697864 + ,126.5486726 + ,100.2766252 + ,88.17204301 + ,108.0366226 + ,112.8318584 + ,100.461042 + ,89.24731183 + ,100.3051882 + ,100.4424779 + ,100.5532503 + ,91.39784946 + ,98.1688708 + ,100 + ,100.7837713 + ,92.47311828 + ,97.5584944 + ,113.7168142 + ,100.9220839 + ,91.39784946 + ,105.4933876 + ,135.840708 + ,101.1065007 + ,88.17204301 + ,104.8830112 + ,122.1238938 + ,101.6136468 + ,87.09677419 + ,105.4933876 + ,111.0619469 + ,101.8441678 + ,84.94623656 + ,114.0386572 + ,126.9911504 + ,101.890272 + ,92.47311828 + ,88.40284842 + ,138.9380531 + ,102.2591056 + ,93.5483871 + ,96.64292981 + ,137.6106195 + ,102.351314 + ,93.5483871 + ,113.733469 + ,139.8230088 + ,102.4435224 + ,91.39784946 + ,110.681587 + ,109.2920354 + ,102.5818349 + ,90.32258065 + ,111.190234 + ,113.7168142 + ,102.7662517 + ,91.39784946 + ,103.1536114 + ,127.8761062 + ,102.8584601 + ,93.5483871 + ,102.2380468 + ,116.3716814 + ,102.9967727 + ,93.5483871 + ,102.4415056 + ,105.3097345 + ,103.2733979 + ,92.47311828 + ,115.4628688 + ,74.77876106 + ,103.780544 + ,91.39784946 + ,107.9348932 + ,86.72566372 + ,103.9649608 + ,89.24731183 + ,113.5300102 + ,96.90265487 + ,104.1493776 + ,86.02150538 + ,116.8870804 + ,82.74336283 + ,104.3337944 + ,88.17204301 + ,90.13224822 + ,70.79646018 + ,104.4260028 + ,87.09677419 + ,101.2207528 + ,72.12389381 + ,104.6565237 + ,87.09677419 + ,117.0905392 + ,53.98230088 + ,104.7948363 + ,86.02150538 + ,120.0406918 + ,53.53982301 + ,105.0253573 + ,84.94623656 + ,113.3265514 + ,65.92920354 + ,105.1636699 + ,84.94623656 + ,109.155646 + ,72.56637168 + ,105.3019825 + ,86.02150538 + ,107.121058 + ,73.45132743 + ,105.3480867 + ,86.02150538 + ,107.121058 + ,78.31858407 + ,105.4863993 + ,84.94623656 + ,119.9389624 + ,80.53097345 + ,105.5786077 + ,86.02150538 + ,112.1057986 + ,78.76106195 + ,105.6247118 + ,82.79569892 + ,114.3438454 + ,56.63716814 + ,105.7169202 + ,77.41935484 + ,119.5320448 + ,57.07964602 + ,105.8552328 + ,80.64516129 + ,94.60834181 + ,60.61946903 + ,105.9935454 + ,78.49462366 + ,105.2899288 + ,49.55752212 + ,106.0396496 + ,75.2688172 + ,118.311292 + ,66.81415929 + ,106.131858 + ,75.2688172 + ,122.0752798 + ,99.11504425 + ,106.4084832 + ,75.2688172 + ,116.276704 + ,130.0884956 + ,106.5006916 + ,77.41935484 + ,106.5106816 + ,136.7256637 + ,106.8234209 + ,78.49462366 + ,111.698881 + ,153.0973451 + ,106.9156293 + ,76.34408602 + ,114.5473042 + ,161.0619469 + ,107.4227755 + ,73.11827957 + ,116.3784334 + ,194.2477876 + ,108.3909636 + ,68.8172043 + ,117.7009156 + ,183.6283186 + ,108.8059013 + ,65.59139785 + ,116.6836216 + ,230.5309735 + ,109.2208391 + ,69.89247312 + ,120.4476094 + ,256.6371681 + ,109.3130475 + ,82.79569892 + ,96.54120041 + ,261.5044248 + ,109.4974643 + ,84.94623656 + ,105.595117 + ,238.4955752 + ,109.8201936 + ,80.64516129 + ,117.0905392 + ,241.5929204 + ,110.142923 + ,74.19354839 + ,115.6663276 + ,208.8495575 + ,110.2351314 + ,70.96774194 + ,105.7985758 + ,138.9380531 + ,110.6500692 + ,74.19354839 + ,95.93082401 + ,116.3716814 + ,110.7422775 + ,82.79569892 + ,94.09969481 + ,102.6548673 + ,110.8805901 + ,86.02150538 + ,94.81180061 + ,85.39823009 + ,110.9727985 + ,86.02150538 + ,106.5106816 + ,27.43362832 + ,111.1572153 + ,82.79569892 + ,95.62563581 + ,26.54867257 + ,111.2955279 + ,78.49462366 + ,99.7965412 + ,-16.37168142 + ,111.6643615 + ,79.56989247 + ,104.4760936 + ,-48.67256637 + ,111.9870908 + ,87.09677419 + ,83.82502543 + ,-74.33628319 + ,112.1254034) + ,dim=c(4 + ,60) + ,dimnames=list(c('werkl' + ,'indus' + ,'infl' + ,'uurl') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('werkl','indus','infl','uurl'),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/html/rcomp/tmp/120ku1257531150.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 = -2.6669, p-value = 0.007655 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.2413778 > 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/2rjlm1257531150.tab") > > system("convert tmp/120ku1257531150.ps tmp/120ku1257531150.png") > > > proc.time() user system elapsed 0.512 0.218 0.585