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(9.1 + ,9.27 + ,9.59 + ,10.64 + ,12.17 + ,12.81 + ,12.33 + ,11.92 + ,11.92 + ,12.17 + ,12.33 + ,10.39 + ,10.96 + ,11.44 + ,11.36 + ,11.84 + ,11.2 + ,12.17 + ,11.92 + ,11.92 + ,12.73 + ,12.89 + ,15.47 + ,17 + ,14.91 + ,13.62 + ,12.89 + ,12.33 + ,12.33 + ,11.36 + ,10.96 + ,11.36 + ,10.15 + ,9.35 + ,9.59 + ,9.59 + ,9.67 + ,9.19 + ,9.02 + ,8.94 + ,8.38 + ,8.3 + ,8.14 + ,8.3 + ,8.54 + ,9.02 + ,9.27 + ,9.02 + ,9.02 + ,8.38 + ,8.46 + ,7.9 + ,7.17 + ,7.25 + ,7.33 + ,7.41 + ,7.98 + ,7.65 + ,7.41 + ,7.57 + ,7.41 + ,7.49 + ,7.49 + ,8.14 + ,8.38 + ,8.22 + ,8.46 + ,7.98 + ,8.06 + ,8.06 + ,8.54 + ,9.75 + ,12.17 + ,15.23 + ,15.79 + ,15.39 + ,14.34 + ,13.78 + ,13.21 + ,12.65 + ,11.84 + ,11.84 + ,11.6 + ,11.04 + ,10.64 + ,10.39 + ,10.15 + ,9.67 + ,9.67 + ,9.91 + ,9.91 + ,9.91 + ,9.71 + ,9.51 + ,9.32 + ,9.12 + ,9.22 + ,9.22 + ,8.92 + ,8.82 + ,8.82 + ,8.82 + ,8.72 + ,8.34 + ,8.14 + ,8.14 + ,8.04 + ,8.04 + ,8.04 + ,8.14 + ,8.24 + ,8.34 + ,8.53 + ,8.63 + ,8.53 + ,8.72 + ,9.11 + ,8.92 + ,8.82 + ,9.21 + ,9.21 + ,9.4 + ,9.6 + ,9.69 + ,9.74 + ,10.64 + ,12.82 + ,15.06 + ,17.3 + ,20.04 + ,17.9 + ,16.77 + ,17.07 + ,17.1 + ,17.53 + ,17.7 + ,17.37 + ,17.13 + ,17.13 + ,16.7 + ,15.23 + ,13.66 + ,12.96 + ,13.39 + ,13.73 + ,13.86 + ,14.36 + ,14.09 + ,13.89 + ,14.03 + ,14.73 + ,16.3 + ,17.3 + ,17.6 + ,18 + ,19.54 + ,22.34 + ,24.08 + ,23.85 + ,24.08 + ,25.98 + ,26.55 + ,26.75 + ,26.88 + ,26.78 + ,27.18 + ,28.15 + ,28.92 + ,29.16 + ,29.62 + ,29.92 + ,30.26 + ,30.62 + ,31.03 + ,31.56 + ,32.46 + ,33.4 + ,34.8 + ,36.67 + ,38.84 + ,40.51 + ,41.85 + ,44.45 + ,49.33 + ,53.84 + ,56.94 + ,60.61 + ,65.22 + ,72.57 + ,82.38 + ,90.93 + ,96.5 + ,99.6 + ,103.9 + ,107.6 + ,109.6 + ,113.6 + ,118.3 + ,124 + ,130.7 + ,136.2 + ,140.3 + ,144.5 + ,148.2 + ,152.4 + ,156.9 + ,160.5 + ,163 + ,166.6 + ,172.2 + ,177.1 + ,179.9 + ,184 + ,188.9 + ,195.3 + ,201.6 + ,207.34 + ,215.3 + ,214.54) > x <- c(19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,20.1 + ,21.64 + ,20.95 + ,19.46 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.39 + ,19.94 + ,20.69 + ,20.69 + ,21.64 + ,20.86 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.7 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,23.42 + ,30.02 + ,42.03 + ,32.52 + ,29.13 + ,28.57 + ,28.88 + ,27.49 + ,23.75 + ,23.09 + ,23.24 + ,23.52 + ,22.99 + ,23.75 + ,23.05 + ,21.66 + ,20.84 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,20.67 + ,24.44 + ,34.94 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,39.26 + ,41.51 + ,36.41 + ,41.25 + ,58.6 + ,97.81 + ,159.74 + ,161.49 + ,125.32 + ,148.31 + ,193.55 + ,307.5 + ,612.56 + ,459.64 + ,375.91 + ,424 + ,360.66 + ,317.66 + ,368.24 + ,447.95 + ,438.31 + ,382.58 + ,384.93 + ,363.29 + ,344.97 + ,360.91 + ,385.42 + ,385.5 + ,389.09 + ,332.39 + ,295.24 + ,279.91 + ,280.1 + ,272.22 + ,311.33 + ,364.8 + ,410.52 + ,446 + ,606 + ,699 + ,768 + ,950) > ylab = 'y' > xlab = 'x' > #'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/1179j1293559332.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/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/2b9501293559332.tab") > > try(system("convert tmp/1179j1293559332.ps tmp/1179j1293559332.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.420 0.169 1.806