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(5 + ,2 + ,1 + ,3 + ,73 + ,62 + ,66 + ,12 + ,1 + ,1 + ,1 + ,58 + ,54 + ,54 + ,11 + ,1 + ,1 + ,3 + ,68 + ,41 + ,82 + ,6 + ,1 + ,1 + ,3 + ,62 + ,49 + ,61 + ,12 + ,1 + ,2 + ,3 + ,65 + ,49 + ,65 + ,11 + ,1 + ,1 + ,3 + ,81 + ,72 + ,77 + ,12 + ,1 + ,1 + ,1 + ,73 + ,78 + ,66 + ,7 + ,2 + ,4 + ,3 + ,64 + ,58 + ,66 + ,8 + ,1 + ,1 + ,3 + ,68 + ,58 + ,66 + ,13 + ,1 + ,1 + ,1 + ,51 + ,23 + ,48 + ,12 + ,1 + ,1 + ,1 + ,68 + ,39 + ,57 + ,13 + ,1 + ,1 + ,3 + ,61 + ,63 + ,80 + ,12 + ,1 + ,1 + ,1 + ,69 + ,46 + ,60 + ,12 + ,1 + ,3 + ,3 + ,73 + ,58 + ,70 + ,11 + ,2 + ,1 + ,3 + ,61 + ,39 + ,85 + ,12 + ,2 + ,1 + ,1 + ,62 + ,44 + ,59 + ,12 + ,1 + ,1 + ,1 + ,63 + ,49 + ,72 + ,12 + ,1 + ,6 + ,1 + ,69 + ,57 + ,70 + ,11 + ,2 + ,1 + ,3 + ,47 + ,76 + ,74 + ,13 + ,2 + ,1 + ,1 + ,66 + ,63 + ,70 + ,9 + ,1 + ,1 + ,3 + ,58 + ,18 + ,51 + ,11 + ,2 + ,1 + ,3 + ,63 + ,40 + ,70 + ,11 + ,1 + ,1 + ,1 + ,69 + ,59 + ,71 + ,11 + ,2 + ,1 + ,3 + ,59 + ,62 + ,72 + ,9 + ,1 + ,1 + ,1 + ,59 + ,70 + ,50 + ,11 + ,2 + ,1 + ,4 + ,63 + ,65 + ,69 + ,12 + ,2 + ,1 + ,3 + ,65 + ,56 + ,73 + ,12 + ,1 + ,1 + ,3 + ,65 + ,45 + ,66 + ,10 + ,2 + ,1 + ,3 + ,71 + ,57 + ,73 + ,12 + ,1 + ,4 + ,3 + ,60 + ,50 + ,58 + ,12 + ,2 + ,1 + ,1 + ,81 + ,40 + ,78 + ,12 + ,1 + ,1 + ,3 + ,67 + ,58 + ,83 + ,9 + ,2 + ,1 + ,3 + ,66 + ,49 + ,76 + ,9 + ,1 + ,1 + ,3 + ,62 + ,49 + ,77 + ,12 + ,1 + ,1 + ,3 + ,63 + ,27 + ,79 + ,14 + ,2 + ,1 + ,1 + ,73 + ,51 + ,71 + ,12 + ,2 + ,1 + ,3 + ,55 + ,75 + ,79 + ,11 + ,1 + ,1 + ,1 + ,59 + ,65 + ,60 + ,9 + ,1 + ,1 + ,2 + ,64 + ,47 + ,73 + ,11 + ,2 + ,1 + ,3 + ,63 + ,49 + ,70 + ,7 + ,1 + ,1 + ,1 + ,64 + ,65 + ,42 + ,15 + ,1 + ,1 + ,1 + ,73 + ,61 + ,74 + ,11 + ,1 + ,1 + ,3 + ,54 + ,46 + ,68 + ,12 + ,1 + ,1 + ,3 + ,76 + ,69 + ,83 + ,12 + ,2 + ,2 + ,1 + ,74 + ,55 + ,62 + ,9 + ,2 + ,1 + ,3 + ,63 + ,78 + ,79 + ,12 + ,2 + ,1 + ,3 + ,73 + ,58 + ,61 + ,11 + ,2 + ,1 + ,3 + ,67 + ,34 + ,86 + ,11 + ,2 + ,2 + ,3 + ,68 + ,67 + ,64 + ,8 + ,1 + ,4 + ,3 + ,66 + ,45 + ,75 + ,7 + ,2 + ,1 + ,1 + ,62 + ,68 + ,59 + ,12 + ,2 + ,4 + ,3 + ,71 + ,49 + ,82 + ,8 + ,1 + ,1 + ,2 + ,63 + ,19 + ,61 + ,10 + ,1 + ,1 + ,1 + ,75 + ,72 + ,69 + ,12 + ,1 + ,2 + ,2 + ,77 + ,59 + ,60 + ,15 + ,2 + ,3 + ,3 + ,62 + ,46 + ,59 + ,12 + ,1 + ,1 + ,3 + ,74 + ,56 + ,81 + ,12 + ,2 + ,2 + ,1 + ,67 + ,45 + ,65 + ,12 + ,2 + ,1 + ,3 + ,56 + ,53 + ,60 + ,12 + ,2 + ,1 + ,1 + ,60 + ,67 + ,60 + ,8 + ,2 + ,1 + ,3 + ,58 + ,73 + ,45 + ,10 + ,1 + ,1 + ,3 + ,65 + ,46 + ,75 + ,14 + ,2 + ,1 + ,3 + ,49 + ,70 + ,84 + ,10 + ,1 + ,1 + ,3 + ,61 + ,38 + ,77 + ,12 + ,2 + ,1 + ,3 + ,66 + ,54 + ,64 + ,14 + ,2 + ,1 + ,3 + ,64 + ,46 + ,54 + ,6 + ,2 + ,1 + ,1 + ,65 + ,46 + ,72 + ,11 + ,1 + ,1 + ,3 + ,46 + ,45 + ,56 + ,10 + ,2 + ,1 + ,3 + ,65 + ,47 + ,67 + ,14 + ,2 + ,1 + ,3 + ,81 + ,25 + ,81 + ,12 + ,1 + ,1 + ,1 + ,72 + ,63 + ,73 + ,13 + ,2 + ,1 + ,1 + ,65 + ,46 + ,67 + ,11 + ,2 + ,1 + ,3 + ,74 + ,69 + ,72 + ,11 + ,1 + ,1 + ,3 + ,59 + ,43 + ,69 + ,12 + ,1 + ,1 + ,1 + ,69 + ,49 + ,71 + ,13 + ,2 + ,2 + ,3 + ,58 + ,39 + ,77 + ,12 + ,1 + ,1 + ,1 + ,71 + ,65 + ,63 + ,8 + ,2 + ,1 + ,3 + ,79 + ,54 + ,49 + ,12 + ,2 + ,1 + ,3 + ,68 + ,50 + ,74 + ,11 + ,1 + ,1 + ,3 + ,66 + ,42 + ,76 + ,10 + ,2 + ,1 + ,3 + ,62 + ,45 + ,65 + ,12 + ,1 + ,1 + ,3 + ,69 + ,50 + ,65 + ,11 + ,2 + ,2 + ,7 + ,63 + ,55 + ,69 + ,12 + ,1 + ,1 + ,1 + ,62 + ,38 + ,71 + ,12 + ,1 + ,1 + ,3 + ,61 + ,40 + ,68 + ,10 + ,2 + ,1 + ,1 + ,65 + ,51 + ,49 + ,12 + ,1 + ,1 + ,3 + ,64 + ,49 + ,86 + ,12 + ,2 + ,1 + ,1 + ,56 + ,39 + ,63 + ,11 + ,2 + ,1 + ,3 + ,56 + ,57 + ,77 + ,10 + ,1 + ,1 + ,3 + ,48 + ,30 + ,52 + ,12 + ,1 + ,1 + ,1 + ,74 + ,51 + ,73 + ,11 + ,1 + ,1 + ,1 + ,69 + ,48 + ,63 + ,12 + ,1 + ,4 + ,3 + ,62 + ,56 + ,54 + ,12 + ,1 + ,1 + ,2 + ,73 + ,66 + ,56 + ,10 + ,1 + ,1 + ,1 + ,64 + ,72 + ,54 + ,11 + ,1 + ,1 + ,1 + ,57 + ,28 + ,61 + ,10 + ,1 + ,1 + ,2 + ,57 + ,52 + ,70 + ,11 + ,2 + ,1 + ,2 + ,60 + ,53 + ,68 + ,11 + ,2 + ,1 + ,1 + ,61 + ,70 + ,63 + ,12 + ,1 + ,1 + ,2 + ,72 + ,63 + ,76 + ,11 + ,1 + ,1 + ,3 + ,57 + ,46 + ,69 + ,11 + ,1 + ,2 + ,3 + ,51 + ,45 + ,71 + ,7 + ,1 + ,1 + ,2 + ,63 + ,68 + ,39 + ,12 + ,1 + ,1 + ,3 + ,54 + ,54 + ,54 + ,8 + ,1 + ,1 + ,1 + ,72 + ,60 + ,64 + ,10 + ,1 + ,1 + ,3 + ,62 + ,50 + ,70 + ,12 + ,1 + ,1 + ,2 + ,68 + ,66 + ,76 + ,11 + ,1 + ,1 + ,3 + ,62 + ,56 + ,71 + ,13 + ,2 + ,1 + ,2 + ,63 + ,54 + ,73 + ,9 + ,1 + ,1 + ,3 + ,77 + ,72 + ,81 + ,11 + ,1 + ,1 + ,1 + ,57 + ,34 + ,50 + ,13 + ,1 + ,1 + ,1 + ,57 + ,39 + ,42 + ,8 + ,1 + ,1 + ,3 + ,61 + ,66 + ,66 + ,12 + ,1 + ,1 + ,3 + ,65 + ,27 + ,77 + ,11 + ,1 + ,1 + ,3 + ,63 + ,63 + ,62 + ,11 + ,2 + ,1 + ,1 + ,66 + ,65 + ,66 + ,12 + ,1 + ,1 + ,3 + ,68 + ,63 + ,69 + ,13 + ,1 + ,1 + ,3 + ,72 + ,49 + ,72 + ,11 + ,1 + ,1 + ,1 + ,68 + ,42 + ,67 + ,10 + ,1 + ,1 + ,1 + ,59 + ,51 + ,59 + ,10 + ,1 + ,4 + ,3 + ,56 + ,50 + ,66 + ,10 + ,1 + ,1 + ,1 + ,62 + ,64 + ,68 + ,12 + ,2 + ,1 + ,3 + ,72 + ,68 + ,72 + ,12 + ,2 + ,1 + ,3 + ,68 + ,66 + ,73 + ,13 + ,1 + ,1 + ,3 + ,67 + ,59 + ,69 + ,11 + ,1 + ,2 + ,1 + ,54 + ,32 + ,57 + ,11 + ,2 + ,1 + ,1 + ,69 + ,62 + ,55 + ,12 + ,1 + ,2 + ,3 + ,61 + ,52 + ,72 + ,9 + ,1 + ,1 + ,3 + ,55 + ,34 + ,68 + ,11 + ,2 + ,1 + ,3 + ,75 + ,63 + ,83 + ,12 + ,1 + ,1 + ,3 + ,55 + ,48 + ,74 + ,12 + ,1 + ,1 + ,3 + ,49 + ,53 + ,72 + ,13 + ,2 + ,1 + ,3 + ,54 + ,39 + ,66 + ,6 + ,1 + ,1 + ,3 + ,66 + ,51 + ,61 + ,11 + ,1 + ,1 + ,3 + ,73 + ,60 + ,86 + ,10 + ,2 + ,1 + ,2 + ,63 + ,70 + ,81 + ,12 + ,2 + ,4 + ,3 + ,61 + ,40 + ,79 + ,11 + ,1 + ,1 + ,3 + ,74 + ,61 + ,73 + ,12 + ,2 + ,5 + ,3 + ,81 + ,35 + ,59 + ,12 + ,1 + ,1 + ,1 + ,62 + ,39 + ,64 + ,7 + ,1 + ,1 + ,2 + ,64 + ,31 + ,75 + ,12 + ,1 + ,1 + ,3 + ,62 + ,36 + ,68 + ,12 + ,1 + ,1 + ,1 + ,85 + ,51 + ,84 + ,9 + ,1 + ,1 + ,1 + ,74 + ,55 + ,68 + ,12 + ,1 + ,1 + ,3 + ,51 + ,67 + ,68 + ,12 + ,1 + ,1 + ,3 + ,66 + ,40 + ,69) + ,dim=c(7 + ,146) + ,dimnames=list(c('FF' + ,'Geslacht' + ,'Opvoeding' + ,'Huwelijksstatus' + ,'TotNV' + ,'TotAngst' + ,'TotGroep') + ,1:146)) > y <- array(NA,dim=c(7,146),dimnames=list(c('FF','Geslacht','Opvoeding','Huwelijksstatus','TotNV','TotAngst','TotGroep'),1:146)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'kendall' > main = 'Correlation Matrix' > par1 <- 'kendall' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical 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=par1) + 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/16lsf1292185033.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") > > n <- length(y[,1]) > n [1] 7 > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ',header=TRUE) > for (i in 1:n) { + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + } > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + for (j in 1:n) { + r <- cor.test(y[i,],y[j,],method=par1) + a<-table.element(a,round(r$estimate,3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/21c851292185033.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'Pearson r',1,TRUE) > a<-table.element(a,'Spearman rho',1,TRUE) > a<-table.element(a,'Kendall tau',1,TRUE) > a<-table.row.end(a) > cor.test(y[1,],y[2,],method=par1) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 0.8634, p-value = 0.3879 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.06409474 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') + a<-table.element(a,dum,header=TRUE) + rp <- cor.test(y[i,],y[j,],method='pearson') + a<-table.element(a,round(rp$estimate,4)) + rs <- cor.test(y[i,],y[j,],method='spearman') + a<-table.element(a,round(rs$estimate,4)) + rk <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,round(rk$estimate,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-value',header=T) + a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) + a<-table.row.end(a) + } + } There were 21 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3g46w1292185033.tab") > > try(system("convert tmp/16lsf1292185033.ps tmp/16lsf1292185033.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.211 0.392 2.637