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(1178 + ,2529 + ,22 + ,476049 + ,2141 + ,2196 + ,27 + ,474605 + ,2238 + ,3202 + ,24 + ,470439 + ,2685 + ,2718 + ,24 + ,461251 + ,4341 + ,2728 + ,22 + ,454724 + ,5376 + ,2354 + ,23 + ,455626 + ,4478 + ,2697 + ,25 + ,516847 + ,6404 + ,2651 + ,23 + ,525192 + ,4617 + ,2067 + ,21 + ,522975 + ,3024 + ,2641 + ,21 + ,518585 + ,1897 + ,2539 + ,22 + ,509239 + ,2075 + ,2294 + ,20 + ,512238 + ,1351 + ,2712 + ,22 + ,519164 + ,2211 + ,2314 + ,22 + ,517009 + ,2453 + ,3092 + ,20 + ,509933 + ,3042 + ,2677 + ,21 + ,509127 + ,4765 + ,2813 + ,20 + ,500857 + ,4992 + ,2668 + ,21 + ,506971 + ,4601 + ,2939 + ,21 + ,569323 + ,6266 + ,2617 + ,21 + ,579714 + ,4812 + ,2231 + ,19 + ,577992 + ,3159 + ,2481 + ,21 + ,565464 + ,1916 + ,2421 + ,21 + ,547344 + ,2237 + ,2408 + ,22 + ,554788 + ,1595 + ,2560 + ,19 + ,562325 + ,2453 + ,2100 + ,24 + ,560854 + ,2226 + ,3315 + ,22 + ,555332 + ,3597 + ,2801 + ,22 + ,543599 + ,4706 + ,2403 + ,22 + ,536662 + ,4974 + ,3024 + ,24 + ,542722 + ,5756 + ,2507 + ,22 + ,593530 + ,5493 + ,2980 + ,23 + ,610763 + ,5004 + ,2211 + ,24 + ,612613 + ,3225 + ,2471 + ,21 + ,611324 + ,2006 + ,2594 + ,20 + ,594167 + ,2291 + ,2452 + ,22 + ,595454 + ,1588 + ,2232 + ,23 + ,590865 + ,2105 + ,2373 + ,23 + ,589379 + ,2191 + ,3127 + ,22 + ,584428 + ,3591 + ,2802 + ,20 + ,573100 + ,4668 + ,2641 + ,21 + ,567456 + ,4885 + ,2787 + ,21 + ,569028 + ,5822 + ,2619 + ,20 + ,620735 + ,5599 + ,2806 + ,20 + ,628884 + ,5340 + ,2193 + ,17 + ,628232 + ,3082 + ,2323 + ,18 + ,612117 + ,2010 + ,2529 + ,19 + ,595404 + ,2301 + ,2412 + ,19 + ,597141 + ,1514 + ,2262 + ,20 + ,593408 + ,1979 + ,2154 + ,21 + ,590072 + ,2480 + ,3230 + ,20 + ,579799 + ,3499 + ,2295 + ,21 + ,574205 + ,4676 + ,2715 + ,19 + ,572775 + ,5585 + ,2733 + ,22 + ,572942 + ,5610 + ,2317 + ,20 + ,619567 + ,5796 + ,2730 + ,18 + ,625809 + ,6199 + ,1913 + ,16 + ,619916 + ,3030 + ,2390 + ,17 + ,587625 + ,1930 + ,2484 + ,18 + ,565742 + ,2552 + ,1960 + ,19 + ,557274) + ,dim=c(4 + ,60) + ,dimnames=list(c('Hwlkn' + ,'Schdngn' + ,'FinSit' + ,'TotWerk ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Hwlkn','Schdngn','FinSit','TotWerk '),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: 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/135mb1194126255.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd 4: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd > 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 = 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/2p6v91194126256.tab") > > system("convert tmp/135mb1194126255.ps tmp/135mb1194126255.png") > > > proc.time() user system elapsed 0.735 0.211 0.869