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(562 + ,136 + ,426 + ,3397 + ,561 + ,133 + ,428 + ,3971 + ,555 + ,126 + ,430 + ,4625 + ,544 + ,120 + ,424 + ,4486 + ,537 + ,114 + ,423 + ,4132 + ,543 + ,116 + ,427 + ,4685 + ,594 + ,153 + ,441 + ,3172 + ,611 + ,162 + ,449 + ,4280 + ,613 + ,161 + ,452 + ,4207 + ,611 + ,149 + ,462 + ,4158 + ,594 + ,139 + ,455 + ,3933 + ,595 + ,135 + ,461 + ,3151 + ,591 + ,130 + ,461 + ,3616 + ,589 + ,127 + ,463 + ,4221 + ,584 + ,122 + ,462 + ,4436 + ,573 + ,117 + ,456 + ,4807 + ,567 + ,112 + ,455 + ,4849 + ,569 + ,113 + ,456 + ,5024 + ,621 + ,149 + ,472 + ,3521 + ,629 + ,157 + ,472 + ,4650 + ,628 + ,157 + ,471 + ,5393 + ,612 + ,147 + ,465 + ,5147 + ,595 + ,137 + ,459 + ,4845 + ,597 + ,132 + ,465 + ,3995 + ,593 + ,125 + ,468 + ,4493 + ,590 + ,123 + ,467 + ,4680 + ,580 + ,117 + ,463 + ,5463 + ,574 + ,114 + ,460 + ,4761 + ,573 + ,111 + ,462 + ,5307 + ,573 + ,112 + ,461 + ,5069 + ,620 + ,144 + ,476 + ,3501 + ,626 + ,150 + ,476 + ,4952 + ,620 + ,149 + ,471 + ,5152 + ,588 + ,134 + ,453 + ,5317 + ,566 + ,123 + ,443 + ,5189 + ,557 + ,116 + ,442 + ,4030 + ,561 + ,117 + ,444 + ,4420 + ,549 + ,111 + ,438 + ,4571 + ,532 + ,105 + ,427 + ,4551 + ,526 + ,102 + ,424 + ,4819 + ,511 + ,95 + ,416 + ,5133 + ,499 + ,93 + ,406 + ,4532 + ,555 + ,124 + ,431 + ,3339 + ,565 + ,130 + ,434 + ,4380 + ,542 + ,124 + ,418 + ,4632 + ,527 + ,115 + ,412 + ,4719 + ,510 + ,106 + ,404 + ,4212 + ,514 + ,105 + ,409 + ,3615 + ,517 + ,105 + ,412 + ,3420 + ,508 + ,101 + ,406 + ,4571 + ,493 + ,95 + ,398 + ,4407 + ,490 + ,93 + ,397 + ,4386 + ,469 + ,84 + ,385 + ,4386 + ,478 + ,87 + ,390 + ,4744 + ,528 + ,116 + ,413 + ,3185 + ,534 + ,120 + ,413 + ,3890 + ,518 + ,117 + ,401 + ,4520 + ,506 + ,109 + ,397 + ,3990 + ,502 + ,105 + ,397 + ,3809 + ,516 + ,107 + ,409 + ,3236 + ,528 + ,109 + ,419 + ,3551 + ,533 + ,109 + ,424 + ,3264 + ,536 + ,108 + ,428 + ,3579 + ,537 + ,107 + ,430 + ,3537 + ,524 + ,99 + ,424 + ,3038 + ,536 + ,103 + ,433 + ,2888 + ,587 + ,131 + ,456 + ,2198) + ,dim=c(4 + ,67) + ,dimnames=list(c('TotWL' + ,'<25WL' + ,'>25WL' + ,'woningen') + ,1:67)) > y <- array(NA,dim=c(4,67),dimnames=list(c('TotWL','<25WL','>25WL','woningen'),1:67)) > 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/162gc1261140686.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.7246, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7359602 > 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/26kn21261140686.tab") > try(system("convert tmp/162gc1261140686.ps tmp/162gc1261140686.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.500 0.217 0.583