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(2926686 + ,29211 + ,45319 + ,18234 + ,2944920 + ,29870 + ,46603 + ,18989 + ,2963909 + ,32045 + ,47943 + ,18315 + ,2982224 + ,32209 + ,45773 + ,16020 + ,2998244 + ,32062 + ,53225 + ,21277 + ,3019521 + ,31623 + ,57281 + ,25816 + ,3045337 + ,32652 + ,62241 + ,29747 + ,3075084 + ,30030 + ,61814 + ,32185 + ,3107269 + ,29220 + ,70727 + ,39228 + ,3146497 + ,29894 + ,67625 + ,37028 + ,3183525 + ,28375 + ,65618 + ,34974 + ,3218499 + ,29082 + ,63052 + ,31455 + ,3249954 + ,29699 + ,62410 + ,30342 + ,3280296 + ,27736 + ,60571 + ,31150 + ,3311446 + ,28417 + ,62543 + ,32564 + ,3344010 + ,28412 + ,62985 + ,33756 + ,3377766 + ,29158 + ,62739 + ,32960 + ,3410726 + ,29099 + ,63552 + ,34947 + ,3445673 + ,29981 + ,64171 + ,30217 + ,3475890 + ,30560 + ,63063 + ,32096 + ,3507986 + ,31645 + ,62985 + ,30015 + ,3538001 + ,31761 + ,63005 + ,29706 + ,3567707 + ,32543 + ,61880 + ,27064 + ,3594771 + ,33313 + ,62555 + ,30058 + ,3624829 + ,34318 + ,62254 + ,28177 + ,3653006 + ,36850 + ,63290 + ,27062 + ,3680068 + ,35171 + ,65570 + ,28541 + ,3708609 + ,35317 + ,66277 + ,29117 + ,3737726 + ,36010 + ,67061 + ,30572 + ,3768298 + ,36216 + ,66779 + ,32482 + ,3800780 + ,37668 + ,67350 + ,31412 + ,3832192 + ,38994 + ,67746 + ,31029 + ,3863221 + ,38723 + ,64551 + ,25084 + ,3888305 + ,38981 + ,65550 + ,29468 + ,3917773 + ,39375 + ,64260 + ,30462 + ,3948235 + ,39958 + ,61208 + ,24755 + ,3972990 + ,39464 + ,59603 + ,24535 + ,3997525 + ,40061 + ,56345 + ,19576 + ,4017101 + ,40216 + ,53474 + ,18101 + ,4035202 + ,39824 + ,50877 + ,16006 + ,4051208 + ,40682 + ,51749 + ,14926 + ,4066134 + ,41632 + ,51580 + ,12766 + ,4078900 + ,41340 + ,51039 + ,13440 + ,4092340 + ,41893 + ,50708 + ,14723 + ,4107063 + ,41454 + ,51245 + ,15448 + ,4122511 + ,42224 + ,49937 + ,11842 + ,4134353 + ,42581 + ,50274 + ,11492 + ,4145845 + ,44372 + ,51134 + ,13342 + ,4159187 + ,43560 + ,52514 + ,16334 + ,4175521 + ,44959 + ,54027 + ,22768 + ,4198289 + ,45354 + ,57526 + ,22397 + ,4220686 + ,45173 + ,59303 + ,12430 + ,4233116 + ,46021 + ,60939 + ,16714 + ,4249830 + ,44923 + ,60808 + ,23804 + ,4273634 + ,44731 + ,60109 + ,25533 + ,4299167 + ,46597 + ,59678 + ,25648 + ,4324815 + ,44071 + ,60092 + ,23595 + ,4348410 + ,45190 + ,60292 + ,21547 + ,4369957 + ,43860 + ,60927 + ,22757 + ,4392714 + ,44595 + ,59801 + ,24885 + ,4417599 + ,44112 + ,58352 + ,27730 + ,4445329 + ,45170 + ,59298 + ,33168 + ,4478497 + ,44002 + ,59234 + ,24939 + ,4503436 + ,43981 + ,56696 + ,20630 + ,4524066 + ,44465 + ,55434 + ,28186 + ,4552252 + ,42478 + ,56458 + ,25205 + ,4577457 + ,41200 + ,56951 + ,28906 + ,4606363 + ,41232 + ,56756 + ,33856) + ,dim=c(4 + ,68) + ,dimnames=list(c('Totalepopulatie' + ,'sterftecijfer' + ,'geboortecijfer' + ,'populatieaangroei') + ,1:68)) > y <- array(NA,dim=c(4,68),dimnames=list(c('Totalepopulatie','sterftecijfer','geboortecijfer','populatieaangroei'),1:68)) > 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/1eoon1258136889.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.8294, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7322212 > 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/2r6571258136889.tab") > > system("convert tmp/1eoon1258136889.ps tmp/1eoon1258136889.png") > > > proc.time() user system elapsed 0.504 0.227 0.572