R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(510401 + ,508642 + ,501805 + ,495476 + ,490336 + ,490042 + ,553155 + ,569999 + ,573170 + ,571687 + ,575453 + ,580177 + ,579849 + ,574346 + ,563325 + ,555604 + ,545544 + ,545109 + ,605181 + ,627856 + ,631421 + ,625671 + ,613577 + ,606463 + ,601676 + ,589121 + ,573559 + ,558487 + ,552148 + ,545720 + ,606569 + ,636067 + ,630704 + ,623275 + ,617771 + ,605401 + ,619393 + ,596019 + ,569977 + ,546213 + ,528492 + ,505944 + ,554910 + ,567831 + ,564021 + ,552800 + ,541102 + ,542378 + ,540380 + ,521219 + ,504652 + ,490626 + ,481686 + ,477930 + ,522605 + ,531432 + ,532355 + ,539954 + ,524987 + ,533307 + ,530541 + ,508392 + ,495208 + ,482223 + ,470495 + ,466106 + ,515037 + ,517752 + ,515565 + ,510727 + ,499725 + ,498369 + ,493756 + ,476141 + ,458458 + ,443182 + ,429597 + ,424476 + ,476257 + ,480555 + ,469762 + ,459820 + ,451028 + ,450065 + ,444385 + ,428846 + ,421020 + ,399778 + ,389005 + ,384018 + ,431933 + ,445844 + ,431464 + ,423263 + ,415881 + ,416208 + ,413491 + ,399153 + ,385939 + ,373917 + ,364635 + ,364696 + ,418358 + ,428212 + ,423730 + ,420677 + ,417428 + ,423245 + ,423113 + ,418873 + ,405733 + ,397812 + ,389918 + ,391116 + ,443814 + ,460373 + ,455422 + ,456288 + ,452233 + ,459256 + ,461146 + ,451391 + ,443101 + ,438810 + ,430457 + ,435721 + ,488280 + ,505814 + ,502338 + ,500910 + ,501434 + ,515476 + ,520862 + ,519517 + ,511805 + ,508607 + ,505327 + ,511435 + ,570158 + ,591665 + ,593572 + ,586346 + ,586063 + ,591504 + ,594033 + ,585597 + ,572450 + ,562917 + ,554675 + ,553997 + ,601310 + ,622255 + ,616735 + ,606480 + ,595079 + ,598588 + ,599917 + ,591573 + ,575489 + ,567223 + ,555338 + ,555252 + ,608249 + ,630859 + ,628632 + ,624435 + ,609670 + ,615830 + ,621170 + ,604212 + ,584348 + ,573717 + ,555234 + ,544897 + ,598866 + ,620081 + ,607699 + ,589960 + ,578665 + ,580166 + ,579457 + ,571560 + ,560460 + ,551397 + ,536763 + ,540562 + ,588184 + ,607049 + ,598968 + ,577644 + ,562640 + ,565867 + ,561274 + ,554144 + ,539900 + ,526271 + ,511841 + ,505282 + ,554083 + ,584225 + ,568858 + ,539516 + ,521612 + ,525562 + ,526519 + ,515713 + ,503454 + ,489301 + ,479020 + ,475102 + ,523682 + ,551528 + ,531626 + ,511037 + ,492417 + ,492188 + ,492865 + ,480961 + ,461935 + ,456608 + ,441977 + ,439148 + ,488180 + ,520564 + ,501492 + ,485025 + ,464196 + ,460170 + ,467037 + ,460070 + ,447988 + ,442867 + ,436087 + ,431328 + ,484015 + ,509673 + ,512927 + ,502831 + ,470984 + ,471067 + ,476049 + ,474605 + ,470439 + ,461251 + ,454724 + ,455626 + ,516847 + ,525192 + ,522975 + ,518585 + ,509239 + ,512238 + ,519164 + ,517009 + ,509933 + ,509127 + ,500857 + ,506971 + ,569323 + ,579714 + ,577992 + ,565464 + ,547344 + ,554788 + ,562325 + ,560854 + ,555332 + ,543599 + ,536662 + ,542722 + ,593530 + ,610763 + ,612613 + ,611324 + ,594167 + ,595454 + ,590865 + ,589379 + ,584428 + ,573100 + ,567456 + ,569028 + ,620735 + ,628884 + ,628232 + ,612117 + ,595404 + ,597141 + ,593408 + ,590072 + ,579799 + ,574205 + ,572775 + ,572942 + ,619567 + ,625809 + ,619916 + ,587625 + ,565742 + ,557274 + ,560576 + ,548854 + ,531673 + ,525919 + ,511038 + ,498662 + ,555362 + ,564591 + ,541657 + ,527070 + ,509846 + ,514258 + ,516922 + ,507561 + ,492622 + ,490243 + ,469357 + ,477580 + ,528379 + ,533590 + ,517945 + ,506174) > x <- c(230801 + ,230963 + ,228056 + ,225053 + ,222738 + ,221564 + ,249558 + ,256255 + ,259208 + ,259633 + ,263473 + ,268227 + ,269936 + ,268062 + ,263164 + ,259447 + ,254491 + ,252835 + ,278278 + ,288118 + ,291164 + ,289725 + ,286673 + ,284299 + ,282947 + ,277084 + ,268565 + ,260095 + ,255940 + ,249824 + ,273487 + ,286106 + ,284716 + ,284086 + ,282226 + ,277259 + ,285988 + ,275438 + ,260088 + ,244764 + ,234673 + ,218389 + ,239693 + ,244896 + ,242697 + ,235453 + ,230504 + ,231880 + ,232473 + ,223772 + ,215248 + ,206977 + ,201632 + ,197627 + ,218552 + ,222521 + ,223391 + ,225972 + ,218845 + ,224369 + ,224338 + ,213758 + ,207825 + ,201085 + ,194670 + ,190609 + ,213370 + ,215489 + ,214963 + ,213072 + ,208244 + ,209232 + ,208324 + ,200353 + ,191718 + ,182861 + ,174911 + ,169682 + ,192006 + ,194187 + ,190079 + ,184526 + ,182184 + ,182732 + ,180855 + ,173467 + ,169589 + ,158891 + ,154042 + ,149402 + ,170143 + ,177325 + ,172283 + ,168606 + ,167005 + ,168430 + ,168153 + ,161237 + ,154875 + ,148966 + ,144448 + ,142535 + ,165734 + ,170309 + ,170080 + ,168393 + ,168341 + ,172095 + ,173211 + ,172796 + ,167130 + ,163466 + ,159879 + ,159179 + ,182553 + ,190672 + ,190787 + ,191185 + ,190477 + ,194290 + ,195643 + ,191313 + ,186922 + ,184629 + ,180214 + ,180891 + ,203057 + ,211527 + ,210864 + ,211007 + ,212885 + ,220586 + ,223821 + ,223294 + ,220780 + ,217846 + ,215557 + ,217120 + ,244550 + ,255474 + ,257349 + ,256101 + ,257321 + ,261238 + ,263166 + ,259265 + ,253493 + ,247671 + ,242263 + ,239186 + ,259973 + ,269287 + ,266719 + ,263400 + ,258618 + ,261472 + ,263151 + ,259372 + ,251960 + ,246936 + ,240570 + ,238382 + ,261156 + ,272095 + ,272017 + ,271876 + ,266863 + ,270878 + ,274212 + ,265841 + ,255968 + ,250606 + ,240470 + ,232662 + ,256235 + ,266169 + ,261751 + ,255914 + ,252397 + ,254227 + ,255699 + ,252285 + ,247132 + ,242785 + ,235667 + ,234952 + ,255179 + ,263727 + ,261315 + ,252049 + ,245914 + ,248289 + ,246790 + ,243978 + ,238108 + ,231776 + ,224585 + ,219058 + ,240429 + ,254569 + ,249074 + ,237521 + ,230384 + ,232521 + ,234611 + ,230592 + ,225144 + ,218143 + ,212434 + ,208676 + ,229328 + ,242148 + ,233916 + ,225628 + ,217837 + ,217786 + ,218413 + ,213261 + ,204094 + ,201484 + ,194600 + ,191325 + ,211261 + ,226293 + ,219734 + ,214591 + ,205348 + ,203496 + ,208155 + ,205010 + ,200290 + ,198088 + ,195186 + ,191395 + ,213768 + ,225780 + ,230579 + ,229261 + ,216228 + ,216713 + ,220206 + ,220115 + ,218444 + ,214912 + ,210705 + ,209673 + ,237041 + ,242081 + ,241878 + ,242621 + ,238545 + ,240337 + ,244752 + ,244576 + ,241572 + ,240541 + ,236089 + ,236997 + ,264579 + ,270349 + ,269645 + ,267037 + ,258113 + ,262813 + ,267413 + ,267366 + ,264777 + ,258863 + ,254844 + ,254868 + ,277267 + ,285351 + ,286602 + ,283042 + ,276687 + ,277915 + ,277128 + ,277103 + ,275037 + ,270150 + ,267140 + ,264993 + ,287259 + ,291186 + ,292300 + ,288186 + ,281477 + ,282656 + ,280190 + ,280408 + ,276836 + ,275216 + ,274352 + ,271311 + ,289802 + ,290726 + ,292300 + ,278506 + ,269826 + ,265861 + ,269034 + ,264176 + ,255198 + ,253353 + ,246057 + ,235372 + ,258556 + ,260993 + ,254663 + ,250643 + ,243422 + ,247105 + ,248541 + ,245039 + ,237080 + ,237085 + ,225554 + ,226839 + ,247934 + ,248333 + ,246969 + ,245098) > ylab = 'D1: Total unemployment' > xlab = 'D5: Unemployed men' > #'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/13fx51229814636.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/2vvk21229814636.tab") > > system("convert tmp/13fx51229814636.ps tmp/13fx51229814636.png") > > > proc.time() user system elapsed 0.444 0.190 0.529