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(77.2,79.4,90.4,81.4,85.8,103.6,73.6,75.7,99.2,88.7,94.6,98.7,84.2,87.7,103.3,88.2,93.4,106.3,73.1,78.6,101.6,101.4,98.5,99,89.5,83.5,97.4,87.8,90.4,97.1,79.4,85) > y <- c(99.5,107.9,124.6,115,110.3,132.7,99.7,96.5,118.7,112.9,130.5,137.9,115,116.8,140.9,120.7,134.2,147.3,112.4,107.1,128.4,137.7,135,151,137.4,132.4,161.3,139.8,146,154.6,142.1,120.5) > x <- c(97.2,102.5,113.4,109.8,104.9,126.1,80,96.8,117.2,112.3,117.3,111.1,102.2,104.3,122.9,107.6,121.3,131.5,89,104.4,128.9,135.9,133.3,121.3,120.5,120.4,137.9,126.1,133.2,146.6,103.4,117.2) > #'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.8265579 > (rho23 <- cor(y, z)) [1] 0.708812 > (rho13 <- cor(x, z)) [1] 0.8023692 > (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) [1] 0.6124189 > (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) [1] 0.5452807 > (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) [1] 0.1357664 > 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/1pvyd1194260224.tab") > > > > proc.time() user system elapsed 0.823 0.027 0.844