R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(67.8 + ,621 + ,66.9 + ,604 + ,71.5 + ,584 + ,75.9 + ,574 + ,71.9 + ,555 + ,70.7 + ,545 + ,73.5 + ,599 + ,76.1 + ,620 + ,82.5 + ,608 + ,87.1 + ,590 + ,83.2 + ,579 + ,86.1 + ,580 + ,85.9 + ,579 + ,77.4 + ,572 + ,74.4 + ,560 + ,69.9 + ,551 + ,73.8 + ,537 + ,69.2 + ,541 + ,69.7 + ,588 + ,71 + ,607 + ,71.2 + ,599 + ,75.8 + ,578 + ,73 + ,563 + ,66.4 + ,566 + ,58.6 + ,561 + ,55.5 + ,554 + ,52.6 + ,540 + ,54.9 + ,526 + ,54.6 + ,512 + ,51.2 + ,505 + ,50.9 + ,554 + ,49.6 + ,584 + ,53.4 + ,569 + ,52 + ,540 + ,47.5 + ,522 + ,42.1 + ,526 + ,44.5 + ,527 + ,43.2 + ,516 + ,51.4 + ,503 + ,59.4 + ,489 + ,60.3 + ,479 + ,61.4 + ,475 + ,68.8 + ,524 + ,73.6 + ,552 + ,81.8 + ,532 + ,79.6 + ,511 + ,85.8 + ,492 + ,88.1 + ,492 + ,89.1 + ,493 + ,95 + ,481 + ,96.2 + ,462 + ,84.2 + ,457 + ,96.9 + ,442 + ,103.1 + ,439 + ,99.3 + ,488 + ,103.5 + ,521 + ,112.4 + ,501 + ,111.1 + ,485 + ,113.7 + ,464 + ,92 + ,460 + ,93 + ,467 + ,98.4 + ,460 + ,92.6 + ,448 + ,94.6 + ,443 + ,99.5 + ,436 + ,97.6 + ,431 + ,91.3 + ,484 + ,93.6 + ,510 + ,93.1 + ,513 + ,78.4 + ,503 + ,70.2 + ,471 + ,69.3 + ,471 + ,71.1 + ,476 + ,73.5 + ,475 + ,85.9 + ,470 + ,91.5 + ,461 + ,91.8 + ,455 + ,88.3 + ,456 + ,91.3 + ,517 + ,94 + ,525 + ,99.3 + ,523 + ,96.7 + ,519 + ,88 + ,509 + ,96.7 + ,512 + ,106.8 + ,519 + ,114.3 + ,517 + ,105.7 + ,510 + ,90.1 + ,509 + ,91.6 + ,501 + ,97.7 + ,507 + ,100.8 + ,569 + ,104.6 + ,580 + ,95.9 + ,578 + ,102.7 + ,565 + ,104 + ,547 + ,107.9 + ,555 + ,113.8 + ,562 + ,113.8 + ,561 + ,123.1 + ,555 + ,125.1 + ,544 + ,137.6 + ,537 + ,134 + ,543 + ,140.3 + ,594 + ,152.1 + ,611 + ,150.6 + ,613 + ,167.3 + ,611 + ,153.2 + ,594 + ,142 + ,595 + ,154.4 + ,591 + ,158.5 + ,589 + ,180.9 + ,584 + ,181.3 + ,573 + ,172.4 + ,567 + ,192 + ,569 + ,199.3 + ,621 + ,215.4 + ,629 + ,214.3 + ,628 + ,201.5 + ,612 + ,190.5 + ,595 + ,196 + ,597 + ,215.7 + ,593 + ,209.4 + ,590 + ,214.1 + ,580 + ,237.8 + ,574 + ,239 + ,573 + ,237.8 + ,573 + ,251.5 + ,620 + ,248.8 + ,626 + ,215.4 + ,620 + ,201.2 + ,588 + ,203.1 + ,566 + ,214.2 + ,557 + ,188.9 + ,561 + ,203 + ,549 + ,213.3 + ,532 + ,228.5 + ,526 + ,228.2 + ,511 + ,240.9 + ,499 + ,258.8 + ,555 + ,248.5 + ,565 + ,269.2 + ,542 + ,289.6 + ,527 + ,323.4 + ,510 + ,317.2 + ,514 + ,322.8 + ,517 + ,340.9 + ,508 + ,368.2 + ,493 + ,388.5 + ,490 + ,441.2 + ,469 + ,474.3 + ,478 + ,483.9 + ,528 + ,417.9 + ,534 + ,365.9 + ,518 + ,263 + ,506 + ,199.4 + ,502) + ,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/freestat/rcomp/tmp/19d9j1229869741.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 1.47, p-value = 0.1416 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.07982878 > 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/freestat/rcomp/tmp/23ugw1229869741.tab") > > system("convert tmp/19d9j1229869741.ps tmp/19d9j1229869741.png") > > > proc.time() user system elapsed 0.629 0.248 0.743