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(510401 + ,508642 + ,501805 + ,520996 + ,515768 + ,515132 + ,577929 + ,594516 + ,597672 + ,599345 + ,603953 + ,608836 + ,608433 + ,603119 + ,592334 + ,584596 + ,574261 + ,573275 + ,632961 + ,655133 + ,658676 + ,655930 + ,644970 + ,638034 + ,632960 + ,619800 + ,603882 + ,588571 + ,581604 + ,574398 + ,634493 + ,663674 + ,657990 + ,653603 + ,649574 + ,636936 + ,650557 + ,626908 + ,600247 + ,577183 + ,558293 + ,534443 + ,582221 + ,594256 + ,589318 + ,580546 + ,569494 + ,570579 + ,568020 + ,548274 + ,531771 + ,517645 + ,507747 + ,503163 + ,547136 + ,555516 + ,556252 + ,566084 + ,551559 + ,559925 + ,557539 + ,534641 + ,521873 + ,508750 + ,495915 + ,490866 + ,539148 + ,541277 + ,538870 + ,536479 + ,525613 + ,524147 + ,519292 + ,501127 + ,483376 + ,467870 + ,453404 + ,447399 + ,498416 + ,502035 + ,490986 + ,483633 + ,475056 + ,473553 + ,467376 + ,451397 + ,443523 + ,421997 + ,410447 + ,405069 + ,451922 + ,465294 + ,450665 + ,444860 + ,438173 + ,437781 + ,434654 + ,419947 + ,406749 + ,394592 + ,384593 + ,383993 + ,437054 + ,446444 + ,441965 + ,441595 + ,438839 + ,444432 + ,444147 + ,439744 + ,426895 + ,418968 + ,410862 + ,411403 + ,463705 + ,479869 + ,474978 + ,478479 + ,475252 + ,482027 + ,483960 + ,474003 + ,466064 + ,461867 + ,453027 + ,457876 + ,510221 + ,527337 + ,524124 + ,525324 + ,526725 + ,540593 + ,545908 + ,544589 + ,537579 + ,534650 + ,531303 + ,537025 + ,595588 + ,616931 + ,619144 + ,614854 + ,615646 + ,621183 + ,623350 + ,614900 + ,602025 + ,592619 + ,583955 + ,582620 + ,629456 + ,649989 + ,644435 + ,636546 + ,626192 + ,629425 + ,630241 + ,621327 + ,605418 + ,597219 + ,584917 + ,584026 + ,636610 + ,658626 + ,656395 + ,654847 + ,641213 + ,647262 + ,652392 + ,634696 + ,615140 + ,604776 + ,585445 + ,574114 + ,627552 + ,647843 + ,634944 + ,619903 + ,609669 + ,610551 + ,608955 + ,600493 + ,589468 + ,580370 + ,565341 + ,568585 + ,615754 + ,633887 + ,625996 + ,607053 + ,592992 + ,595815 + ,590156 + ,582276 + ,568193 + ,554335 + ,539548 + ,532277 + ,580397 + ,609817 + ,594122 + ,567220 + ,550823 + ,554005 + ,553495 + ,541794 + ,529732 + ,515627 + ,504806 + ,500275 + ,548147 + ,575479 + ,555381 + ,537221 + ,519993 + ,518769 + ,518417 + ,505582 + ,486544 + ,481251 + ,466025 + ,462245 + ,511010 + ,542663 + ,523449 + ,509434 + ,490224 + ,485245 + ,491288 + ,483280 + ,470997 + ,466219 + ,459091 + ,453727 + ,506158 + ,531477 + ,534493 + ,527032 + ,496468 + ,496713 + ,501191 + ,498154 + ,493992 + ,485053 + ,478454 + ,479148 + ,539910 + ,547928 + ,545756 + ,544427 + ,535499 + ,538387 + ,545093 + ,542471 + ,535545 + ,535085 + ,526707 + ,532468 + ,594779 + ,604757 + ,603341 + ,593930 + ,576330 + ,583688 + ,590598 + ,588221 + ,583071 + ,571715 + ,564705 + ,570489 + ,620710 + ,637596 + ,639749 + ,641001 + ,624705 + ,626085 + ,621431 + ,619087 + ,614201 + ,602643 + ,596925 + ,598249 + ,649390 + ,657257 + ,656683 + ,643154 + ,626848 + ,628553 + ,624014 + ,619842 + ,609656 + ,603875 + ,602279 + ,601932 + ,648277 + ,654448 + ,648563 + ,618603 + ,597032 + ,588270 + ,589957 + ,577141 + ,559537 + ,553948 + ,538481 + ,525246 + ,581658 + ,590143 + ,566590 + ,554838 + ,538076 + ,541341 + ,543276 + ,533053 + ,518335 + ,516089 + ,494735 + ,502211 + ,552891 + ,557058 + ,541824 + ,532593) > ylab = 'D1: Total unemployment' > xlab = 'D1 + 5% of T-3' > #'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/1ndhq1229813554.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/2i2gp1229813554.tab") > > system("convert tmp/1ndhq1229813554.ps tmp/1ndhq1229813554.png") > > > proc.time() user system elapsed 0.427 0.195 0.644