Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
0.5215052 0.4248284 0.4250311 0.4771938 0.8280212 0.6156186 0.366627 0.4308883 0.2810287 0.4646245 0.2693951 0.5779049 0.5661151 0.5077584 0.7507175 0.6808395 0.7661091 0.4561473 0.4977496 0.4193273 0.6095514 0.457337 0.5705478 0.3478996 0.3874993 0.5824285 0.2391033 0.2367445 0.2626158 0.4240934 0.365275 0.3750758 0.4090056 0.3891676 0.240261 0.1589496 0.4393373 0.5094681 0.3743465 0.4339828 0.4130557 0.3288928 0.5186648 0.5486504 0.5469111 0.4963494 0.5308929 0.5957761 0.5570584 0.5731325 0.5005416 0.5431269 0.5593657 0.6911693 0.4403485 0.5676662 0.5969114 0.4735537 0.5923935 0.5975556 0.6334127 0.6057115 0.7046107 0.4805263 0.702686 0.7009017 0.6030854 0.6980919 0.597656 0.8023421 0.6017109 0.5993127 0.6025625 0.7016625 0.4995714 0.4980918 0.497569 0.600183 0.3339542 0.274437 0.3209428 0.5406671 0.4050209 0.2885961 0.3275942 0.3132606 0.2575562 0.2138386 0.1861856 0.1592713
Data Y:
4.031636 3.702076 3.056176 3.280707 2.984728 3.693712 3.226317 2.190349 2.599515 3.080288 2.929672 2.922548 3.234943 2.983081 3.284389 3.806511 3.784579 2.645654 3.092081 3.204859 3.107225 3.466909 2.984404 3.218072 2.82731 3.182049 2.236319 2.033218 1.644804 1.627971 1.677559 2.330828 2.493615 2.257172 2.655517 2.298655 2.600402 3.04523 2.790583 3.227052 2.967479 2.938817 3.277961 3.423985 3.072646 2.754253 2.910431 3.174369 3.068387 3.089543 2.906654 2.931161 3.02566 2.939551 2.691019 3.19812 3.07639 2.863873 3.013802 3.053364 2.864753 3.057062 2.959365 3.252258 3.602988 3.497704 3.296867 3.602417 3.3001 3.40193 3.502591 3.402348 3.498551 3.199823 2.700064 2.801034 2.898628 2.800854 2.399942 2.402724 2.202331 2.102594 1.798293 1.202484 1.400201 1.200832 1.298083 1.099742 1.001377 0.8361743
Chart options
Title:
Label y-axis:
Label x-axis:
R Code
library(psychometric) x <- x[!is.na(y)] y <- y[!is.na(y)] y <- y[!is.na(x)] x <- x[!is.na(x)] bitmap(file='test1.png') histx <- hist(x, plot=FALSE) histy <- hist(y, plot=FALSE) maxcounts <- max(c(histx$counts, histx$counts)) xrange <- c(min(x),max(x)) yrange <- c(min(y),max(y)) nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE) par(mar=c(4,4,1,1)) plot(x, y, xlim=xrange, ylim=yrange, xlab=xlab, ylab=ylab, sub=main) par(mar=c(0,4,1,1)) barplot(histx$counts, axes=FALSE, ylim=c(0, maxcounts), space=0) par(mar=c(4,0,1,1)) barplot(histy$counts, axes=FALSE, xlim=c(0, maxcounts), space=0, horiz=TRUE) dev.off() lx = length(x) makebiased = (lx-1)/lx varx = var(x)*makebiased vary = var(y)*makebiased corxy <- cor.test(x,y,method='pearson', na.rm = T) cxy <- as.matrix(corxy$estimate)[1,1] load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Pearson Product Moment Correlation - Ungrouped Data',3,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Statistic',1,TRUE) a<-table.element(a,'Variable X',1,TRUE) a<-table.element(a,'Variable Y',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm','Mean',''),header=TRUE) a<-table.element(a,mean(x)) a<-table.element(a,mean(y)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/biased.htm','Biased Variance',''),header=TRUE) a<-table.element(a,varx) a<-table.element(a,vary) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/biased1.htm','Biased Standard Deviation',''),header=TRUE) a<-table.element(a,sqrt(varx)) a<-table.element(a,sqrt(vary)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/covariance.htm','Covariance',''),header=TRUE) a<-table.element(a,cov(x,y),2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/pearson_correlation.htm','Correlation',''),header=TRUE) a<-table.element(a,cxy,2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/coeff_of_determination.htm','Determination',''),header=TRUE) a<-table.element(a,cxy*cxy,2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/ttest_statistic.htm','T-Test',''),header=TRUE) a<-table.element(a,as.matrix(corxy$statistic)[1,1],2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'p-value (2 sided)',header=TRUE) a<-table.element(a,(p2 <- as.matrix(corxy$p.value)[1,1]),2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'p-value (1 sided)',header=TRUE) a<-table.element(a,p2/2,2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'95% CI of Correlation',header=TRUE) a<-table.element(a,paste('[',CIr(r=cxy, n = lx, level = .95)[1],', ', CIr(r=cxy, n = lx, level = .95)[2],']',sep=''),2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Degrees of Freedom',header=TRUE) a<-table.element(a,lx-2,2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Number of Observations',header=TRUE) a<-table.element(a,lx,2) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab') library(moments) library(nortest) jarque.x <- jarque.test(x) jarque.y <- jarque.test(y) if(lx>7) { ad.x <- ad.test(x) ad.y <- ad.test(y) } a<-table.start() a<-table.row.start(a) a<-table.element(a,'Normality Tests',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,paste('<pre>',RC.texteval('jarque.x'),'</pre>',sep='')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,paste('<pre>',RC.texteval('jarque.y'),'</pre>',sep='')) a<-table.row.end(a) if(lx>7) { a<-table.row.start(a) a<-table.element(a,paste('<pre>',RC.texteval('ad.x'),'</pre>',sep='')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,paste('<pre>',RC.texteval('ad.y'),'</pre>',sep='')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable1.tab') library(car) bitmap(file='test2.png') qq.plot(x,main='QQplot of variable x') dev.off() bitmap(file='test3.png') qq.plot(y,main='QQplot of variable y') dev.off()
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation