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(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) > x <- c(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) > #'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.5660052 0.5666690 0.5673328 0.5679965 0.5686601 0.5693236 0.5699870 [8] 0.5706503 0.5713135 0.5719765 0.5726393 0.5733020 0.5739645 0.5746268 [15] 0.5752888 0.5759507 0.5766123 0.5772737 0.5779347 0.5785956 0.5792561 [22] 0.5799163 0.5805762 0.5812357 0.5818949 0.5825537 0.5832122 0.5838703 [29] 0.5845279 0.5851852 0.5858420 0.5864983 0.5871542 0.5878097 0.5884646 [36] 0.5891190 0.5897729 0.5904263 0.5910791 0.5917314 0.5923830 0.5930341 [43] 0.5936846 0.5943345 0.5949837 0.5956322 0.5962802 0.5969274 0.5975739 [50] 0.5982197 0.5988648 0.5995092 0.6001527 0.6007956 0.6014376 0.6020788 [57] 0.6027193 0.6033589 0.6039976 0.6046355 0.6052725 0.6059086 0.6065439 [64] 0.6071782 0.6078115 0.6084439 0.6090754 0.6097058 0.6103353 0.6109638 [71] 0.6115912 0.6122176 0.6128429 0.6134672 0.6140903 0.6147124 0.6153333 [78] 0.6159532 0.6165718 0.6171893 0.6178057 0.6184208 0.6190348 0.6196475 [85] 0.6202589 0.6208691 0.6214781 0.6220858 0.6226921 0.6232972 0.6239009 [92] 0.6245033 0.6251043 0.6257040 0.6263022 0.6268991 0.6274945 0.6280886 [99] 0.6286811 0.6292722 0.6298619 0.6304500 0.6310366 0.6316218 0.6322053 [106] 0.6327874 0.6333678 0.6339467 0.6345240 0.6350997 0.6356738 0.6362462 [113] 0.6368170 0.6373862 0.6379536 0.6385194 0.6390834 0.6396458 0.6402064 [120] 0.6407652 0.6413223 0.6418777 0.6424312 0.6429830 0.6435329 0.6440810 [127] 0.6446272 0.6451717 0.6457142 0.6462548 0.6467936 0.6473305 0.6478654 [134] 0.6483984 0.6489295 0.6494586 0.6499857 0.6505109 0.6510340 0.6515552 [141] 0.6520743 0.6525914 0.6531065 0.6536195 0.6541304 0.6546393 0.6551460 [148] 0.6556507 0.6561532 0.6566536 0.6571519 0.6576480 0.6581420 0.6586338 [155] 0.6591234 0.6596108 0.6600961 0.6605791 0.6610598 0.6615384 0.6620147 [162] 0.6624887 0.6629605 0.6634300 0.6638972 0.6643621 0.6648247 0.6652849 [169] 0.6657429 0.6661985 0.6666518 0.6671027 0.6675512 0.6679974 0.6684412 [176] 0.6688826 0.6693216 0.6697582 0.6701923 0.6706241 0.6710534 0.6714802 [183] 0.6719047 0.6723266 0.6727461 0.6731631 0.6735776 0.6739897 0.6743992 [190] 0.6748062 0.6752108 0.6756128 0.6760122 0.6764092 0.6768036 0.6771954 [197] 0.6775847 0.6779715 0.6783556 0.6787372 0.6791163 0.6794927 0.6798665 [204] 0.6802378 0.6806064 0.6809725 0.6813359 0.6816967 0.6820549 0.6824104 [211] 0.6827634 0.6831136 0.6834613 0.6838063 0.6841486 0.6844883 0.6848253 [218] 0.6851597 0.6854914 0.6858204 0.6861468 0.6864704 0.6867914 0.6871097 [225] 0.6874253 0.6877382 0.6880484 0.6883559 0.6886608 0.6889629 0.6892623 [232] 0.6895590 0.6898530 0.6901442 0.6904328 0.6907186 0.6910017 0.6912821 [239] 0.6915598 0.6918347 0.6921069 0.6923764 0.6926432 0.6929072 0.6931685 [246] 0.6934271 0.6936829 0.6939360 0.6941863 0.6944340 0.6946789 0.6949210 [253] 0.6951604 0.6953971 0.6956311 0.6958623 0.6960907 0.6963165 0.6965395 [260] 0.6967598 0.6969773 0.6971921 0.6974042 0.6976135 0.6978202 0.6980240 [267] 0.6982252 0.6984236 0.6986193 0.6988123 0.6990026 0.6991902 0.6993750 [274] 0.6995571 0.6997365 0.6999132 0.7000872 0.7002585 0.7004270 0.7005929 [281] 0.7007561 0.7009165 0.7010743 0.7012294 0.7013818 0.7015315 0.7016786 [288] 0.7018229 0.7019646 0.7021036 0.7022400 0.7023736 0.7025046 0.7026330 [295] 0.7027587 0.7028817 0.7030022 0.7031199 0.7032350 0.7033475 0.7034574 [302] 0.7035646 0.7036692 0.7037712 0.7038706 0.7039674 0.7040616 0.7041531 [309] 0.7042421 0.7043285 0.7044123 0.7044936 0.7045722 0.7046483 0.7047218 [316] 0.7047928 0.7048612 0.7049271 0.7049904 0.7050512 0.7051094 0.7051651 [323] 0.7052183 0.7052690 0.7053172 0.7053629 0.7054061 0.7054468 0.7054850 [330] 0.7055207 0.7055539 0.7055847 0.7056130 0.7056389 0.7056623 0.7056833 [337] 0.7057018 0.7057180 0.7057316 0.7057429 0.7057518 0.7057582 0.7057623 [344] 0.7057640 0.7057633 0.7057602 0.7057547 0.7057469 0.7057367 0.7057242 [351] 0.7057093 0.7056921 0.7056725 0.7056507 0.7056265 0.7056000 0.7055712 [358] 0.7055402 0.7055068 0.7054712 0.7054333 0.7053931 0.7053506 0.7053060 [365] 0.7052590 0.7052099 0.7051585 0.7051049 0.7050490 0.7049910 0.7049308 [372] 0.7048684 0.7048037 0.7047370 0.7046680 0.7045969 0.7045237 0.7044483 [379] 0.7043707 0.7042910 0.7042092 0.7041253 0.7040393 0.7039512 0.7038610 [386] 0.7037687 0.7036743 0.7035779 0.7034794 0.7033789 0.7032763 0.7031716 [393] 0.7030650 0.7029563 0.7028456 0.7027329 0.7026182 0.7025015 0.7023829 [400] 0.7022622 0.7021396 > mx [1] 0.705764 > mxli [1] 1.43 > 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/15svi1293624348.ps",horizontal=F,onefile=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/25svi1293624348.ps",horizontal=F,onefile=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/3g2dl1293624348.ps",horizontal=F,onefile=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/4jkbq1293624348.tab") > try(system("convert tmp/15svi1293624348.ps tmp/15svi1293624348.png",intern=TRUE)) character(0) > try(system("convert tmp/25svi1293624348.ps tmp/25svi1293624348.png",intern=TRUE)) character(0) > try(system("convert tmp/3g2dl1293624348.ps tmp/3g2dl1293624348.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.817 0.566 4.500