Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
04.031636 03.702076 03.056167 03.280707 02.984728 03.693712 03.226317 02.190349 02.599515 03.080288 02.929672 02.922548 03.234943 02.983081 03.284389 03.806511 03.784579 02.645654 03.092081 03.204859 03.107225 03.466909 02.984404 03.218072 02.827310 03.182049 02.236319 02.033218 01.644804 01.627971 01.677559 02.330828 02.493615 02.257172 02.655517 02.298655 02.600402 03.045230 02.790583 03.227052 02.967479 02.938817 03.277961 03.423985 03.072646 02.754253 02.910431 03.174369 03.068387 03.089543 02.906654 02.931161 03.025660 02.939551 02.691019 03.198120 03.076390 02.863873 03.013802 03.053364 02.864753 03.057062 02.959365 03.252258 03.602988 03.497704 03.296867 03.602417 03.300100 03.401930 03.502591 03.402348 03.498551 03.199823 02.700064 02.801034 02.898628 02.800854 02.399942 02.402724 02.202331 02.102594 01.798293 01.202484 01.400201 01.200832 01.298083 01.099742 01.001377 00.836174
Data Y:
00.521505 00.424828 00.425031 00.477194 00.828021 00.615619 00.366627 00.430888 00.281029 00.464625 00.269395 00.577905 00.566115 00.507758 00.750718 00.680840 00.766109 00.456147 00.497750 00.419327 00.609551 00.457337 00.570548 00.347900 00.387499 00.582429 00.239103 00.236745 00.262616 00.424093 00.365275 00.375076 00.409006 00.389168 00.240261 00.158950 00.439337 00.509468 00.374347 00.433983 00.413056 00.328893 00.518665 00.548650 00.546911 00.496349 00.530893 00.595776 00.557058 00.573133 00.500542 00.543127 00.559366 00.691169 00.440349 00.567666 00.596911 00.473554 00.592394 00.597556 00.633413 00.605712 00.704611 00.480526 00.702686 00.700902 00.603085 00.698092 00.597656 00.802342 00.601711 00.599313 00.602563 00.701663 00.499571 00.498092 00.497569 00.600183 00.333954 00.274437 00.320943 00.540667 00.405021 00.288596 00.327594 00.313261 00.257556 00.213839 00.186186 00.159271
Sample Range:
(leave blank to include all observations)
From:
To:
Chart options
Label y-axis:
Label x-axis:
R Code
n <- length(x) c <- array(NA,dim=c(401)) l <- array(NA,dim=c(401)) mx <- 0 mxli <- -999 for (i in 1:401) { l[i] <- (i-201)/100 if (l[i] != 0) { x1 <- (x^l[i] - 1) / l[i] } else { x1 <- log(x) } c[i] <- cor(x1,y) if (mx < abs(c[i])) { mx <- abs(c[i]) mxli <- l[i] } } c mx mxli if (mxli != 0) { x1 <- (x^mxli - 1) / mxli } else { x1 <- log(x) } r<-lm(y~x) se <- sqrt(var(r$residuals)) r1 <- lm(y~x1) se1 <- sqrt(var(r1$residuals)) bitmap(file='test1.png') plot(l,c,main='Box-Cox Linearity Plot',xlab='Lambda',ylab='correlation') grid() dev.off() bitmap(file='test2.png') plot(x,y,main='Linear Fit of Original Data',xlab='x',ylab='y') abline(r) grid() mtext(paste('Residual Standard Deviation = ',se)) dev.off() bitmap(file='test3.png') plot(x1,y,main='Linear Fit of Transformed Data',xlab='x',ylab='y') abline(r1) grid() mtext(paste('Residual Standard Deviation = ',se1)) dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Box-Cox Linearity Plot',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'# observations x',header=TRUE) a<-table.element(a,n) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'maximum correlation',header=TRUE) a<-table.element(a,mx) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'optimal lambda(x)',header=TRUE) a<-table.element(a,mxli) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Residual SD (orginial)',header=TRUE) a<-table.element(a,se) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Residual SD (transformed)',header=TRUE) a<-table.element(a,se1) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.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