R version 2.7.2 (2008-08-25) 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. > z <- c(12301,310,910,2072,3289,4693,6183,7252,6703,8217,9731,10778,11279,514,1350,2537,3612,5049,5368,6537,6066,7679,9527,10244,10745,539,1058,2372,3563,4737,5105,6179,5540,6470,8241,8942,8717,-196,492,560,1003,1696,2867,4316,3705,4592,6082,6907,7578) > y <- c(2136,41,202,710,1018,1177,1408,918,553,423,880,1057,1603,112,304,794,901,1232,1240,1032,1145,1588,2264,2209,2917,243,558,1238,1502,2000,2146,2066,2046,1952,2771,3278,4000,410,1107,1622,1986,2036,2400,2736,2901,2883,3747,4075,4996) > x <- c(10165,269,708,1362,2271,3516,4775,6334,6150,7794,8851,9721,9676,402,1046,1743,2711,3817,4128,5505,4921,6091,7263,8035,7828,296,500,1134,2061,2737,2959,4113,3494,4518,5470,5664,4717,-606,-615,-1062,-983,-340,467,1580,804,1709,2335,2832,2582) > #'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!) > (rho12 <- cor(x, y)) [1] 0.1177427 > (rho23 <- cor(y, z)) [1] 0.4402621 > (rho13 <- cor(x, z)) [1] 0.9434615 > (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) [1] -1 > (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) [1] 1 > (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) [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 Partial Correlation - Ungrouped Data',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Statistic',1,TRUE) > a<-table.element(a,'Value',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Correlation r(xy)',header=TRUE) > a<-table.element(a,rho12) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/partial_correlation1.htm','Partial Correlation r(xy.z)',''),header=TRUE) > a<-table.element(a,rhoxy_z) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Correlation r(xz)',header=TRUE) > a<-table.element(a,rho13) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/partial_correlation1.htm','Partial Correlation r(xz.y)',''),header=TRUE) > a<-table.element(a,rhoxz_y) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Correlation r(yz)',header=TRUE) > a<-table.element(a,rho23) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/partial_correlation1.htm','Partial Correlation r(yz.x)',''),header=TRUE) > a<-table.element(a,rhoyz_x) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/1kulc1226591581.tab") > > > > proc.time() user system elapsed 0.447 0.049 0.501