R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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. > y <- c(56,56,54,89,40,25,92,18,63,44,33,84,88,55,60,66,154,53,119,41,61,58,75,33,40,92,100,112,73,40,45,60,62,75,31,77,34,46,99,17,66,30,76,146,67,56,107,58,34,61,119,42,66,89,44,66,24,259,17,64,41,68,168,43,132,105,71,112,94,82,70,57,53,103,121,62,52,52,32,62,45,46,63,75,88,46,53,37,90,63,78,25,45,46,41,144,82,91,71,63,53,62,63,32,39,62,117,34,92,93,54,144,14,61,109,38,73,75,50,61,55,77,75,72,50,32,53,42,71,10,35,65,25,66,41,86,16,42,19,19,45,65,35,95,49,37,64,38,34,32,65,52,62,65,83,95,29,18,33,247,139,29,118,110,67,42,65,94,64,81,95,67,63,83,45,30,70,32,83,31,67,66,10,70,103,5,20,5,36,34,48,40,43,31,42,46,33,18,55,35,59,19,66,60,36,25,47,54,53,40,40,39,14,45,36,28,44,30,22,17,31,55,54,21,14,81,35,43,46,30,23,38,54,20,53,45,39,20,24,31,35,151,52,30,31,29,57,40,44,25,77,35,11,63,44,19,13,42,38,29,20,27,20,19,37,26,42,49,30,49,67,28,19,49,27,30,22,12,31,20,20,39,29,16,27,21,19,35,14) > x <- c(210907 + ,120982 + ,176508 + ,179321 + ,123185 + ,52746 + ,385534 + ,33170 + ,101645 + ,149061 + ,165446 + ,237213 + ,173326 + ,133131 + ,258873 + ,180083 + ,324799 + ,230964 + ,236785 + ,135473 + ,202925 + ,215147 + ,344297 + ,153935 + ,132943 + ,174724 + ,174415 + ,225548 + ,223632 + ,124817 + ,221698 + ,210767 + ,170266 + ,260561 + ,84853 + ,294424 + ,101011 + ,215641 + ,325107 + ,7176 + ,167542 + ,106408 + ,96560 + ,265769 + ,269651 + ,149112 + ,175824 + ,152871 + ,111665 + ,116408 + ,362301 + ,78800 + ,183167 + ,277965 + ,150629 + ,168809 + ,24188 + ,329267 + ,65029 + ,101097 + ,218946 + ,244052 + ,341570 + ,103597 + ,233328 + ,256462 + ,206161 + ,311473 + ,235800 + ,177939 + ,207176 + ,196553 + ,174184 + ,143246 + ,187559 + ,187681 + ,119016 + ,182192 + ,73566 + ,194979 + ,167488 + ,143756 + ,275541 + ,243199 + ,182999 + ,135649 + ,152299 + ,120221 + ,346485 + ,145790 + ,193339 + ,80953 + ,122774 + ,130585 + ,112611 + ,286468 + ,241066 + ,148446 + ,204713 + ,182079 + ,140344 + ,220516 + ,243060 + ,162765 + ,182613 + ,232138 + ,265318 + ,85574 + ,310839 + ,225060 + ,232317 + ,144966 + ,43287 + ,155754 + ,164709 + ,201940 + ,235454 + ,220801 + ,99466 + ,92661 + ,133328 + ,61361 + ,125930 + ,100750 + ,224549 + ,82316 + ,102010 + ,101523 + ,243511 + ,22938 + ,41566 + ,152474 + ,61857 + ,99923 + ,132487 + ,317394 + ,21054 + ,209641 + ,22648 + ,31414 + ,46698 + ,131698 + ,91735 + ,244749 + ,184510 + ,79863 + ,128423 + ,97839 + ,38214 + ,151101 + ,272458 + ,172494 + ,108043 + ,328107 + ,250579 + ,351067 + ,158015 + ,98866 + ,85439 + ,229242 + ,351619 + ,84207 + ,120445 + ,324598 + ,131069 + ,204271 + ,165543 + ,141722 + ,116048 + ,250047 + ,299775 + ,195838 + ,173260 + ,254488 + ,104389 + ,136084 + ,199476 + ,92499 + ,224330 + ,135781 + ,74408 + ,81240 + ,14688 + ,181633 + ,271856 + ,7199 + ,46660 + ,17547 + ,133368 + ,95227 + ,152601 + ,98146 + ,79619 + ,59194 + ,139942 + ,118612 + ,72880 + ,65475 + ,99643 + ,71965 + ,77272 + ,49289 + ,135131 + ,108446 + ,89746 + ,44296 + ,77648 + ,181528 + ,134019 + ,124064 + ,92630 + ,121848 + ,52915 + ,81872 + ,58981 + ,53515 + ,60812 + ,56375 + ,65490 + ,80949 + ,76302 + ,104011 + ,98104 + ,67989 + ,30989 + ,135458 + ,73504 + ,63123 + ,61254 + ,74914 + ,31774 + ,81437 + ,87186 + ,50090 + ,65745 + ,56653 + ,158399 + ,46455 + ,73624 + ,38395 + ,91899 + ,139526 + ,52164 + ,51567 + ,70551 + ,84856 + ,102538 + ,86678 + ,85709 + ,34662 + ,150580 + ,99611 + ,19349 + ,99373 + ,86230 + ,30837 + ,31706 + ,89806 + ,62088 + ,40151 + ,27634 + ,76990 + ,37460 + ,54157 + ,49862 + ,84337 + ,64175 + ,59382 + ,119308 + ,76702 + ,103425 + ,70344 + ,43410 + ,104838 + ,62215 + ,69304 + ,53117 + ,19764 + ,86680 + ,84105 + ,77945 + ,89113 + ,91005 + ,40248 + ,64187 + ,50857 + ,56613 + ,62792 + ,72535) > ylab = 'Logins' > xlab = 'Tijd in rfc (s)' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Pearson Correlation (v1.0.6) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_correlation.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > x <- x[!is.na(y)] > y <- y[!is.na(y)] > y <- y[!is.na(x)] > x <- x[!is.na(x)] > postscript(file="/var/fisher/rcomp/tmp/1ntl61356038012.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > histx <- hist(x, plot=FALSE) > histy <- hist(y, plot=FALSE) > maxcounts <- max(c(histx$counts, histx$counts)) > xrange <- c(min(x),max(x)) > yrange <- c(min(y),max(y)) > nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE) > par(mar=c(4,4,1,1)) > plot(x, y, xlim=xrange, ylim=yrange, xlab=xlab, ylab=ylab) > par(mar=c(0,4,1,1)) > barplot(histx$counts, axes=FALSE, ylim=c(0, maxcounts), space=0) > par(mar=c(4,0,1,1)) > barplot(histy$counts, axes=FALSE, xlim=c(0, maxcounts), space=0, horiz=TRUE) > dev.off() null device 1 > lx = length(x) > makebiased = (lx-1)/lx > varx = var(x)*makebiased > vary = var(y)*makebiased > corxy <- cor.test(x,y,method='pearson', na.rm = T) > cxy <- as.matrix(corxy$estimate)[1,1] > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Pearson Product Moment Correlation - Ungrouped Data',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Statistic',1,TRUE) > a<-table.element(a,'Variable X',1,TRUE) > a<-table.element(a,'Variable Y',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm','Mean',''),header=TRUE) > a<-table.element(a,mean(x)) > a<-table.element(a,mean(y)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/biased.htm','Biased Variance',''),header=TRUE) > a<-table.element(a,varx) > a<-table.element(a,vary) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/biased1.htm','Biased Standard Deviation',''),header=TRUE) > a<-table.element(a,sqrt(varx)) > a<-table.element(a,sqrt(vary)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/covariance.htm','Covariance',''),header=TRUE) > a<-table.element(a,cov(x,y),2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/pearson_correlation.htm','Correlation',''),header=TRUE) > a<-table.element(a,cxy,2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/coeff_of_determination.htm','Determination',''),header=TRUE) > a<-table.element(a,cxy*cxy,2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ttest_statistic.htm','T-Test',''),header=TRUE) > a<-table.element(a,as.matrix(corxy$statistic)[1,1],2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value (2 sided)',header=TRUE) > a<-table.element(a,(p2 <- as.matrix(corxy$p.value)[1,1]),2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value (1 sided)',header=TRUE) > a<-table.element(a,p2/2,2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degrees of Freedom',header=TRUE) > a<-table.element(a,lx-2,2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Number of Observations',header=TRUE) > a<-table.element(a,lx,2) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/2vkke1356038012.tab") > > try(system("convert tmp/1ntl61356038012.ps tmp/1ntl61356038012.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.917 0.247 1.145