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.00 + ,100.00 + ,98.77 + ,98.20 + ,96.63 + ,93.55 + ,92.59 + ,90.09 + ,93.26 + ,88.17 + ,91.36 + ,82.88 + ,93.26 + ,89.25 + ,95.06 + ,82.88 + ,93.26 + ,91.40 + ,97.53 + ,85.59 + ,94.38 + ,92.47 + ,95.06 + ,86.49 + ,95.51 + ,91.40 + ,87.65 + ,85.59 + ,94.38 + ,88.17 + ,76.54 + ,81.98 + ,96.63 + ,87.10 + ,71.60 + ,80.18 + ,95.51 + ,84.95 + ,75.31 + ,81.08 + ,95.51 + ,92.47 + ,85.19 + ,90.99 + ,94.38 + ,93.55 + ,90.12 + ,92.79 + ,95.51 + ,93.55 + ,88.89 + ,91.89 + ,95.51 + ,91.40 + ,75.31 + ,86.49 + ,95.51 + ,90.32 + ,71.60 + ,82.88 + ,95.51 + ,91.40 + ,75.31 + ,83.78 + ,95.51 + ,93.55 + ,77.78 + ,84.68 + ,95.51 + ,93.55 + ,83.95 + ,84.68 + ,95.51 + ,92.47 + ,83.95 + ,82.88 + ,95.51 + ,91.40 + ,80.25 + ,81.08 + ,96.63 + ,89.25 + ,76.54 + ,81.08 + ,94.38 + ,86.02 + ,77.78 + ,81.08 + ,91.01 + ,88.17 + ,79.01 + ,88.29 + ,89.89 + ,87.10 + ,81.48 + ,90.09 + ,89.89 + ,87.10 + ,93.83 + ,88.29 + ,89.89 + ,86.02 + ,79.01 + ,83.78 + ,89.89 + ,84.95 + ,83.95 + ,81.08 + ,88.76 + ,84.95 + ,86.42 + ,81.08 + ,87.64 + ,86.02 + ,85.19 + ,81.98 + ,87.64 + ,86.02 + ,87.65 + ,81.98 + ,88.76 + ,84.95 + ,88.89 + ,81.98 + ,91.01 + ,86.02 + ,87.65 + ,82.88 + ,89.89 + ,82.80 + ,86.42 + ,79.28 + ,85.39 + ,77.42 + ,85.19 + ,74.77 + ,82.02 + ,80.65 + ,82.72 + ,75.68 + ,78.65 + ,78.49 + ,81.48 + ,72.97 + ,76.40 + ,75.27 + ,85.19 + ,69.37 + ,78.65 + ,75.27 + ,90.12 + ,71.17 + ,79.78 + ,75.27 + ,97.53 + ,71.17 + ,80.90 + ,77.42 + ,101.23 + ,72.07 + ,79.78 + ,78.49 + ,101.23 + ,71.17 + ,77.53 + ,76.34 + ,101.23 + ,68.47 + ,75.28 + ,73.12 + ,100.00 + ,63.96 + ,75.28 + ,68.82 + ,97.53 + ,61.26 + ,74.16 + ,65.59 + ,95.06 + ,58.56 + ,77.53 + ,69.89 + ,95.06 + ,62.16 + ,82.02 + ,82.80 + ,93.83 + ,73.87 + ,84.27 + ,84.95 + ,92.59 + ,78.38 + ,82.02 + ,80.65 + ,92.59 + ,74.77 + ,79.78 + ,74.19 + ,87.65 + ,71.17 + ,77.53 + ,70.97 + ,92.59 + ,67.57 + ,79.78 + ,74.19 + ,92.59 + ,70.27 + ,84.27 + ,82.80 + ,96.30 + ,74.77 + ,86.52 + ,86.02 + ,96.30 + ,75.68 + ,87.64 + ,86.02 + ,96.30 + ,73.87 + ,87.64 + ,82.80 + ,93.83 + ,69.37 + ,86.52 + ,78.49 + ,92.59 + ,64.86 + ,87.64 + ,79.57 + ,95.06 + ,65.77 + ,87.64 + ,87.10 + ,100.00 + ,72.97 + ,88.76 + ,89.25 + ,98.77 + ,76.58) + ,dim=c(4 + ,61) + ,dimnames=list(c('wztot' + ,'wtot' + ,'wman' + ,'wvrouw') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('wztot','wtot','wman','wvrouw'),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/1b2wh1257799631.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 = 8.545, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7867559 > 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/2thz51257799631.tab") > > system("convert tmp/1b2wh1257799631.ps tmp/1b2wh1257799631.png") > > > proc.time() user system elapsed 0.480 0.218 0.583