R version 2.7.0 (2008-04-22) 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(283.9 + ,340.5 + ,383 + ,335.4 + ,356 + ,431 + ,441.9 + ,262.3 + ,481.1 + ,442.8 + ,458.4 + ,472.7 + ,498.8 + ,463.3 + ,538.3 + ,494.2 + ,446.2 + ,497.5 + ,433.2 + ,359.4 + ,455.9 + ,483 + ,469.7 + ,423.8 + ,371 + ,435.7 + ,438.1 + ,364.5 + ,392.7 + ,405.1 + ,391.4 + ,282.8 + ,408 + ,480.9 + ,416.9 + ,350.7 + ,399.9 + ,438.1 + ,454.9 + ,407.7 + ,485 + ,494 + ,521.2 + ,333 + ,520.3 + ,570.5 + ,501.8 + ,408.4 + ,512.7 + ,596.9 + ,581.5 + ,605.7 + ,581.1 + ,538.3 + ,731.4 + ,457.7 + ,706.3 + ,708.5 + ,683.5 + ,722.1 + ,727.7 + ,674.4 + ,675.3 + ,628.7 + ,658.3 + ,786 + ,736.9 + ,567.3 + ,736.3 + ,719.6 + ,676.8 + ,589.5 + ,596.5 + ,661 + ,840.9 + ,683.1 + ,677.4 + ,780.2 + ,928.8 + ,557.5 + ,760.6 + ,847 + ,719 + ,699.8 + ,745.4 + ,871.5 + ,1199.8 + ,795.4 + ,1054.4 + ,753.7 + ,1093.8 + ,768.4 + ,1405.7 + ,1149.2 + ,1086.8 + ,994.4 + ,958.8 + ,1096.3 + ,1107.4 + ,862.4 + ,983 + ,1021.1 + ,1036.3 + ,684.5 + ,874.1 + ,1031.6 + ,1126.3 + ,1041.9 + ,1419.4 + ,1402.2 + ,1503.6 + ,1503.6 + ,1571.2 + ,1351.2 + ,1448.3 + ,1292.9 + ,1293.7 + ,1824.7 + ,1641.4 + ,1529.1 + ,1417 + ,1060 + ,1117 + ,1226.2 + ,1124 + ,1246 + ,1398.1 + ,1095.2 + ,1507.1 + ,1467 + ,1262.1 + ,1262.9 + ,1184.9 + ,1412.9 + ,1581.8 + ,1348.8 + ,1443.7 + ,1628.7 + ,1393.2 + ,1108.1 + ,1074.8 + ,1323.5 + ,1367 + ,1190.7 + ,1149.2 + ,1281.9 + ,1406.8 + ,1392.4 + ,1674.5 + ,1529.8 + ,1180.9 + ,1282.8 + ,1524.2 + ,1524.6 + ,1520.1 + ,1881.9 + ,1375.2 + ,1336.5 + ,1653.9 + ,1404.3 + ,1731.4 + ,1330.8 + ,1616.3 + ,1503.7 + ,1476.7 + ,1565.6 + ,1581.8 + ,1407.7 + ,1393.7 + ,1662.4 + ,1929 + ,1352.8 + ,1339.8 + ,1251.2 + ,1491.7 + ,1540.7 + ,1383.7 + ,1827.5 + ,1591.3 + ,1289.2 + ,1291.9 + ,1368.3 + ,1264.6 + ,1448.8 + ,1239.2 + ,1280.9 + ,1269.4 + ,1068.5) > x <- c(1160.9 + ,1470.1 + ,1653 + ,1390 + ,1550.7 + ,1852.1 + ,1797.9 + ,1256.4 + ,1835.5 + ,1793.2 + ,1874.8 + ,1948.6 + ,1819.9 + ,1823.6 + ,2042.7 + ,1705.9 + ,1876.8 + ,1919.5 + ,1803.4 + ,1380.4 + ,1812.1 + ,1856.4 + ,1934.3 + ,1977.5 + ,1813.7 + ,1937.1 + ,2178.7 + ,1699.9 + ,1943.8 + ,2151 + ,1927.7 + ,1418.2 + ,1899.8 + ,1974.9 + ,1918.7 + ,1818.3 + ,1751 + ,1888 + ,1947.7 + ,1818.1 + ,2110.8 + ,2009 + ,2124.2 + ,1542.5 + ,2044.1 + ,2324.3 + ,2055.6 + ,2137.9 + ,2140.7 + ,2301.5 + ,2412.6 + ,2477 + ,2311.8 + ,2326.6 + ,2745.3 + ,1937.2 + ,2668.7 + ,2636.1 + ,2327.6 + ,2584.6 + ,2282.8 + ,2337 + ,2499.3 + ,2389.6 + ,2327.1 + ,2556.6 + ,2580 + ,1831.4 + ,2382.1 + ,2237.9 + ,2117.7 + ,2240.9 + ,1946.1 + ,2149.6 + ,2690 + ,2171.1 + ,2358.6 + ,2841.4 + ,3064.6 + ,2037.3 + ,2799.9 + ,2852.3 + ,2541.2 + ,2910 + ,2694.6 + ,3081.7 + ,3648.2 + ,2823.3 + ,3670.1 + ,3027.6 + ,3578.5 + ,2655.1 + ,3835.3 + ,3766 + ,3716 + ,3531.7 + ,3194 + ,3442.2 + ,3610 + ,3105.5 + ,3428.4 + ,3489.7 + ,3679 + ,2596.1 + ,3110.7 + ,3401.7 + ,3431.8 + ,3383.1 + ,3797.5 + ,3860.5 + ,4054.1 + ,4044.9 + ,4402.4 + ,4046.4 + ,4329.7 + ,3204.2 + ,4037.2 + ,4678.4 + ,4174.6 + ,4151.4 + ,3874.7 + ,3568 + ,3431 + ,3733.2 + ,3278.3 + ,3583.7 + ,4060.3 + ,2979 + ,4078.4 + ,4002.1 + ,3542.4 + ,3928.2 + ,3626 + ,3998.4 + ,4413.5 + ,3853.1 + ,3920.5 + ,4616.2 + ,4332.7 + ,3362.7 + ,3855.4 + ,4087.1 + ,3860.2 + ,4018.1 + ,3627.7 + ,3996 + ,4420.7 + ,4386.5 + ,4631.8 + ,4875.3 + ,4549.3 + ,3933 + ,4963.3 + ,4419.7 + ,4646.7 + ,5000.2 + ,4302.2 + ,4432.1 + ,5125.5 + ,4299.9 + ,5145.6 + ,4537.8 + ,4880.9 + ,4136.9 + ,4668.8 + ,4818.5 + ,4933.9 + ,4524.4 + ,4676.1 + ,4911 + ,5745 + ,4483.7 + ,4772.7 + ,5021.4 + ,5535.6 + ,4736 + ,5001.7 + ,5486.3 + ,4958.5 + ,4756.4 + ,4763.3 + ,4951.2 + ,4692.8 + ,5301.2 + ,4929.7 + ,5223.3 + ,5708.3 + ,4018) > ylab = 'Export België naar de VS' > xlab = 'Totale export België' > #'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/1xlrr1228239239.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/22egn1228239239.tab") > > system("convert tmp/1xlrr1228239239.ps tmp/1xlrr1228239239.png") > > > proc.time() user system elapsed 1.173 0.272 1.234