Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
22 0 15 4 4 2 1 0 3 3 0 0 3 2 3 4 0 2 4 5 14 5 3 3 4 2 0 12 5 3 0 4 3 3 5 4 4 0 5 5 6 0 12 3 3 25 0 15 4 4 0 0 0 5 5 25 5 10 3 3 0 0 12 3 4 2 2 20 4 4 30 3 20 4 4 1 0 2 4 4 0 0 3 3 5 0 0 16 5 3 8 0 4 4 5 0 4 2 3 3 0 0 4 3 4 0 8 16 3 4 6 0 0 3 4 0 0 0 4 3 6 0 15 5 5 12 3 9 4 4 1 0 1 5 5 20 24 15 3 2 5 15 5 4 5 0 0 4 2 4 21 12 15 5 5 3 0 4 2 4 5 0 12 3 5 8 0 2 3 3 10 4 4 3 3 5 1 2 3 4 8 0 4 4 4 6 16 8 3 5 15 9 30 5 5 9 0 6 2 3 14 8 6 3 5 9 10 7 3 5 5 0 4 4 4 9 6 17 5 5 10 0 5 3 3 12 0 0 3 4 9 15 3 3 5 7 0 4 3 3 15 0 15 3 5 14 0 0 3 4 16 0 8 3 3 6 0 10 4 5 6 0 4 3 4 2 0 0 2 5 8 10 6 3 3 0 7 11 3 5 6 2 10 3 4 4 0 0 4 5 15 2 0 2 4 0 0 0 5 5 12 3 0 4 5 0 12 0 2 5 13 0 0 2 4 18 3 0 3 5 4 0 7 4 4 9 0 4 5 5 12 0 12 3 4 14 8 6 3 3 0 0 12 4 4 4 7 10 3 3 12 0 9 4 5 15 18 6 3 4 0 0 0 3 4 30 13 16 4 4 0 0 2 2 4 0 0 0 2 4 3 0 0 4 3 2 0 1 2 4 15 0 10 4 3 3 2 10 3 4 4 0 14 5 5 12 9 12 3 4 8 16 12 3 3 12 10 12 4 4 18 0 5 3 4 15 7 0 3 4 3 8 4 4 5 0 0 3 3 4 0 0 0 3 5 21 0 14 3 4 10 0 4 2 2 5 1 3 4 5 0 0 0 3 5 1 0 12 5 5 0 0 12 3 4 6 0 15 5 5 12 0 0 4 5 10 20 8 3 4 0 9 6 3 4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 26 5 5 6 0 21 3 5 0 0 0 4 3 9 21 0 5 5 5 3 4 4 5 2 0 4 4 4 8 0 0 3 5 16 0 18 5 5 0 20 1 4 4 12 0 18 4 4 0 0 6 3 3 0 18 6 5 5 9 0 0 3 4 10 1 8 4 4 5 0 3 4 4 2 0 7 3 5 6 5 15 3 4 0 0 0 5 5 0 0 0 4 3 0 3 2 4 5 24 0 27 3 5 0 0 3 5 5 18 11 8 2 3 1 0 4 3 5 4 0 0 3 4 0 0 0 4 4 2 2 0 2 2 12 15 8 4 5 0 4 4 2 4 10 0 3 4 4 0 0 8 4 4 0 0 0 5 5 0 0 6 5 4 2 0 4 2 3 0 1 5 3 5 20 0 0 4 4 0 0 6 4 4 8 4 8 4 5 1 0 5 3 5 2 6 6 3 4 10 0 12 3 4 10 0 0 3 4 12 0 8 2 3 17 18 13 3 3 6 0 6 4 5 4 2 11 3 4 21 3 12 5 5 0 0 0 2 4 15 0 4 2 4 1 13 5 4 5 14 25 0 4 4 7 0 7 4 4 19 0 0 4 4 6 5 0 5 5 14 0 4 5 5 26 0 8 5 5 0 0 0 3 3 0 0 0 3 2 0 0 2 4 5 0 0 9 4 4 0 15 4 4 4 2 0 0 4 5 8 0 0 3 3 20 4 12 5 5 7 2 0 2 4 1 0 1 4 4 0 0 3 5 5 13 10 11 2 3 0 0 0 2 3 19 0 12 3 3 0 30 1 5 5 0 2 0 4 4 6 1 6 4 5 0 0 0 5 5 1 0 3 3 4 6 2 9 2 3 30 0 12 3 4 0 0 5 5 5 5 0 0 3 2 15 6 0 4 5 0 0 15 3 4 6 9 5 4 4 0 2 0 5 4 14 0 0 4 4 21 0 0 4 5 0 30 6 4 4 16 0 10 4 4 30 8 18 3 3 15 25 8 3 5 30 0 10 4 4 9 2 4 5 5 0 10 1 3 4 0 10 13 4 4 8 0 8 3 3 29 10 0 3 4 21 0 0 3 4 6 0 4 3 2 0 0 12 2 3 6 21 4 3 5
Names of X columns:
walking.days cycling.days sports.days fruits vegetables
Type of Correlation
kendall
pearson
spearman
kendall
Chart options
Title:
R Code
panel.tau <- function(x, y, digits=2, prefix='', cex.cor) { usr <- par('usr'); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) rr <- cor.test(x, y, method=par1) r <- round(rr$p.value,2) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep='') if(missing(cex.cor)) cex <- 0.5/strwidth(txt) text(0.5, 0.5, txt, cex = cex) } panel.hist <- function(x, ...) { usr <- par('usr'); on.exit(par(usr)) par(usr = c(usr[1:2], 0, 1.5) ) h <- hist(x, plot = FALSE) breaks <- h$breaks; nB <- length(breaks) y <- h$counts; y <- y/max(y) rect(breaks[-nB], 0, breaks[-1], y, col='grey', ...) } bitmap(file='test1.png') pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main) dev.off() load(file='createtable') n <- length(y[,1]) n a<-table.start() a<-table.row.start(a) a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,' ',header=TRUE) for (i in 1:n) { a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) } a<-table.row.end(a) for (i in 1:n) { a<-table.row.start(a) a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) for (j in 1:n) { r <- cor.test(y[i,],y[j,],method=par1) a<-table.element(a,round(r$estimate,3)) } a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable.tab') ncorrs <- (n*n -n)/2 mycorrs <- array(0, dim=c(10,3)) a<-table.start() a<-table.row.start(a) a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'pair',1,TRUE) a<-table.element(a,'Pearson r',1,TRUE) a<-table.element(a,'Spearman rho',1,TRUE) a<-table.element(a,'Kendall tau',1,TRUE) a<-table.row.end(a) cor.test(y[1,],y[2,],method=par1) for (i in 1:(n-1)) { for (j in (i+1):n) { a<-table.row.start(a) dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') a<-table.element(a,dum,header=TRUE) rp <- cor.test(y[i,],y[j,],method='pearson') a<-table.element(a,round(rp$estimate,4)) rs <- cor.test(y[i,],y[j,],method='spearman') a<-table.element(a,round(rs$estimate,4)) rk <- cor.test(y[i,],y[j,],method='kendall') a<-table.element(a,round(rk$estimate,4)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'p-value',header=T) a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) a<-table.row.end(a) for (iii in 1:10) { iiid100 <- iii / 100 if (rp$p.value < iiid100) mycorrs[iii, 1] = mycorrs[iii, 1] + 1 if (rs$p.value < iiid100) mycorrs[iii, 2] = mycorrs[iii, 2] + 1 if (rk$p.value < iiid100) mycorrs[iii, 3] = mycorrs[iii, 3] + 1 } } } a<-table.end(a) table.save(a,file='mytable1.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Meta Analysis of Correlation Tests',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Number of significant by total number of Correlations',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Type I error',1,TRUE) a<-table.element(a,'Pearson r',1,TRUE) a<-table.element(a,'Spearman rho',1,TRUE) a<-table.element(a,'Kendall tau',1,TRUE) a<-table.row.end(a) for (iii in 1:10) { iiid100 <- iii / 100 a<-table.row.start(a) a<-table.element(a,round(iiid100,2),header=T) a<-table.element(a,round(mycorrs[iii,1]/ncorrs,2)) a<-table.element(a,round(mycorrs[iii,2]/ncorrs,2)) a<-table.element(a,round(mycorrs[iii,3]/ncorrs,2)) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation