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(7.3,7.2,7.1,6.9,6.8,6.7,6.8,6.8,6.7,6.8,6.8,6.7,6.3,6.2,6.2,6.5,6.5,6.4,6.2,6.2,6.3,7.5,7.4,7.4,7.4,7.4,7.4,7.2,7.2,7.2,7.5,7.4,7.5,8.0,8.0,8.0,8.1,8.1,8.1,7.9,7.9,8.0,8.2,8.1,8.2,8.5,8.5,8.6,8.4,8.4,8.4,7.7,7.8,7.9,8.8,8.8,8.9,8.5,8.5,8.5,8.4,8.5,8.4,8.3,8.4,8.4,8.5,8.5,8.5,8.5,8.5,8.5,8.5,8.5,8.5,8.3,8.3,8.3,8.2,8.1,8.1,8.2,8.0,7.9,7.9,7.8,7.7,7.9,7.7,7.6) > y <- c(13.5,16.2,17.6,15.8,17.6,15.2,15.9,12.0,13.3,14.8,16.1,16.9,17.6,13.9,10.0,7.6,7.1,8.1,8.1,7.7,4.0,1.4,0.3,-1.0,-1.9,-1.5,-0.2,3.4,3.0,4.1,3.4,3.2,6.1,5.8,6.2,5.8,5.9,6.7,5.9,3.8,1.7,1.4,1.8,3.0,3.6,4.8,4.3,4.2,2.9,4.9,7.2,8.7,9.1,8.9,9.0,11.6,9.6,9.1,9.2,10.8,11.0,8.5,6.5,7.2,7.8,8.7,7.8,7.5,7.7,7.5,8.3,7.9,10.4,11.5,14.0,11.9,11.9,10.3,11.3,9.9,8.9,9.2,8.8,6.7,7.1,6.6,7.2,5.0,5.3,6.3) > x <- c(-12.7,-2.4,7.1,-3.9,9.5,5,-16.1,-10.8,7,13.6,8.1,-8.1,4.9,-0.8,4.3,4,1.5,5.4,-11.3,-16.4,-2,8.9,-7.2,-18,1.3,6.3,-6,2.8,2,5.1,-7.6,-18.6,5.8,20.3,0.7,-11.2,-5.7,-0.1,3.4,3.3,-1.2,4.2,-8.8,-25.3,8.5,14.5,-3.1,-10.4,-2.9,0.3,22.6,15.4,9,29.1,2.8,-3.8,27.7,28.9,26.5,19.8,13.2,14.1,34.1,30,21.8,32.1,5.3,3,17.1,26.3,38.1,19.5,38,35.5,78.6,62.2,76.9,104.9,32.2,42.5,64.3,74.9,75.4,43,58.7,55.4,76.6,63.3,78.9,82.7) > #'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.1545922 > (rho23 <- cor(y, z)) [1] -0.2225963 > (rho13 <- cor(x, z)) [1] 0.3567237 > (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) [1] 0.2569224 > (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) [1] 0.4060829 > (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) [1] -0.3009201 > 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/1k4eh1199643141.tab") > > > > proc.time() user system elapsed 0.420 0.030 0.447