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(4.59 + ,4.63 + ,4.61 + ,4.6 + ,4.56 + ,4.76 + ,4.84 + ,4.96 + ,5.11 + ,5.29 + ,5.13 + ,5.05 + ,5.11 + ,5.12 + ,5 + ,5.05 + ,5.1 + ,5.15 + ,5.32 + ,5.39 + ,5.53 + ,5.51 + ,5.75 + ,5.81 + ,5.8 + ,5.88 + ,5.76 + ,5.75 + ,5.61 + ,5.61 + ,5.75 + ,5.86 + ,5.97 + ,5.81 + ,5.71 + ,5.86 + ,5.82 + ,5.8 + ,5.77 + ,5.81 + ,5.95 + ,6.03 + ,6.09 + ,6.09 + ,5.95 + ,5.88 + ,5.95 + ,6.03 + ,6.13 + ,6.03 + ,6.14 + ,6.3 + ,6.33 + ,6.46 + ,6.56 + ,6.65 + ,6.63 + ,6.66 + ,6.76 + ,6.74 + ,6.59 + ,6.58 + ,6.6 + ,6.5 + ,6.44 + ,6.42 + ,6.2 + ,6.18 + ,6.24 + ,6.42 + ,6.66 + ,6.74 + ,6.74 + ,6.65 + ,6.49 + ,6.35 + ,6.27 + ,6.29 + ,6.25 + ,6.13 + ,6.18 + ,6.24 + ,6.16 + ,6.09 + ,6.04 + ,6.11 + ,6.04 + ,6.02 + ,5.95 + ,5.95 + ,5.95 + ,5.9 + ,5.9 + ,5.79 + ,5.7 + ,5.73 + ,5.82 + ,5.82 + ,5.69 + ,5.63 + ,5.52 + ,5.33 + ,5.25 + ,5.02 + ,4.98 + ,4.8 + ,4.81 + ,4.85 + ,4.94 + ,4.87 + ,4.9 + ,4.95 + ,4.93 + ,4.74 + ,4.75 + ,4.64 + ,4.51 + ,4.65 + ,4.6 + ,4.71 + ,4.86 + ,4.83 + ,4.91 + ,4.78 + ,4.96 + ,5.01 + ,5 + ,4.88 + ,4.8 + ,4.7 + ,4.82 + ,4.91 + ,4.83 + ,4.72 + ,4.69 + ,4.65 + ,4.66 + ,4.57 + ,4.53 + ,4.47 + ,4.53 + ,4.12 + ,3.96 + ,3.94 + ,3.88 + ,3.99 + ,3.94 + ,3.94 + ,3.73 + ,3.58 + ,3.97 + ,4.25 + ,4.25 + ,4.23 + ,4.41 + ,4.45 + ,4.49 + ,4.47 + ,4.31 + ,4.19 + ,4.37 + ,4.4 + ,4.3 + ,4.33 + ,4.27 + ,4.3 + ,4.55 + ,4.77 + ,4.84 + ,4.88 + ,4.79 + ,4.66 + ,4.62 + ,4.56 + ,4.52 + ,4.5 + ,4.58 + ,4.48 + ,4.4 + ,4.34 + ,4.23 + ,4.09 + ,4.08 + ,4.05 + ,3.92 + ,3.85 + ,3.56 + ,3.53 + ,3.29 + ,3.25 + ,3.32 + ,3.29 + ,3.03 + ,3.08 + ,2.93 + ,2.79 + ,2.72 + ,2.71 + ,3.15 + ,3.22 + ,2.9 + ,2.95 + ,2.93 + ,3.13 + ,3.26 + ,3.24 + ,3.06 + ,3.02 + ,2.89 + ,2.91 + ,3.12 + ,3.11 + ,2.96 + ,3.01 + ,3.02 + ,2.94 + ,2.87 + ,2.76 + ,2.61 + ,2.62 + ,2.97 + ,2.93 + ,2.84 + ,2.92 + ,2.98 + ,2.97 + ,2.88 + ,2.7 + ,2.52 + ,2.35 + ,2.32 + ,2.27 + ,2.13 + ,2.27 + ,2.36 + ,2.49 + ,2.6 + ,2.82 + ,3.08 + ,3.31 + ,3.24 + ,3.35 + ,3.39 + ,3.49 + ,3.51 + ,3.23 + ,3.1 + ,3.07 + ,2.94 + ,3.13 + ,3.32 + ,3.24 + ,3.22 + ,3.37 + ,3.36 + ,3.16 + ,3.27 + ,3.4 + ,3.27 + ,3.2 + ,3.22 + ,3.28 + ,3.24 + ,3 + ,3.02 + ,3.16 + ,3.16 + ,3.06 + ,3.04 + ,3.01 + ,2.98 + ,2.72 + ,2.7 + ,2.71 + ,2.91 + ,3.21 + ,3.38 + ,3.49 + ,3.6 + ,3.74 + ,3.96 + ,3.88 + ,3.83 + ,3.91 + ,3.98 + ,3.97 + ,3.89 + ,3.81 + ,3.65 + ,3.64 + ,3.67 + ,3.78 + ,3.61 + ,3.47 + ,3.41 + ,3.45 + ,3.39 + ,3.42 + ,3.35 + ,3.29 + ,3.35 + ,3.46 + ,3.31 + ,3.29 + ,3.3 + ,3.39 + ,3.53 + ,3.52 + ,3.6 + ,3.7 + ,3.56 + ,3.54 + ,3.58 + ,3.65 + ,3.71 + ,3.72 + ,3.7 + ,3.71 + ,3.72 + ,3.66 + ,3.77 + ,3.89 + ,4 + ,4.11 + ,4.18 + ,4.27 + ,4.24 + ,4.13 + ,4.02 + ,3.9 + ,3.91 + ,3.88 + ,3.91 + ,3.83 + ,3.81 + ,3.69 + ,3.75 + ,3.88 + ,3.77 + ,3.76 + ,3.87 + ,3.95 + ,4.02 + ,4.07 + ,4.17 + ,4.21 + ,4.11 + ,4.07 + ,3.94 + ,3.93 + ,3.98 + ,4.03 + ,4.13 + ,4.24 + ,4.31 + ,4.32 + ,4.42 + ,4.51 + ,4.52 + ,4.46 + ,4.36 + ,4.41 + ,4.43 + ,4.4 + ,4.38 + ,4.33 + ,4.3 + ,4.34 + ,4.29 + ,4.38 + ,4.49 + ,4.54 + ,4.59 + ,4.61 + ,4.66 + ,4.76 + ,4.67 + ,4.67 + ,4.78 + ,4.84 + ,4.91 + ,4.91 + ,4.95 + ,5 + ,5.03 + ,5 + ,4.95 + ,4.99 + ,4.95 + ,5.02 + ,5.16 + ,5.18 + ,5.14 + ,5.06 + ,5.03 + ,4.98 + ,4.89 + ,4.87 + ,4.85 + ,4.77 + ,4.73 + ,4.73 + ,4.73 + ,4.66 + ,4.56 + ,4.56 + ,4.74 + ,4.75 + ,4.74 + ,4.6 + ,4.62 + ,4.61 + ,4.58 + ,4.48 + ,4.44 + ,4.53 + ,4.56 + ,4.65 + ,4.65 + ,4.7 + ,4.76 + ,4.82 + ,4.85 + ,4.76 + ,4.74 + ,4.69 + ,4.51 + ,4.48 + ,4.46 + ,4.48 + ,4.51 + ,4.58 + ,4.66 + ,4.6 + ,4.56 + ,4.55 + ,4.56 + ,4.66 + ,4.77 + ,4.86 + ,4.98 + ,5.13 + ,5.04 + ,4.97 + ,5 + ,5 + ,4.93 + ,4.74 + ,4.6 + ,4.6 + ,4.42 + ,4.34 + ,4.28 + ,4.16 + ,4.12 + ,4.25 + ,4.26 + ,4.25 + ,4.38 + ,4.23 + ,4.04 + ,4.04 + ,3.89 + ,3.77 + ,3.48 + ,3.39 + ,3.35 + ,3.49 + ,3.52 + ,3.63 + ,3.29 + ,3.13 + ,2.97 + ,2.74 + ,2.84 + ,2.72 + ,2.73 + ,2.89 + ,2.8 + ,2.51 + ,2.47 + ,2.34 + ,2.58 + ,2.64 + ,2.66 + ,2.79 + ,3.05 + ,3.1 + ,3.07 + ,3.12 + ,3.12 + ,3.36 + ,3.26 + ,3.57 + ,3.64 + ,3.5 + ,3.32 + ,3.18 + ,3.26 + ,3.44 + ,3.31 + ,3.24 + ,3.18 + ,3.07 + ,3.06 + ,2.93 + ,2.92 + ,2.69 + ,3.02 + ,2.77 + ,2.63 + ,2.9 + ,2.64 + ,2.77 + ,2.56 + ,2.41 + ,2.12 + ,2.06 + ,1.63 + ,1.62 + ,1.36 + ,1.5 + ,1.55 + ,1.62 + ,1.42 + ,1.58 + ,1.74 + ,1.88 + ,1.83 + ,1.79 + ,1.97 + ,1.87 + ,1.93 + ,1.75 + ,1.76 + ,1.73 + ,1.88 + ,1.79 + ,1.89 + ,1.98 + ,2.09 + ,2.01 + ,2.13 + ,2.38 + ,2.58 + ,2.88 + ,2.76 + ,2.66 + ,2.5 + ,2.31 + ,2.43 + ,2.48 + ,2.63 + ,2.73 + ,2.65 + ,2.47 + ,2.48 + ,2.33 + ,2.34 + ,2.43 + ,2.41 + ,2.28 + ,2.24 + ,2.36 + ,2.38) > x <- c(4.78 + ,4.81 + ,4.89 + ,4.76 + ,4.93 + ,4.96 + ,5.06 + ,5.22 + ,5.36 + ,5.21 + ,5.14 + ,5.03 + ,4.95 + ,4.86 + ,4.75 + ,4.92 + ,4.98 + ,4.95 + ,5.1 + ,5.26 + ,5.34 + ,5.44 + ,5.56 + ,5.48 + ,5.57 + ,5.35 + ,5.44 + ,5.35 + ,5.26 + ,5.53 + ,5.59 + ,5.86 + ,5.63 + ,5.51 + ,5.71 + ,5.64 + ,5.62 + ,5.63 + ,5.67 + ,5.86 + ,6 + ,6.15 + ,6.2 + ,5.98 + ,5.97 + ,6.01 + ,5.98 + ,6.1 + ,6 + ,6.17 + ,6.18 + ,6.11 + ,6.42 + ,6.44 + ,6.5 + ,6.38 + ,6.48 + ,6.5 + ,6.47 + ,6.29 + ,6.16 + ,6.17 + ,6.18 + ,6.02 + ,6.13 + ,5.9 + ,5.92 + ,5.96 + ,6.17 + ,6.36 + ,6.35 + ,6.43 + ,6.37 + ,6.17 + ,6.07 + ,5.98 + ,6.07 + ,6.04 + ,5.91 + ,5.97 + ,6.1 + ,6 + ,5.95 + ,5.9 + ,5.96 + ,5.91 + ,5.92 + ,5.74 + ,5.77 + ,5.79 + ,5.76 + ,5.8 + ,5.74 + ,5.67 + ,5.75 + ,5.84 + ,5.91 + ,5.85 + ,5.73 + ,5.59 + ,5.44 + ,5.4 + ,5.28 + ,5.3 + ,5.28 + ,5.21 + ,5.24 + ,5.3 + ,5.14 + ,5.19 + ,5.29 + ,5.2 + ,5.09 + ,5.01 + ,4.93 + ,4.85 + ,5.03 + ,5.05 + ,5.17 + ,5.15 + ,5.23 + ,5.35 + ,5.23 + ,5.51 + ,5.56 + ,5.61 + ,5.36 + ,5.33 + ,5.29 + ,5.39 + ,5.59 + ,5.52 + ,5.37 + ,5.36 + ,5.29 + ,5.2 + ,5.17 + ,5.09 + ,4.93 + ,4.97 + ,4.56 + ,4.61 + ,4.62 + ,4.51 + ,4.54 + ,4.52 + ,4.4 + ,4.08 + ,3.96 + ,4.31 + ,4.72 + ,4.68 + ,4.68 + ,4.65 + ,4.67 + ,4.69 + ,4.71 + ,4.56 + ,4.38 + ,4.62 + ,4.71 + ,4.59 + ,4.69 + ,4.61 + ,4.58 + ,4.79 + ,5.06 + ,5.23 + ,5.28 + ,5.16 + ,5.16 + ,5.1 + ,5.05 + ,4.97 + ,4.99 + ,5.13 + ,5 + ,4.9 + ,4.92 + ,4.9 + ,4.66 + ,4.67 + ,4.65 + ,4.62 + ,4.54 + ,4.33 + ,4.3 + ,4.06 + ,4.14 + ,4.45 + ,4.49 + ,4.18 + ,4.25 + ,4.19 + ,4.2 + ,4.2 + ,4.21 + ,4.47 + ,4.53 + ,4.34 + ,4.27 + ,4.19 + ,4.26 + ,4.39 + ,4.27 + ,4.2 + ,4.14 + ,4.06 + ,3.96 + ,4.06 + ,4.16 + ,4.12 + ,4.27 + ,4.35 + ,4.23 + ,4.27 + ,4.18 + ,4.18 + ,4.15 + ,4.45 + ,4.47 + ,4.48 + ,4.4 + ,4.37 + ,4.32 + ,4.18 + ,4.09 + ,4.02 + ,3.85 + ,3.72 + ,3.58 + ,3.39 + ,3.36 + ,3.55 + ,3.62 + ,3.77 + ,3.8 + ,3.63 + ,3.76 + ,3.9 + ,3.99 + ,3.8 + ,3.97 + ,4.27 + ,4.02 + ,4.02 + ,3.86 + ,3.76 + ,3.96 + ,4.18 + ,4.03 + ,4.07 + ,4.16 + ,4.26 + ,4.1 + ,4.07 + ,4.11 + ,4.08 + ,3.93 + ,3.88 + ,3.91 + ,3.91 + ,3.76 + ,3.61 + ,3.71 + ,3.65 + ,3.48 + ,3.53 + ,3.47 + ,3.48 + ,3.31 + ,3.22 + ,3.22 + ,3.35 + ,3.56 + ,3.77 + ,3.8 + ,3.81 + ,3.68 + ,3.95 + ,4.04 + ,3.96 + ,4.05 + ,4.17 + ,4.25 + ,4.19 + ,4.07 + ,3.96 + ,4 + ,4.01 + ,4.07 + ,3.93 + ,3.8 + ,3.82 + ,3.83 + ,3.98 + ,4.09 + ,4.04 + ,3.95 + ,4 + ,4.09 + ,3.96 + ,3.85 + ,3.94 + ,3.9 + ,3.98 + ,3.87 + ,3.85 + ,3.74 + ,3.55 + ,3.54 + ,3.71 + ,3.74 + ,3.7 + ,3.69 + ,3.55 + ,3.52 + ,3.59 + ,3.5 + ,3.57 + ,3.63 + ,3.64 + ,3.68 + ,3.78 + ,3.88 + ,3.83 + ,3.7 + ,3.59 + ,3.47 + ,3.54 + ,3.53 + ,3.54 + ,3.45 + ,3.44 + ,3.19 + ,3.2 + ,3.33 + ,3.16 + ,3.2 + ,3.32 + ,3.4 + ,3.38 + ,3.37 + ,3.39 + ,3.51 + ,3.42 + ,3.35 + ,3.35 + ,3.43 + ,3.45 + ,3.47 + ,3.58 + ,3.59 + ,3.69 + ,3.78 + ,3.86 + ,3.9 + ,3.93 + ,3.88 + ,3.82 + ,3.89 + ,3.91 + ,3.95 + ,3.92 + ,3.87 + ,3.81 + ,3.93 + ,3.84 + ,3.98 + ,4.06 + ,4.11 + ,4.11 + ,4.02 + ,4.08 + ,4.07 + ,4.08 + ,4.1 + ,4.13 + ,4.22 + ,4.28 + ,4.27 + ,4.38 + ,4.33 + ,4.3 + ,4.22 + ,4.19 + ,4.31 + ,4.2 + ,4.25 + ,4.42 + ,4.53 + ,4.51 + ,4.32 + ,4.3 + ,4.25 + ,4.19 + ,4.17 + ,4.14 + ,4.1 + ,4.03 + ,4.03 + ,4.01 + ,3.98 + ,3.88 + ,3.86 + ,4.05 + ,4.06 + ,4.08 + ,3.89 + ,3.94 + ,3.93 + ,3.89 + ,3.85 + ,3.8 + ,3.86 + ,3.92 + ,3.95 + ,3.94 + ,3.97 + ,4.06 + ,4.07 + ,4.08 + ,4.03 + ,4.06 + ,4.03 + ,3.95 + ,3.86 + ,3.92 + ,3.97 + ,3.99 + ,4.01 + ,4.11 + ,4.12 + ,4.11 + ,4.14 + ,4.17 + ,4.21 + ,4.4 + ,4.53 + ,4.6 + ,4.72 + ,4.66 + ,4.62 + ,4.58 + ,4.61 + ,4.63 + ,4.63 + ,4.57 + ,4.6 + ,4.36 + ,4.31 + ,4.3 + ,4.27 + ,4.27 + ,4.3 + ,4.29 + ,4.24 + ,4.39 + ,4.36 + ,4.19 + ,4.23 + ,4.13 + ,4.07 + ,3.76 + ,3.91 + ,3.71 + ,3.87 + ,3.85 + ,3.98 + ,3.76 + ,3.65 + ,3.52 + ,3.48 + ,3.5 + ,3.35 + ,3.42 + ,3.5 + ,3.4 + ,3.06 + ,2.97 + ,2.89 + ,2.93 + ,3.16 + ,3.03 + ,3.12 + ,3.12 + ,3.04 + ,3.13 + ,3.19 + ,3.2 + ,3.34 + ,3.21 + ,3.49 + ,3.5 + ,3.42 + ,3.45 + ,3.39 + ,3.32 + ,3.46 + ,3.37 + ,3.2 + ,3.12 + ,3.09 + ,3.03 + ,2.98 + ,2.98 + ,2.9 + ,3.13 + ,3.11 + ,2.78 + ,2.95 + ,2.77 + ,2.8 + ,2.79 + ,2.69 + ,2.64 + ,2.48 + ,2.27 + ,2.2 + ,1.89 + ,1.82 + ,1.69 + ,1.85 + ,1.52 + ,1.69 + ,2.03 + ,2.09 + ,2.12 + ,2.07 + ,2.11 + ,1.88 + ,1.88 + ,1.7 + ,1.95 + ,1.75 + ,1.82 + ,1.88 + ,1.89 + ,2.01 + ,2.03 + ,2.09 + ,2.15 + ,2.57 + ,2.41 + ,2.82 + ,2.59 + ,2.57 + ,2.46 + ,2.39 + ,2.57 + ,2.52 + ,2.66 + ,2.7 + ,2.62 + ,2.52 + ,2.65 + ,2.56 + ,2.62 + ,2.62 + ,2.63 + ,2.57 + ,2.54 + ,2.86 + ,2.72 + ,2.7) > ylab = 'Canadian 5yr Yields' > xlab = 'U.S. 5yr Yields' > #'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/1oc6c1257749185.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/2zeqe1257749185.tab") > > system("convert tmp/1oc6c1257749185.ps tmp/1oc6c1257749185.png") > > > proc.time() user system elapsed 0.563 0.215 0.643