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. > y <- c(206010 + ,198112 + ,194519 + ,185705 + ,180173 + ,176142 + ,203401 + ,221902 + ,197378 + ,185001 + ,176356 + ,180449 + ,180144 + ,173666 + ,165688 + ,161570 + ,156145 + ,153730 + ,182698 + ,200765 + ,176512 + ,166618 + ,158644 + ,159585 + ,163095 + ,159044 + ,155511 + ,153745 + ,150569 + ,150605 + ,179612 + ,194690 + ,189917 + ,184128 + ,175335 + ,179566 + ,181140 + ,177876 + ,175041 + ,169292 + ,166070 + ,166972 + ,206348 + ,215706 + ,202108 + ,195411 + ,193111 + ,195198 + ,198770 + ,194163 + ,190420 + ,189733 + ,186029 + ,191531 + ,232571 + ,243477 + ,227247 + ,217859 + ,208679 + ,213188 + ,216234 + ,213586 + ,209465 + ,204045 + ,200237 + ,203666 + ,241476 + ,260307 + ,243324 + ,244460 + ,233575 + ,237217 + ,235243 + ,230354 + ,227184 + ,221678 + ,217142 + ,219452 + ,256446 + ,265845 + ,248624 + ,241114 + ,229245 + ,231805 + ,219277 + ,219313 + ,212610 + ,214771 + ,211142 + ,211457 + ,240048 + ,240636 + ,230580 + ,208795 + ,197922 + ,194596 + ,194581 + ,185686 + ,178106 + ,172608 + ,167302 + ,168053 + ,202300 + ,202388 + ,182516 + ,173476 + ,166444 + ,171297 + ,169701 + ,164182 + ,161914 + ,159612 + ,151001 + ,158114 + ,186530 + ,187069 + ,174330 + ,169362 + ,166827 + ,178037 + ,186413 + ,189226 + ,191563 + ,188906 + ,186005 + ,195309 + ,223532 + ,226899 + ,214126 + ,206903 + ,204442 + ,220375 + ,214320 + ,212588 + ,205816 + ,202196 + ,195722 + ,198563 + ,229139 + ,229527 + ,211868 + ,203555 + ,195770) > x <- c(10406,11398,14117,10785,10334,12371,7918,9907,12855,11579,9788,8786,12231,13604,15107,10853,13698,11536,8879,11005,13656,12631,10931,8064,12332,12452,14029,10003,12388,10492,9114,9304,9660,10569,8356,5998,10408,11420,11538,10860,10412,9521,7602,8197,10449,11561,8603,8080,10792,11943,11179,9939,10065,11021,9226,9554,11468,9937,8928,8395,11996,12385,15277,12657,11482,16797,11047,11794,13077,11725,10921,9334,11431,13085,16394,15701,14936,18282,12824,14784,16061,14814,14375,13644,16397,19254,21943,16731,22065,20937,18242,19017,20372,20561,18267,16170,23163,22469,26500,23660,23339,26174,24617,23891,23516,25638,21258,17436,26210,25227,21928,25452,22578,23904,20842,21042,24890,23126,16951,16972,19985,19296,21078,19493,18821,19657,15678,16406,18264,18288,15179,15443,19306,19094,25673,20077,21698,25943,19778,21333,25222,24512,20126) > ylab = 'werkloosheid' > xlab = 'werkaanbod' > #'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!) > postscript(file="/var/www/rcomp/tmp/1jbtf1292665120.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') > cxy <- as.matrix(corxy$estimate)[1,1] > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/2jmpu1292665120.tab") > > try(system("convert tmp/1jbtf1292665120.ps tmp/1jbtf1292665120.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.450 0.240 0.663