R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(102.89,102.16,100.81,101.02,101.08,100.49,100.43,99.42,98.75,98.79,98.72,96.54,96.44,96.25,97.44,101.86,102.36,101.21,104.61,107.43,108.44,109.45,110.35,115.02,113.11,116.5,121.28,119.05,123.2,128.41,127.57,125.56,133.6,130.8,129.84,123.94,118.63,121.83,119.97,124.98,129.99,126.6,121.71,119.28,122.63,116.74,114.23,113.23,112.75,113.54,115.3,121.05,119.51,116.78,117.17,117.5,119.65,120.97,117.18,116.87) > y <- c(99.25,99.36,99.34,99.36,100.85,100.86,100.93,101.25,101.72,101.54,101.35,101.42,101.57,101.76,102.05,102.05,101.89,102.06,102,102.14,102.2,102.3,102.7,102.77,103.1,103.13,103.31,103.52,103.34,103.53,103.8,103.9,103.91,104.21,104.58,104.89,105.15,105.24,105.57,105.62,106.17,106.27,106.41,106.94,107.16,107.32,107.32,107.35,107.55,107.87,108.37,108.38,107.92,108.03,108.14,108.3,108.64,108.66,109.04,109.03) > x <- c(48527.00,44446.00,46380.00,48950.00,38883.00,42928.00,37107.00,30186.00,32602.00,39892.00,32194.00,21629.00,59968.00,45694.00,55756.00,48554.00,41052.00,49822.00,39191.00,31994.00,35735.00,38930.00,33658.00,23849.00,58972.00,59249.00,63955.00,53785.00,52760.00,44795.00,37348.00,32370.00,32717.00,40974.00,33591.00,21124.00,58608.00,46865.00,51378.00,46235.00,47206.00,45382.00,41227.00,33795.00,31295.00,42625.00,33625.00,21538.00,56421.00,53152.00,53536.00,52408.00,41454.00,38271.00,35306.00,26414.00,31917.00,38030.00,27534.00,18387.00) > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Partial Correlation (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_partialcorrelation.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.1626935 > (rho23 <- cor(y, z)) [1] 0.6346057 > (rho13 <- cor(x, z)) [1] -0.04261472 > (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) [1] -0.1756818 > (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) [1] 0.0795126 > (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) [1] 0.6367266 > 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/1g0hx1194172011.tab") > > > > proc.time() user system elapsed 0.433 0.030 0.457