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(300.4,299.0,296.2,299.2,298.2,302.1,311.7,310.3,294.0,289.8,267.4,266.0,266.6,264.6,268.2,277.4,273.8,271.4,268.8,264.4,260.0,257.6,229.7,231.5,226.4,242.1,228.3,209.9,209.3,220.8,239.6,241.1,241.9,240.8,179.9,190.8,174.2,170.0,170.3,159.3,147.9,154.2,164.5,173.9,163.6,149.7,128.2,124.7,125.1,120.9,117.5,114.0,113.4,118.9,121.7,121.9,120.3,115.6,105.7,105.1) > y <- c(276.1,264.1,265.5,287.7,285.1,304.5,301.5,274.2,258.6,253.9,269.6,266.9,269.6,257.9,258.2,254.7,237.2,267.2,228.8,196.3,194.8,186.6,176.7,162.1,154.9,150.1,150.5,143.6,143.8,141.5,147.9,151.4,144.6,140.4,139.5,138.1,136.7,130.0,128.5,130.4,125.7,121.7,129.9,129.6,128.2,119.7,112.2,105.6,101.2,94.9,95.1,93.1,91.4,89.8,85.9,89.7,91.6,88.6,86.9,86.4) > x <- c(159.1,157.5,158.4,159.9,156.7,158.8,156.8,149.9,149.3,146.2,138.6,132.6,130.8,130.2,134.9,135.0,130.9,127.9,123.1,122.4,122.6,120.1,115.9,114.3,116.5,114.3,113.3,112.9,110.9,114.7,118.8,120.1,117.9,115.8,113.6,113.7,112.2,113.0,112.3,114.1,114.5,114.8,114.1,115.3,115.0,114.4,111.1,112.1,110.8,104.3,101.6,102.3,103.6,103.5,102.3,101.7,97.9,94.6,90.9,90.4) > #'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.930689 > (rho23 <- cor(y, z)) [1] 0.927614 > (rho13 <- cor(x, z)) [1] 0.876642 > (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) [1] 0.6537916 > (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) [1] 0.09749288 > (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) [1] 0.6348183 > 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/15net1194292640.tab") > > > > proc.time() user system elapsed 0.443 0.035 0.475