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. > y <- c(3.861884491,3.86432807,3.864492015,3.863257308,3.860453306,3.849318732,3.844063366,3.844181192,3.845531265,3.835138386,3.840896665,3.843161358,3.848062114,3.850490024,3.851442229,3.853087325,3.851779838,3.840943954,3.834650174,3.835185604,3.840041333,3.85185285,3.855980758,3.85724753,3.854755941,3.861171308,3.865913967,3.869739954,3.86908917,3.85765146,3.84534727,3.838506216,3.853366873,3.8585208,3.864809349,3.865086762,3.871043125,3.873953266,3.871181262,3.874806751,3.874289451,3.854408916,3.840662338,3.833562198,3.850478329,3.861866435,3.865858029,3.872258448,3.872886015,3.876970667,3.873825677,3.878687726,3.872366111,3.860679016,3.848518938,3.84031302,3.86456395,3.879947833,3.893237105,3.903049256,3.912810243,3.919609086,3.930075738,3.933031449,3.933305731,3.926413182,3.910060531,3.903890717,3.922433331) > x <- c(3.109060959,3.310543013,3.310543013,3.414442608,3.56671182,3.234749174,3.310543013,3.27336401,3.478158423,3.346389145,3.346389145,3.414442608,3.5085559,3.310543013,3.152736022,3.015534901,3.109060959,3.194583132,3.194583132,3.27336401,3.380994674,3.346389145,3.109060959,2.912350665,3.234749174,3.310543013,3.152736022,2.734367509,2.965273066,3.27336401,3.414442608,3.310543013,3.310543013,3.063390922,3.310543013,3.414442608,3.538056564,3.5085559,3.594568775,3.56671182,3.621670704,3.5085559,3.56671182,3.478158423,3.346389145,3.346389145,3.446807893,3.5085559,3.5085559,3.346389145,3.478158423,3.414442608,3.346389145,3.27336401,3.310543013,3.194583132,2.965273066,3.152736022,2.912350665,2.912350665,2.517696473,2.341805806,2.00148,1,2.174751721,2.186051277,2.564949357,2.884800713,2.587764035) > ylab = 'Werkloosheid mannen (%)' > xlab = 'Vooruitzichten werkgelegenheid (%)' > #'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/html/rcomp/tmp/156i91256767272.ps",horizontal=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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/html/rcomp/tmp/26rpv1256767272.tab") > > system("convert tmp/156i91256767272.ps tmp/156i91256767272.png") > > > proc.time() user system elapsed 0.423 0.188 0.626