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(97.8 + ,579 + ,93 + ,572 + ,92.5 + ,560 + ,89.4 + ,551 + ,93.6 + ,537 + ,89 + ,541 + ,87.7 + ,588 + ,88.8 + ,607 + ,88.5 + ,599 + ,91.1 + ,578 + ,88.8 + ,563 + ,83.3 + ,566 + ,76.8 + ,561 + ,74.5 + ,554 + ,72.1 + ,540 + ,73.2 + ,526 + ,72.6 + ,512 + ,69.4 + ,505 + ,68.7 + ,554 + ,66.9 + ,584 + ,69.1 + ,569 + ,67.5 + ,540 + ,64.8 + ,522 + ,60.6 + ,526 + ,61.7 + ,527 + ,60.2 + ,516 + ,65.3 + ,503 + ,70.7 + ,489 + ,71.5 + ,479 + ,72 + ,475 + ,77 + ,524 + ,81 + ,552 + ,87.1 + ,532 + ,85.6 + ,511 + ,90.2 + ,492 + ,92.4 + ,492 + ,93.9 + ,493 + ,97.5 + ,481 + ,98.1 + ,462 + ,89.6 + ,457 + ,98.4 + ,442 + ,102 + ,439 + ,99.2 + ,488 + ,101.8 + ,521 + ,108.3 + ,501 + ,106.7 + ,485 + ,108.2 + ,464 + ,94.2 + ,460 + ,95.1 + ,467 + ,98.1 + ,460 + ,93.2 + ,448 + ,94 + ,443 + ,97.2 + ,436 + ,95 + ,431 + ,90.5 + ,484 + ,91.6 + ,510 + ,90.5 + ,513 + ,79.9 + ,503 + ,74.9 + ,471 + ,74.3 + ,471 + ,75.9 + ,476 + ,77.7 + ,475 + ,86.9 + ,470 + ,90.7 + ,461 + ,91 + ,455 + ,89.5 + ,456 + ,92.5 + ,517 + ,94.1 + ,525 + ,98.5 + ,523 + ,96.8 + ,519 + ,91.2 + ,509 + ,97.1 + ,512 + ,104.9 + ,519 + ,110.9 + ,517 + ,104.8 + ,510 + ,94.1 + ,509 + ,95.8 + ,501 + ,99.3 + ,507 + ,101.1 + ,569 + ,104 + ,580 + ,99 + ,578 + ,105.4 + ,565 + ,107.1 + ,547 + ,110.7 + ,555 + ,117.1 + ,562 + ,118.7 + ,561 + ,126.5 + ,555 + ,127.5 + ,544 + ,134.6 + ,537 + ,131.8 + ,543 + ,135.9 + ,594 + ,142.7 + ,611 + ,141.7 + ,613 + ,153.4 + ,611 + ,145 + ,594 + ,137.7 + ,595 + ,148.3 + ,591 + ,152.2 + ,589 + ,169.4 + ,584 + ,168.6 + ,573 + ,161.1 + ,567 + ,174.1 + ,569 + ,179 + ,621 + ,190.6 + ,629 + ,190 + ,628 + ,181.6 + ,612 + ,174.8 + ,595 + ,180.5 + ,597 + ,196.8 + ,593 + ,193.8 + ,590 + ,197 + ,580 + ,216.3 + ,574 + ,221.4 + ,573 + ,217.9 + ,573 + ,229.7 + ,620 + ,227.4 + ,626 + ,204.2 + ,620 + ,196.6 + ,588 + ,198.8 + ,566 + ,207.5 + ,557 + ,190.7 + ,561 + ,201.6 + ,549 + ,210.5 + ,532 + ,223.5 + ,526 + ,223.8 + ,511 + ,231.2 + ,499 + ,244 + ,555 + ,234.7 + ,565 + ,250.2 + ,542 + ,265.7 + ,527 + ,287.6 + ,510 + ,283.3 + ,514 + ,295.4 + ,517 + ,312.3 + ,508 + ,333.8 + ,493 + ,347.7 + ,490 + ,383.2 + ,469 + ,407.1 + ,478 + ,413.6 + ,528 + ,362.7 + ,534 + ,321.9 + ,518 + ,239.4 + ,506 + ,191 + ,502 + ,159.7 + ,516 + ,163.4 + ,528 + ,157.6 + ,533 + ,166.2 + ,536 + ,176.7 + ,537 + ,198.3 + ,524 + ,226.2 + ,536 + ,216.2 + ,587 + ,235.9 + ,597 + ,226.9 + ,581 + ,242.3 + ,564 + ,253.1 + ,558) + ,dim=c(2 + ,155) + ,dimnames=list(c('Prijsindexcijfers' + ,'Werkloosheid') + ,1:155)) > y <- array(NA,dim=c(2,155),dimnames=list(c('Prijsindexcijfers','Werkloosheid'),1:155)) > 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/19uc51261226822.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] 2 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 3.3299, p-value = 0.0008688 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1807572 > 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/2k6ep1261226822.tab") > > try(system("convert tmp/19uc51261226822.ps tmp/19uc51261226822.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.435 0.192 0.529