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(31.33 + ,112.39 + ,5.39 + ,105.81 + ,56.94 + ,97.59 + ,1.96 + ,107.16 + ,59.52 + ,142.30 + ,4.41 + ,107.83 + ,71.40 + ,120.79 + ,20.09 + ,108.85 + ,115.44 + ,121.24 + ,28.91 + ,109.52 + ,142.97 + ,104.61 + ,36.26 + ,110.19 + ,119.09 + ,119.86 + ,36.26 + ,111.20 + ,170.31 + ,117.81 + ,33.32 + ,111.54 + ,122.78 + ,91.86 + ,45.57 + ,111.88 + ,80.42 + ,117.37 + ,44.10 + ,112.55 + ,50.45 + ,112.84 + ,44.59 + ,112.55 + ,55.18 + ,101.95 + ,39.20 + ,112.55 + ,35.93 + ,120.52 + ,36.26 + ,114.24 + ,58.80 + ,102.84 + ,38.22 + ,116.26 + ,65.24 + ,137.41 + ,32.34 + ,116.60 + ,80.90 + ,118.97 + ,27.44 + ,118.62 + ,126.72 + ,125.01 + ,19.60 + ,119.63 + ,132.76 + ,118.57 + ,20.58 + ,120.64 + ,122.36 + ,130.61 + ,23.52 + ,121.65 + ,166.64 + ,116.30 + ,25.48 + ,122.33 + ,127.97 + ,99.15 + ,29.40 + ,122.66 + ,84.01 + ,110.26 + ,24.50 + ,123.00 + ,50.95 + ,107.59 + ,23.52 + ,123.34 + ,59.49 + ,107.01 + ,29.40 + ,124.68 + ,42.42 + ,113.77 + ,26.46 + ,125.02 + ,65.24 + ,93.33 + ,29.40 + ,125.02 + ,59.20 + ,147.32 + ,32.83 + ,125.36 + ,95.66 + ,124.48 + ,39.69 + ,125.70 + ,125.15 + ,106.79 + ,40.67 + ,125.70 + ,132.28 + ,134.39 + ,39.69 + ,126.03 + ,153.07 + ,111.41 + ,41.65 + ,126.37 + ,146.08 + ,132.43 + ,53.90 + ,126.37 + ,133.08 + ,98.26 + ,52.43 + ,126.71 + ,85.77 + ,109.81 + ,47.53 + ,126.71 + ,53.35 + ,115.28 + ,45.08 + ,127.04 + ,60.93 + ,108.97 + ,42.14 + ,127.04 + ,42.23 + ,99.19 + ,46.06 + ,127.38 + ,55.98 + ,105.46 + ,36.75 + ,127.72 + ,58.27 + ,138.97 + ,21.56 + ,128.05 + ,95.50 + ,124.52 + ,15.19 + ,129.40 + ,124.14 + ,117.37 + ,15.19 + ,131.09 + ,129.91 + ,123.86 + ,27.93 + ,131.42 + ,154.83 + ,116.39 + ,20.09 + ,131.76 + ,148.90 + ,124.70 + ,16.17 + ,132.10 + ,142.01 + ,97.46 + ,9.31 + ,132.43 + ,81.96 + ,103.24 + ,14.21 + ,132.77 + ,53.45 + ,112.39 + ,25.48 + ,132.77 + ,61.19 + ,107.19 + ,30.38 + ,133.11 + ,40.26 + ,100.53 + ,43.12 + ,133.45 + ,52.63 + ,95.73 + ,44.10 + ,133.78 + ,65.95 + ,143.54 + ,56.84 + ,134.12 + ,93.05 + ,101.99 + ,50.47 + ,134.46 + ,124.35 + ,120.66 + ,61.74 + ,134.79 + ,148.53 + ,121.46 + ,47.53 + ,134.79 + ,149.19 + ,102.97 + ,56.84 + ,135.13 + ,154.14 + ,121.32 + ,46.06 + ,135.13 + ,164.86 + ,85.02 + ,47.04 + ,136.82 + ,80.58 + ,106.21 + ,53.90 + ,137.15 + ,51.33 + ,110.39 + ,48.02 + ,142.54 + ,67.87 + ,87.10 + ,44.10 + ,143.89) + ,dim=c(4 + ,60) + ,dimnames=list(c('Huwelijk' + ,'Echtsch' + ,'Econo' + ,'Werkloos') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Huwelijk','Echtsch','Econo','Werkloos'),1:60)) > 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/1dur11262091784.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 = 0.8483, p-value = 0.3963 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.07520498 > 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/2a0781262091784.tab") > try(system("convert tmp/1dur11262091784.ps tmp/1dur11262091784.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.473 0.213 0.736