R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(540 + ,2863 + ,91.0 + ,39892 + ,522 + ,2688 + ,85.3 + ,32194 + ,526 + ,3041 + ,89.5 + ,21629 + ,527 + ,3119 + ,76.1 + ,59968 + ,516 + ,3102 + ,76.1 + ,45694 + ,503 + ,4608 + ,91.5 + ,55756 + ,489 + ,3466 + ,85.4 + ,48554 + ,479 + ,3748 + ,80.0 + ,41052 + ,475 + ,4541 + ,94.0 + ,49822 + ,524 + ,3650 + ,72.6 + ,39191 + ,552 + ,4274 + ,80.8 + ,31994 + ,532 + ,3827 + ,94.1 + ,35735 + ,511 + ,3778 + ,94.9 + ,38930 + ,492 + ,3453 + ,91.9 + ,33658 + ,492 + ,4160 + ,99.2 + ,23849 + ,493 + ,3595 + ,84.7 + ,58972 + ,481 + ,3914 + ,93.7 + ,59249 + ,462 + ,4159 + ,106.7 + ,63955 + ,457 + ,3676 + ,93.5 + ,53785 + ,442 + ,3794 + ,104.8 + ,52760 + ,439 + ,3446 + ,103.5 + ,44795 + ,488 + ,3504 + ,83.1 + ,37348 + ,521 + ,3958 + ,89.6 + ,32370 + ,501 + ,3353 + ,105.7 + ,32717 + ,485 + ,3480 + ,110.7 + ,40974 + ,464 + ,3098 + ,110.4 + ,33591 + ,460 + ,2944 + ,109.0 + ,21124 + ,467 + ,3389 + ,106.0 + ,58608 + ,460 + ,3497 + ,100.9 + ,46865 + ,448 + ,4404 + ,114.3 + ,51378 + ,443 + ,3849 + ,101.2 + ,46235 + ,436 + ,3734 + ,109.2 + ,47206 + ,431 + ,3060 + ,111.6 + ,45382 + ,484 + ,3507 + ,91.7 + ,41227 + ,510 + ,3287 + ,93.7 + ,33795 + ,513 + ,3215 + ,105.7 + ,31295 + ,503 + ,3764 + ,109.5 + ,42625 + ,471 + ,2734 + ,105.3 + ,33625 + ,471 + ,2837 + ,102.8 + ,21538 + ,476 + ,2766 + ,100.6 + ,56421 + ,475 + ,3851 + ,97.6 + ,53152 + ,470 + ,3289 + ,110.3 + ,53536 + ,461 + ,3848 + ,107.2 + ,52408 + ,455 + ,3348 + ,107.2 + ,41454 + ,456 + ,3682 + ,108.1 + ,38271 + ,517 + ,4058 + ,97.1 + ,35306 + ,525 + ,3655 + ,92.2 + ,26414 + ,523 + ,3811 + ,112.2 + ,31917 + ,519 + ,3341 + ,111.6 + ,38030 + ,509 + ,3032 + ,115.7 + ,27534 + ,512 + ,3475 + ,111.3 + ,18387 + ,519 + ,3353 + ,104.2 + ,50556 + ,517 + ,3186 + ,103.2 + ,43901 + ,510 + ,3902 + ,112.7 + ,48572 + ,509 + ,4164 + ,106.4 + ,43899 + ,501 + ,3499 + ,102.6 + ,37532 + ,507 + ,4145 + ,110.6 + ,40357 + ,569 + ,3796 + ,95.2 + ,35489 + ,580 + ,3711 + ,89.0 + ,29027 + ,578 + ,3949 + ,112.5 + ,34485 + ,565 + ,3740 + ,116.8 + ,42598 + ,547 + ,3243 + ,107.2 + ,30306 + ,555 + ,4407 + ,113.6 + ,26451 + ,562 + ,4814 + ,101.8 + ,47460 + ,561 + ,3908 + ,102.6 + ,50104 + ,555 + ,5250 + ,122.7 + ,61465 + ,544 + ,3937 + ,110.3 + ,53726 + ,537 + ,4004 + ,110.5 + ,39477 + ,543 + ,5560 + ,121.6 + ,43895 + ,594 + ,3922 + ,100.3 + ,31481 + ,611 + ,3759 + ,100.7 + ,29896 + ,613 + ,4138 + ,123.4 + ,33842 + ,611 + ,4634 + ,127.1 + ,39120 + ,594 + ,3996 + ,124.1 + ,33702 + ,595 + ,4307 + ,131.2 + ,25094 + ,591 + ,4142 + ,111.6 + ,51442 + ,589 + ,4429 + ,114.2 + ,45594 + ,584 + ,5219 + ,130.1 + ,52518 + ,573 + ,4929 + ,125.9 + ,48564 + ,567 + ,5754 + ,119.0 + ,41745 + ,569 + ,5591 + ,133.8 + ,49585 + ,621 + ,4162 + ,107.5 + ,32747 + ,629 + ,4947 + ,113.5 + ,33379 + ,628 + ,5208 + ,134.4 + ,35645 + ,612 + ,4754 + ,126.8 + ,37034 + ,595 + ,4487 + ,135.6 + ,35681 + ,597 + ,5719 + ,139.9 + ,20972 + ,593 + ,5719 + ,129.8 + ,58552 + ,590 + ,4994 + ,131.0 + ,54955 + ,580 + ,6032 + ,153.1 + ,64540 + ,574 + ,4897 + ,134.1 + ,51570 + ,573 + ,5339 + ,144.1 + ,51145 + ,573 + ,5571 + ,155.9 + ,46641 + ,620 + ,4635 + ,123.3 + ,35704 + ,626 + ,4733 + ,128.1 + ,33253 + ,620 + ,5004 + ,144.3 + ,35193 + ,588 + ,5322 + ,153.0 + ,41668 + ,566 + ,4168 + ,149.9 + ,34865 + ,557 + ,4633 + ,150.9 + ,21210 + ,561 + ,4763 + ,141.0 + ,56126 + ,549 + ,4252 + ,138.9 + ,49321 + ,532 + ,4996 + ,157.4 + ,59723 + ,526 + ,4261 + ,142.7 + ,48103 + ,511 + ,4084 + ,151.5 + ,47472 + ,499 + ,5084 + ,160.8 + ,50497 + ,555 + ,4236 + ,138.6 + ,40059) + ,dim=c(4 + ,106) + ,dimnames=list(c('werkloosheid' + ,'bouwvergunningen' + ,'omzetcijfer' + ,'personenwagens') + ,1:106)) > y <- array(NA,dim=c(4,106),dimnames=list(c('werkloosheid','bouwvergunningen','omzetcijfer','personenwagens'),1:106)) > 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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/1q0g31196246943.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 > 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 = 6.1513, p-value = 7.685e-10 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4058738 > 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/2hinv1196246943.tab") > > system("convert tmp/1q0g31196246943.ps tmp/1q0g31196246943.png") > > > proc.time() user system elapsed 0.816 0.253 0.928