Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
13.92 13.22 13.31 12.91 13.19 12.92 13.43 13.72 13.97 14.91 14.46 14.12 14.23 15.04 14.80 14.49 15.14 14.34 15.12 15.14 14.34 14.36 14.91 15.56 16.50 15.57 15.14 15.19 15.07 14.48 14.27 14.72 14.65 14.38 13.95 14.85 14.87 14.83 15.03 15.47 16.21 16.55 17.04 17.22 17.47 17.75 17.84 18.47 18.38 18.55 18.39 18.88 20.21 19.67 20.09 18.78 19.74 20.64 20.34 21.75 22.10 22.81 22.91 22.46 21.78 25.05 23.70 23.02 24.34 24.15 25.85 26.42 26.54 26.36 26.99 27.52 26.63 26.26 24.86 26.84 26.57 24.67 27.24 27.77 27.61 27.27 28.46 26.97 29.95 29.88 29.67 31.19 30.24 30.03 31.02 30.45 31.70 32.10 32.32 32.18 33.43 33.07 35.32 35.17 35.29 37.89 38.32 37.07 39.77 39.20 40.46 44.95 41.69 41.88 45.86
Data Y:
13.92 13.22 13.31 12.91 13.19 12.92 13.43 13.72 13.97 14.91 14.46 14.12 14.23 15.04 14.80 14.49 15.14 14.34 15.12 15.14 14.34 14.36 14.91 15.56 16.50 15.57 15.14 15.19 15.07 14.48 14.27 14.72 14.65 14.38 13.95 14.85 14.87 14.83 15.03 15.47 16.21 16.55 17.04 17.22 17.47 17.75 17.84 18.47 18.38 18.55 18.39 18.88 20.21 19.67 20.09 18.78 19.74 20.64 20.34 21.75 22.10 22.81 22.91 22.46 21.78 25.05 23.70 23.02 24.34 24.15 25.85 26.42 26.54 26.36 26.99 27.52 26.63 26.26 24.86 26.84 26.57 24.67 27.24 27.77 27.61 27.27 28.46 26.97 29.95 29.88 29.67 31.19 30.24 30.03 31.02 30.45 31.70 32.10 32.32 32.18 33.43 33.07 35.32 35.17 35.29 37.89 38.32 37.07 39.77 39.20 40.46 44.95 41.69 41.88 45.86
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