(rho12 <- cor(x, y)) (rho23 <- cor(y, z)) (rho13 <- cor(x, z)) (rhoxy_z <- (rho12-(rho13*rho23))/(sqrt(1-(rho13*rho13)) * sqrt(1-(rho23*rho23)))) (rhoxz_y <- (rho13-(rho12*rho23))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho23*rho23)))) (rhoyz_x <- (rho23-(rho12*rho13))/(sqrt(1-(rho12*rho12)) * sqrt(1-(rho13*rho13)))) load(file='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,'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,'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,'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='mytable.tab')
|