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.00 + ,100.00 + ,100.00 + ,100.00 + ,98.49 + ,98.86 + ,108.45 + ,127.27 + ,99.15 + ,96.87 + ,115.49 + ,109.09 + ,100.28 + ,103.18 + ,129.58 + ,136.36 + ,103.82 + ,104.66 + ,143.66 + ,100.00 + ,108.16 + ,103.74 + ,147.89 + ,118.18 + ,112.33 + ,103.87 + ,152.11 + ,136.36 + ,110.70 + ,98.10 + ,152.11 + ,100.00 + ,111.04 + ,98.91 + ,156.34 + ,127.27 + ,111.07 + ,109.43 + ,154.93 + ,118.18 + ,113.37 + ,104.89 + ,156.34 + ,136.36 + ,115.28 + ,88.63 + ,143.66 + ,145.45 + ,120.25 + ,97.03 + ,135.21 + ,154.55 + ,121.96 + ,93.79 + ,130.99 + ,100.00 + ,122.35 + ,97.61 + ,125.35 + ,145.45 + ,122.81 + ,98.17 + ,123.94 + ,118.18 + ,131.12 + ,96.31 + ,125.35 + ,154.55 + ,132.04 + ,97.82 + ,126.76 + ,145.45 + ,128.74 + ,87.52 + ,125.35 + ,154.55 + ,126.11 + ,85.71 + ,123.94 + ,172.73 + ,127.05 + ,89.15 + ,126.76 + ,163.64 + ,132.37 + ,90.65 + ,123.94 + ,172.73 + ,132.48 + ,92.74 + ,123.94 + ,145.45 + ,139.09 + ,80.00 + ,136.62 + ,136.36 + ,142.79 + ,84.33 + ,138.03 + ,145.45 + ,143.17 + ,93.26 + ,140.85 + ,145.45 + ,138.82 + ,115.89 + ,142.25 + ,154.55 + ,135.68 + ,105.21 + ,142.25 + ,181.82 + ,135.93 + ,94.23 + ,140.85 + ,181.82 + ,137.42 + ,106.12 + ,126.76 + ,172.73 + ,138.87 + ,94.41 + ,123.94 + ,154.55 + ,137.85 + ,101.30 + ,118.31 + ,163.64 + ,138.32 + ,98.43 + ,112.68 + ,172.73 + ,141.40 + ,107.94 + ,114.08 + ,154.55 + ,147.07 + ,102.82 + ,112.68 + ,181.82 + ,151.79 + ,92.33 + ,109.86 + ,190.91 + ,148.52 + ,97.48 + ,108.45 + ,218.18 + ,147.33 + ,88.37 + ,102.82 + ,227.27 + ,149.45 + ,92.50 + ,101.41 + ,227.27 + ,146.47 + ,81.48 + ,101.41 + ,236.36 + ,143.71 + ,92.55 + ,94.37 + ,200.00 + ,137.72 + ,98.96 + ,94.37 + ,227.27 + ,136.27 + ,77.28 + ,90.14 + ,254.55 + ,139.16 + ,91.01 + ,90.14 + ,254.55 + ,138.75 + ,81.21 + ,88.73 + ,263.64 + ,136.02 + ,88.41 + ,84.51 + ,272.73 + ,133.43 + ,96.02 + ,77.46 + ,281.82 + ,134.22 + ,91.59 + ,66.20 + ,263.64 + ,137.02 + ,86.30 + ,53.52 + ,245.45 + ,135.15 + ,86.37 + ,50.70 + ,200.00 + ,136.08 + ,105.41 + ,35.21 + ,227.27 + ,138.92 + ,76.73 + ,23.94 + ,209.09 + ,144.57 + ,93.26 + ,22.54 + ,236.36 + ,143.21 + ,95.02 + ,30.99 + ,209.09 + ,143.60 + ,84.32 + ,30.99 + ,200.00 + ,145.04 + ,93.24 + ,28.17 + ,163.64 + ,144.08 + ,89.81 + ,26.76 + ,163.64 + ,142.77 + ,111.66 + ,22.54 + ,181.82 + ,145.83 + ,103.23 + ,26.76 + ,145.45 + ,149.59 + ,103.21 + ,36.62 + ,163.64) + ,dim=c(4 + ,60) + ,dimnames=list(c('$wssk' + ,'imp' + ,'hb' + ,'infl') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('$wssk','imp','hb','infl'),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/1q2971257938664.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 = -1.9453, p-value = 0.05174 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1723651 > 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/2wyu91257938664.tab") > > system("convert tmp/1q2971257938664.ps tmp/1q2971257938664.png") > > > proc.time() user system elapsed 0.481 0.211 1.124