R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(100.00 + ,100.78 + ,101.24 + ,102.35 + ,102.41 + ,102.67 + ,102.54 + ,102.74 + ,103.07 + ,103.39 + ,103.72 + ,103.91 + ,104.37 + ,104.89 + ,105.61 + ,106.00 + ,106.13 + ,106.20 + ,106.26 + ,106.33 + ,106.98 + ,107.44 + ,107.50 + ,107.57 + ,107.63 + ,108.15 + ,108.35 + ,109.07 + ,109.39 + ,109.78 + ,109.98 + ,110.18 + ,110.31 + ,110.57 + ,110.63 + ,110.70 + ,110.76 + ,111.15 + ,111.48 + ,112.13 + ,112.13 + ,112.20 + ,112.20 + ,112.46 + ,112.85 + ,113.31 + ,113.37 + ,113.37 + ,113.44 + ,113.89 + ,114.16 + ,114.74 + ,114.81 + ,114.22 + ,114.55 + ,114.74 + ,115.26 + ,114.87 + ,114.87 + ,114.94 + ,115.00 + ,115.98 + ,116.44 + ,117.03 + ,117.09 + ,117.16 + ,117.22 + ,117.22 + ,117.29 + ,117.35 + ,117.55 + ,117.68 + ,117.68 + ,118.26 + ,118.66 + ,119.05 + ,119.18 + ,119.44 + ,119.77 + ,119.83 + ,119.90 + ,119.96 + ,120.09 + ,120.29 + ,120.35 + ,121.27 + ,121.72 + ,122.37 + ,122.50 + ,122.57 + ,122.64 + ,122.83 + ,122.90 + ,122.96 + ,122.96 + ,123.03 + ,123.03 + ,123.55 + ,123.94 + ,125.18 + ,125.57 + ,125.90 + ,126.22 + ,126.48 + ,126.68 + ,127.14 + ,127.14 + ,127.14 + ,127.14 + ,127.53 + ,127.85 + ,127.98 + ,127.98 + ,127.98 + ,127.98 + ,128.51 + ,128.96 + ,129.16 + ,129.29 + ,129.48 + ,129.55 + ,130.14 + ,130.46 + ,131.31 + ,131.90 + ,132.35 + ,132.75 + ,132.75 + ,133.07 + ,133.14 + ,133.27 + ,133.40 + ,133.59 + ,133.79 + ,134.18 + ,134.70 + ,134.96 + ,135.09 + ,135.55 + ,135.68 + ,136.01 + ,136.07 + ,136.33 + ,136.40 + ,136.79 + ,136.86 + ,136.92 + ,136.99 + ,137.51 + ,137.90 + ,138.10 + ,138.29 + ,138.42 + ,138.55 + ,138.88 + ,139.20 + ,139.40 + ,139.60 + ,139.79 + ,140.12 + ,140.25 + ,140.83 + ,141.16 + ,141.49 + ,141.68 + ,141.88 + ,142.14 + ,142.27 + ,142.60 + ,142.79 + ,143.05 + ,143.77 + ,144.10 + ,144.16 + ,144.68 + ,144.81 + ,144.94 + ,145.14 + ,145.40 + ,145.53 + ,145.73 + ,146.12 + ,146.84 + ,147.10 + ,147.36 + ,147.62 + ,147.75 + ,148.08 + ,148.27 + ,148.60 + ,148.79 + ,148.99 + ,149.05 + ,149.25 + ,149.38 + ,149.45 + ,149.58 + ,149.77 + ,149.97 + ,150.03 + ,150.16 + ,150.55 + ,150.68 + ,151.14 + ,151.27 + ,151.99 + ,153.36 + ,153.95 + ,154.53 + ,154.66 + ,154.92 + ,155.38 + ,155.84 + ,155.97 + ,156.56 + ,156.69 + ,156.88 + ,157.01 + ,157.27 + ,157.47 + ,157.99 + ,158.45 + ,158.64 + ,159.10) > x <- c(100.00 + ,98.04 + ,95.10 + ,92.16 + ,90.20 + ,89.22 + ,94.12 + ,100.00 + ,100.00 + ,98.04 + ,97.06 + ,97.06 + ,97.06 + ,95.10 + ,93.14 + ,92.16 + ,91.18 + ,91.18 + ,97.06 + ,102.94 + ,103.92 + ,103.92 + ,102.94 + ,103.92 + ,105.88 + ,105.88 + ,104.90 + ,103.92 + ,103.92 + ,105.88 + ,111.76 + ,119.61 + ,121.57 + ,121.57 + ,120.59 + ,121.57 + ,122.55 + ,122.55 + ,121.57 + ,120.59 + ,119.61 + ,118.63 + ,123.53 + ,129.41 + ,131.37 + ,129.41 + ,126.47 + ,125.49 + ,124.51 + ,123.53 + ,121.57 + ,118.63 + ,117.65 + ,116.67 + ,122.55 + ,129.41 + ,131.37 + ,130.39 + ,127.45 + ,126.47 + ,127.45 + ,126.47 + ,123.53 + ,121.57 + ,118.63 + ,116.67 + ,120.59 + ,127.45 + ,127.45 + ,123.53 + ,119.61 + ,118.63 + ,117.65 + ,115.69 + ,113.73 + ,111.76 + ,109.80 + ,109.80 + ,115.69 + ,122.55 + ,123.53 + ,121.57 + ,118.63 + ,117.65 + ,117.65 + ,116.67 + ,115.69 + ,112.75 + ,110.78 + ,109.80 + ,113.73 + ,119.61 + ,119.61 + ,114.71 + ,109.80 + ,107.84 + ,106.86 + ,105.88 + ,102.94 + ,100.00 + ,98.04 + ,97.06 + ,100.98 + ,104.90 + ,101.96 + ,99.02 + ,95.10 + ,92.16 + ,87.25 + ,82.35 + ,79.41 + ,81.37 + ,79.41 + ,78.43 + ,85.29 + ,90.20 + ,88.24 + ,87.25 + ,83.33 + ,79.41 + ,73.53 + ,69.61 + ,67.65 + ,69.61 + ,68.63 + ,65.69 + ,68.63 + ,71.57 + ,75.49 + ,82.35 + ,82.35 + ,86.27 + ,89.22 + ,88.24 + ,84.31 + ,77.45 + ,75.49 + ,76.47 + ,90.20 + ,92.16 + ,90.20 + ,85.29 + ,82.35 + ,84.31 + ,88.24 + ,89.22 + ,85.29 + ,80.39 + ,77.45 + ,77.45 + ,89.22 + ,92.16 + ,92.16 + ,89.22 + ,88.24 + ,91.18 + ,97.06 + ,96.08 + ,91.18 + ,81.37 + ,78.43 + ,83.33 + ,101.96 + ,108.82 + ,106.86 + ,98.04 + ,90.20 + ,90.20 + ,93.14 + ,94.12 + ,93.14 + ,89.22 + ,87.25 + ,88.24 + ,99.02 + ,100.98 + ,100.00 + ,94.12 + ,90.20 + ,91.18 + ,92.16 + ,92.16 + ,90.20 + ,88.24 + ,88.24 + ,88.24 + ,96.08 + ,98.04 + ,96.08 + ,91.18 + ,88.24 + ,88.24 + ,89.22 + ,89.22 + ,89.22 + ,90.20 + ,86.27 + ,81.37 + ,82.35 + ,79.41 + ,75.49 + ,77.45 + ,77.45 + ,78.43 + ,77.45 + ,74.51 + ,69.61 + ,66.67 + ,63.73 + ,67.65 + ,80.39 + ,85.29 + ,81.37 + ,77.45 + ,73.53 + ,76.47 + ,81.37 + ,82.35 + ,80.39 + ,75.49 + ,70.59 + ,71.57 + ,79.41 + ,83.33) > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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 [1] -0.6372379 -0.6374092 -0.6375798 -0.6377496 -0.6379186 -0.6380868 [7] -0.6382542 -0.6384207 -0.6385865 -0.6387515 -0.6389157 -0.6390791 [13] -0.6392417 -0.6394035 -0.6395644 -0.6397246 -0.6398840 -0.6400426 [19] -0.6402003 -0.6403573 -0.6405134 -0.6406687 -0.6408233 -0.6409770 [25] -0.6411299 -0.6412820 -0.6414332 -0.6415837 -0.6417334 -0.6418822 [31] -0.6420302 -0.6421775 -0.6423239 -0.6424694 -0.6426142 -0.6427582 [37] -0.6429013 -0.6430436 -0.6431851 -0.6433258 -0.6434657 -0.6436047 [43] -0.6437430 -0.6438804 -0.6440170 -0.6441527 -0.6442877 -0.6444218 [49] -0.6445551 -0.6446876 -0.6448193 -0.6449501 -0.6450801 -0.6452093 [55] -0.6453377 -0.6454652 -0.6455919 -0.6457178 -0.6458429 -0.6459672 [61] -0.6460906 -0.6462132 -0.6463350 -0.6464559 -0.6465761 -0.6466954 [67] -0.6468138 -0.6469315 -0.6470483 -0.6471643 -0.6472795 -0.6473938 [73] -0.6475073 -0.6476200 -0.6477319 -0.6478429 -0.6479531 -0.6480625 [79] -0.6481711 -0.6482788 -0.6483857 -0.6484918 -0.6485970 -0.6487015 [85] -0.6488051 -0.6489078 -0.6490098 -0.6491109 -0.6492112 -0.6493106 [91] -0.6494093 -0.6495071 -0.6496041 -0.6497002 -0.6497955 -0.6498900 [97] -0.6499837 -0.6500766 -0.6501686 -0.6502598 -0.6503502 -0.6504397 [103] -0.6505285 -0.6506164 -0.6507034 -0.6507897 -0.6508751 -0.6509597 [109] -0.6510435 -0.6511265 -0.6512086 -0.6512899 -0.6513704 -0.6514501 [115] -0.6515290 -0.6516070 -0.6516842 -0.6517606 -0.6518362 -0.6519109 [121] -0.6519848 -0.6520579 -0.6521302 -0.6522017 -0.6522724 -0.6523422 [127] -0.6524112 -0.6524794 -0.6525468 -0.6526134 -0.6526791 -0.6527441 [133] -0.6528082 -0.6528715 -0.6529340 -0.6529957 -0.6530566 -0.6531167 [139] -0.6531759 -0.6532344 -0.6532920 -0.6533488 -0.6534049 -0.6534601 [145] -0.6535145 -0.6535681 -0.6536209 -0.6536728 -0.6537240 -0.6537744 [151] -0.6538240 -0.6538727 -0.6539207 -0.6539679 -0.6540142 -0.6540598 [157] -0.6541045 -0.6541485 -0.6541917 -0.6542340 -0.6542756 -0.6543164 [163] -0.6543564 -0.6543956 -0.6544340 -0.6544716 -0.6545084 -0.6545444 [169] -0.6545796 -0.6546140 -0.6546477 -0.6546805 -0.6547126 -0.6547439 [175] -0.6547744 -0.6548041 -0.6548331 -0.6548612 -0.6548886 -0.6549152 [181] -0.6549410 -0.6549660 -0.6549902 -0.6550137 -0.6550364 -0.6550583 [187] -0.6550795 -0.6550998 -0.6551194 -0.6551383 -0.6551563 -0.6551736 [193] -0.6551901 -0.6552059 -0.6552208 -0.6552351 -0.6552485 -0.6552612 [199] -0.6552731 -0.6552843 -0.6552947 -0.6553043 -0.6553132 -0.6553213 [205] -0.6553287 -0.6553353 -0.6553412 -0.6553463 -0.6553506 -0.6553543 [211] -0.6553571 -0.6553592 -0.6553606 -0.6553612 -0.6553611 -0.6553602 [217] -0.6553586 -0.6553562 -0.6553531 -0.6553492 -0.6553447 -0.6553393 [223] -0.6553333 -0.6553265 -0.6553190 -0.6553107 -0.6553017 -0.6552920 [229] -0.6552816 -0.6552704 -0.6552585 -0.6552459 -0.6552326 -0.6552185 [235] -0.6552037 -0.6551882 -0.6551720 -0.6551550 -0.6551373 -0.6551190 [241] -0.6550999 -0.6550801 -0.6550596 -0.6550383 -0.6550164 -0.6549938 [247] -0.6549704 -0.6549464 -0.6549216 -0.6548962 -0.6548700 -0.6548432 [253] -0.6548156 -0.6547874 -0.6547585 -0.6547288 -0.6546985 -0.6546675 [259] -0.6546358 -0.6546034 -0.6545703 -0.6545365 -0.6545021 -0.6544670 [265] -0.6544311 -0.6543947 -0.6543575 -0.6543196 -0.6542811 -0.6542419 [271] -0.6542021 -0.6541615 -0.6541203 -0.6540784 -0.6540359 -0.6539927 [277] -0.6539488 -0.6539043 -0.6538591 -0.6538132 -0.6537667 -0.6537196 [283] -0.6536717 -0.6536233 -0.6535741 -0.6535244 -0.6534739 -0.6534229 [289] -0.6533712 -0.6533188 -0.6532658 -0.6532121 -0.6531579 -0.6531029 [295] -0.6530474 -0.6529912 -0.6529343 -0.6528769 -0.6528188 -0.6527601 [301] -0.6527007 -0.6526407 -0.6525801 -0.6525189 -0.6524571 -0.6523946 [307] -0.6523315 -0.6522678 -0.6522035 -0.6521386 -0.6520731 -0.6520069 [313] -0.6519402 -0.6518728 -0.6518048 -0.6517363 -0.6516671 -0.6515973 [319] -0.6515269 -0.6514560 -0.6513844 -0.6513122 -0.6512395 -0.6511661 [325] -0.6510922 -0.6510177 -0.6509426 -0.6508669 -0.6507906 -0.6507137 [331] -0.6506363 -0.6505583 -0.6504797 -0.6504005 -0.6503207 -0.6502404 [337] -0.6501595 -0.6500781 -0.6499961 -0.6499135 -0.6498303 -0.6497466 [343] -0.6496623 -0.6495775 -0.6494921 -0.6494062 -0.6493197 -0.6492326 [349] -0.6491450 -0.6490569 -0.6489682 -0.6488789 -0.6487891 -0.6486988 [355] -0.6486079 -0.6485165 -0.6484246 -0.6483321 -0.6482391 -0.6481455 [361] -0.6480515 -0.6479568 -0.6478617 -0.6477660 -0.6476699 -0.6475731 [367] -0.6474759 -0.6473782 -0.6472799 -0.6471811 -0.6470818 -0.6469820 [373] -0.6468817 -0.6467809 -0.6466795 -0.6465777 -0.6464753 -0.6463725 [379] -0.6462691 -0.6461653 -0.6460609 -0.6459561 -0.6458507 -0.6457449 [385] -0.6456386 -0.6455318 -0.6454245 -0.6453167 -0.6452084 -0.6450996 [391] -0.6449904 -0.6448807 -0.6447705 -0.6446598 -0.6445487 -0.6444371 [397] -0.6443250 -0.6442124 -0.6440994 -0.6439859 -0.6438719 > mx [1] 0.6553612 > mxli [1] 0.13 > 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)) > postscript(file="/var/www/html/rcomp/tmp/1754i1260710108.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(l,c,main='Box-Cox Linearity Plot',xlab='Lambda',ylab='correlation') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2g13b1260710108.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,y,main='Linear Fit of Original Data',xlab='x',ylab='y') > abline(r) > grid() > mtext(paste('Residual Standard Deviation = ',se)) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3iyxd1260710108.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x1,y,main='Linear Fit of Transformed Data',xlab='x',ylab='y') > abline(r1) > grid() > mtext(paste('Residual Standard Deviation = ',se1)) > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/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="/var/www/html/rcomp/tmp/4tb0q1260710108.tab") > > try(system("convert tmp/1754i1260710108.ps tmp/1754i1260710108.png",intern=TRUE)) character(0) > try(system("convert tmp/2g13b1260710108.ps tmp/2g13b1260710108.png",intern=TRUE)) character(0) > try(system("convert tmp/3iyxd1260710108.ps tmp/3iyxd1260710108.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.823 0.524 0.959