R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(211868 + ,43880 + ,229527 + ,43110 + ,229139 + ,44496 + ,198563 + ,44164 + ,195722 + ,40399 + ,202196 + ,36763 + ,205816 + ,37903 + ,212588 + ,35532 + ,214320 + ,35533 + ,220375 + ,32110 + ,204442 + ,33374 + ,206903 + ,35462 + ,214126 + ,33508 + ,226899 + ,36080 + ,223532 + ,34560 + ,195309 + ,38737 + ,186005 + ,38144 + ,188906 + ,37594 + ,191563 + ,36424 + ,189226 + ,36843 + ,186413 + ,37246 + ,178037 + ,38661 + ,166827 + ,40454 + ,169362 + ,44928 + ,174330 + ,48441 + ,187069 + ,48140 + ,186530 + ,45998 + ,158114 + ,47369 + ,151001 + ,49554 + ,159612 + ,47510 + ,161914 + ,44873 + ,164182 + ,45344 + ,169701 + ,42413 + ,171297 + ,36912 + ,166444 + ,43452 + ,173476 + ,42142 + ,182516 + ,44382 + ,202388 + ,43636 + ,202300 + ,44167 + ,168053 + ,44423 + ,167302 + ,42868 + ,172608 + ,43908 + ,178106 + ,42013 + ,185686 + ,38846 + ,194581 + ,35087 + ,194596 + ,33026 + ,197922 + ,34646 + ,208795 + ,37135 + ,230580 + ,37985 + ,240636 + ,43121 + ,240048 + ,43722 + ,211457 + ,43630 + ,211142 + ,42234 + ,214771 + ,39351 + ,212610 + ,39327 + ,219313 + ,35704 + ,219277 + ,30466 + ,231805 + ,28155 + ,229245 + ,29257 + ,241114 + ,29998 + ,248624 + ,32529 + ,265845 + ,34787 + ,256446 + ,33855 + ,219452 + ,34556 + ,217142 + ,31348 + ,221678 + ,30805 + ,227184 + ,28353 + ,230354 + ,24514 + ,235243 + ,21106 + ,237217 + ,21346 + ,233575 + ,23335 + ,244460 + ,24379 + ,243324 + ,26290 + ,260307 + ,30084 + ,241476 + ,29429 + ,203666 + ,30632 + ,200237 + ,27349 + ,204045 + ,27264 + ,209465 + ,27474 + ,213586 + ,24482 + ,216234 + ,21453 + ,213188 + ,18788 + ,208679 + ,19282 + ,217859 + ,19713 + ,227247 + ,21917 + ,243477 + ,23812 + ,232571 + ,23785 + ,191531 + ,24696 + ,186029 + ,24562 + ,189733 + ,23580 + ,190420 + ,24939 + ,194163 + ,23899 + ,198770 + ,21454 + ,195198 + ,19761 + ,193111 + ,19815 + ,195411 + ,20780 + ,202108 + ,23462 + ,215706 + ,25005 + ,206348 + ,24725 + ,166972 + ,26198 + ,166070 + ,27543 + ,169292 + ,26471 + ,175041 + ,26558 + ,177876 + ,25317 + ,181140 + ,22896 + ,179566 + ,22248 + ,175335 + ,23406 + ,184128 + ,25073 + ,189917 + ,27691 + ,194690 + ,30599 + ,179612 + ,31948 + ,150605 + ,32946 + ,150569 + ,34012 + ,153745 + ,32936 + ,155511 + ,32974 + ,159044 + ,30951 + ,163095 + ,29812 + ,159585 + ,29010 + ,158644 + ,31068 + ,166618 + ,32447 + ,176512 + ,34844 + ,200765 + ,35676 + ,182698 + ,35387 + ,153730 + ,36488 + ,156145 + ,35652 + ,161570 + ,33488 + ,165688 + ,32914 + ,173666 + ,29781 + ,180144 + ,27951) + ,dim=c(2 + ,129) + ,dimnames=list(c('Vacatures' + ,'Werkzoekend') + ,1:129)) > y <- array(NA,dim=c(2,129),dimnames=list(c('Vacatures','Werkzoekend'),1:129)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'pearson' > main = 'Correlation Matrix' > #'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/rcomp/tmp/19t0c1293034731.ps",horizontal=F,onefile=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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > n <- length(y[,1]) > n [1] 2 > 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/rcomp/tmp/2cby01293034731.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) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = -2.9225, df = 127, p-value = 0.004112 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.4062524 -0.0817171 sample estimates: cor -0.2510257 > 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) + } + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/3q3wq1293034731.tab") > > try(system("convert tmp/19t0c1293034731.ps tmp/19t0c1293034731.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.470 0.260 0.707