R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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. > x <- c(159 + ,150 + ,128 + ,125 + ,122 + ,109 + ,109 + ,107 + ,107 + ,106 + ,106 + ,104 + ,103 + ,102 + ,100 + ,100 + ,99 + ,97 + ,95 + ,94 + ,93 + ,93 + ,90 + ,88 + ,88 + ,87 + ,87 + ,85 + ,85 + ,85 + ,85 + ,84 + ,84 + ,82 + ,82 + ,82 + ,82 + ,82 + ,81 + ,81 + ,80 + ,80 + ,80 + ,80 + ,80 + ,80 + ,80 + ,79 + ,79 + ,79 + ,79 + ,79 + ,79 + ,79 + ,78 + ,78 + ,78 + ,78 + ,78 + ,77 + ,77 + ,76 + ,76 + ,76 + ,75 + ,75 + ,75 + ,75 + ,74 + ,74 + ,74 + ,74 + ,74 + ,73 + ,73 + ,73 + ,73 + ,72 + ,72 + ,72 + ,71 + ,71 + ,71 + ,71 + ,70 + ,70 + ,70 + ,70 + ,70 + ,70 + ,70 + ,70 + ,70 + ,70 + ,69 + ,69 + ,69 + ,69 + ,69 + ,68 + ,68 + ,68 + ,68 + ,68 + ,67 + ,67 + ,66 + ,66 + ,66 + ,66 + ,66 + ,66 + ,66 + ,65 + ,65 + ,65 + ,65 + ,65 + ,65 + ,64 + ,64 + ,64 + ,64 + ,64 + ,64 + ,64 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,63 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,62 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,61 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,60 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,59 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,58 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,57 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,56 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,55 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,54 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,53 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,52 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,51 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,50 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,49 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,48 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,47 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,46 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,45 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,44 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,43 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,42 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,41 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,40 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,39 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,38 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,37 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,36 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,35 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,34 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,31 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,30 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,29 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,28 + ,27 + ,27 + ,27 + ,27 + ,27 + ,27 + ,27 + ,27 + ,27 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,26 + ,25 + ,25 + ,25 + ,25 + ,25 + ,25 + ,24 + ,24 + ,24 + ,24 + ,24 + ,24 + ,24 + ,24 + ,23 + ,23 + ,23 + ,23 + ,23 + ,22 + ,21 + ,21 + ,20 + ,20) > #'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(qnorm(ppoints(x), mean=0, sd=1),x1) + if (mx < c[i]) + { + mx <- c[i] + mxli <- l[i] + } + } > c [1] -0.9545053 -0.9550496 -0.9555912 -0.9561301 -0.9566663 -0.9571997 [7] -0.9577304 -0.9582583 -0.9587834 -0.9593058 -0.9598253 -0.9603420 [13] -0.9608559 -0.9613670 -0.9618752 -0.9623805 -0.9628830 -0.9633826 [19] -0.9638793 -0.9643731 -0.9648640 -0.9653519 -0.9658369 -0.9663190 [25] -0.9667980 -0.9672741 -0.9677473 -0.9682174 -0.9686845 -0.9691486 [31] -0.9696096 -0.9700676 -0.9705226 -0.9709744 -0.9714232 -0.9718689 [37] -0.9723115 -0.9727510 -0.9731874 -0.9736206 -0.9740506 -0.9744775 [43] -0.9749012 -0.9753218 -0.9757391 -0.9761532 -0.9765641 -0.9769717 [49] -0.9773761 -0.9777773 -0.9781752 -0.9785698 -0.9789610 -0.9793490 [55] -0.9797337 -0.9801150 -0.9804930 -0.9808676 -0.9812389 -0.9816068 [61] -0.9819713 -0.9823324 -0.9826900 -0.9830443 -0.9833950 -0.9837424 [67] -0.9840862 -0.9844266 -0.9847635 -0.9850969 -0.9854268 -0.9857531 [73] -0.9860760 -0.9863952 -0.9867109 -0.9870230 -0.9873315 -0.9876364 [79] -0.9879377 -0.9882354 -0.9885294 -0.9888197 -0.9891064 -0.9893895 [85] -0.9896688 -0.9899444 -0.9902163 -0.9904844 -0.9907488 -0.9910095 [91] -0.9912664 -0.9915195 -0.9917688 -0.9920143 -0.9922560 -0.9924938 [97] -0.9927278 -0.9929579 -0.9931841 -0.9934065 -0.9936249 -0.9938395 [103] -0.9940501 -0.9942567 -0.9944594 -0.9946582 -0.9948529 -0.9950437 [109] -0.9952304 -0.9954131 -0.9955918 -0.9957664 -0.9959370 -0.9961035 [115] -0.9962659 -0.9964242 -0.9965783 -0.9967284 -0.9968743 -0.9970160 [121] -0.9971535 -0.9972869 -0.9974160 -0.9975409 -0.9976616 -0.9977781 [127] -0.9978903 -0.9979982 -0.9981018 -0.9982012 -0.9982962 -0.9983868 [133] -0.9984732 -0.9985551 -0.9986327 -0.9987059 -0.9987747 -0.9988391 [139] -0.9988990 -0.9989545 -0.9990055 -0.9990521 -0.9990941 -0.9991317 [145] -0.9991647 -0.9991932 -0.9992171 -0.9992365 -0.9992512 -0.9992614 [151] -0.9992670 -0.9992679 -0.9992642 -0.9992559 -0.9992429 -0.9992251 [157] -0.9992027 -0.9991756 -0.9991437 -0.9991071 -0.9990657 -0.9990195 [163] -0.9989685 -0.9989127 -0.9988521 -0.9987867 -0.9987164 -0.9986412 [169] -0.9985611 -0.9984761 -0.9983862 -0.9982914 -0.9981916 -0.9980869 [175] -0.9979771 -0.9978624 -0.9977426 -0.9976179 -0.9974880 -0.9973531 [181] -0.9972132 -0.9970681 -0.9969179 -0.9967626 -0.9966022 -0.9964366 [187] -0.9962658 -0.9960898 -0.9959086 -0.9957222 -0.9955306 -0.9953337 [193] -0.9951315 -0.9949241 -0.9947113 -0.9944933 -0.9942698 -0.9940411 [199] -0.9938070 -0.9935675 -0.9933225 -0.9930722 -0.9928165 -0.9925553 [205] -0.9922886 -0.9920164 -0.9917388 -0.9914556 -0.9911670 -0.9908727 [211] -0.9905729 -0.9902676 -0.9899566 -0.9896401 -0.9893179 -0.9889901 [217] -0.9886566 -0.9883174 -0.9879726 -0.9876220 -0.9872658 -0.9869038 [223] -0.9865361 -0.9861625 -0.9857833 -0.9853982 -0.9850073 -0.9846106 [229] -0.9842080 -0.9837996 -0.9833853 -0.9829651 -0.9825390 -0.9821070 [235] -0.9816690 -0.9812251 -0.9807753 -0.9803195 -0.9798576 -0.9793898 [241] -0.9789159 -0.9784361 -0.9779501 -0.9774581 -0.9769600 -0.9764558 [247] -0.9759455 -0.9754291 -0.9749066 -0.9743779 -0.9738430 -0.9733020 [253] -0.9727548 -0.9722014 -0.9716417 -0.9710758 -0.9705037 -0.9699254 [259] -0.9693407 -0.9687498 -0.9681526 -0.9675491 -0.9669393 -0.9663231 [265] -0.9657006 -0.9650717 -0.9644365 -0.9637949 -0.9631470 -0.9624926 [271] -0.9618318 -0.9611646 -0.9604910 -0.9598110 -0.9591244 -0.9584315 [277] -0.9577320 -0.9570261 -0.9563137 -0.9555948 -0.9548694 -0.9541375 [283] -0.9533991 -0.9526541 -0.9519026 -0.9511446 -0.9503800 -0.9496088 [289] -0.9488311 -0.9480468 -0.9472560 -0.9464585 -0.9456544 -0.9448438 [295] -0.9440265 -0.9432027 -0.9423722 -0.9415351 -0.9406914 -0.9398411 [301] -0.9389841 -0.9381205 -0.9372503 -0.9363734 -0.9354899 -0.9345997 [307] -0.9337029 -0.9327995 -0.9318894 -0.9309726 -0.9300492 -0.9291192 [313] -0.9281825 -0.9272391 -0.9262891 -0.9253325 -0.9243692 -0.9233993 [319] -0.9224227 -0.9214395 -0.9204497 -0.9194532 -0.9184501 -0.9174403 [325] -0.9164240 -0.9154010 -0.9143715 -0.9133353 -0.9122925 -0.9112431 [331] -0.9101872 -0.9091247 -0.9080556 -0.9069799 -0.9058977 -0.9048090 [337] -0.9037137 -0.9026119 -0.9015036 -0.9003887 -0.8992674 -0.8981396 [343] -0.8970054 -0.8958647 -0.8947175 -0.8935639 -0.8924039 -0.8912376 [349] -0.8900648 -0.8888856 -0.8877001 -0.8865083 -0.8853101 -0.8841057 [355] -0.8828949 -0.8816779 -0.8804547 -0.8792252 -0.8779895 -0.8767476 [361] -0.8754995 -0.8742453 -0.8729850 -0.8717186 -0.8704460 -0.8691675 [367] -0.8678829 -0.8665923 -0.8652957 -0.8639931 -0.8626846 -0.8613702 [373] -0.8600499 -0.8587238 -0.8573918 -0.8560540 -0.8547105 -0.8533612 [379] -0.8520062 -0.8506456 -0.8492792 -0.8479073 -0.8465298 -0.8451467 [385] -0.8437581 -0.8423640 -0.8409644 -0.8395595 -0.8381491 -0.8367334 [391] -0.8353123 -0.8338860 -0.8324544 -0.8310177 -0.8295757 -0.8281287 [397] -0.8266765 -0.8252193 -0.8237570 -0.8222898 -0.8208176 > mx [1] 0 > mxli [1] -999 > if (mxli != 0) + { + x1 <- (x^mxli - 1) / mxli + } else { + x1 <- log(x) + } > postscript(file="/var/wessaorg/rcomp/tmp/16awt1342135566.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(l,c,main='Box-Cox Normality Plot',xlab='Lambda',ylab='correlation') > mtext(paste('Optimal Lambda =',mxli)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2348b1342135566.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(x,main='Histogram of Original Data',xlab='X',ylab='frequency') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3bxlm1342135566.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(x1,main='Histogram of Transformed Data',xlab='X',ylab='frequency') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4lj5o1342135566.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x) > qqline(x) > grid() > mtext('Original Data') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5p7cw1342135566.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x1) > qqline(x1) > grid() > mtext('Transformed Data') > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Box-Cox Normality 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',header=TRUE) > a<-table.element(a,mxli) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/6l3dg1342135567.tab") > > try(system("convert tmp/16awt1342135566.ps tmp/16awt1342135566.png",intern=TRUE)) character(0) > try(system("convert tmp/2348b1342135566.ps tmp/2348b1342135566.png",intern=TRUE)) character(0) > try(system("convert tmp/3bxlm1342135566.ps tmp/3bxlm1342135566.png",intern=TRUE)) character(0) > try(system("convert tmp/4lj5o1342135566.ps tmp/4lj5o1342135566.png",intern=TRUE)) character(0) > try(system("convert tmp/5p7cw1342135566.ps tmp/5p7cw1342135566.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.593 0.487 3.074