R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-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(8.9634 + ,8.9522 + ,8.8682 + ,8.7331 + ,8.3188 + ,8.3462 + ,8.3087 + ,8.3836 + ,8.8412 + ,9.5001 + ,10.1883 + ,10.2931 + ,10.1945 + ,10.3014 + ,10.0675 + ,9.6715 + ,9.5019 + ,9.4597 + ,9.4362 + ,9.5919 + ,10.0167 + ,10.322 + ,11.166 + ,11.5454 + ,11.3712 + ,11.0723 + ,10.813 + ,10.3016 + ,10.4227 + ,10.3162 + ,10.4519 + ,10.8567 + ,11.2716 + ,11.4341 + ,12.1273 + ,11.9814 + ,11.8352 + ,11.9847 + ,11.545 + ,11.5285 + ,11.5539 + ,11.622 + ,11.6578 + ,11.6767 + ,11.8752 + ,13.2643 + ,14.2297 + ,14.308 + ,13.7915 + ,13.7633 + ,13.9775 + ,13.6478 + ,13.2247 + ,13.0971 + ,13.1039 + ,13.206 + ,13.7901 + ,14.6457 + ,15.5764 + ,15.6102 + ,15.8855 + ,16.0137 + ,15.6186 + ,15.384 + ,15.2751 + ,15.0912 + ,14.9222 + ,15.6231 + ,16.6737 + ,17.6805 + ,19.1919 + ,19.1711 + ,18.5658 + ,18.1285 + ,16.791 + ,16.9468 + ,17.3164 + ,17.1816 + ,16.7627 + ,17.239 + ,17.8838 + ,18.9038 + ,20.0274 + ,20.0087 + ,19.6366 + ,19.8163 + ,18.8602 + ,17.9206 + ,17.6889 + ,17.84 + ,17.678 + ,17.7258 + ,18.5865 + ,19.9804 + ,21.1584 + ,21.2921 + ,20.9445 + ,20.5731 + ,19.3274 + ,17.7866 + ,17.7483 + ,17.5648 + ,17.4763 + ,17.7264 + ,18.5736 + ,19.9236 + ,21.3286 + ,20.7249 + ,20.3334 + ,19.7658 + ,18.7569 + ,17.6963 + ,17.7978 + ,18.1771 + ,18.3738 + ,18.1996 + ,18.8443 + ,20.1001 + ,21.2458 + ,20.8381 + ,20.1967 + ,19.8159 + ,18.5784 + ,19.21 + ,19.3419 + ,19.12 + ,19.1563 + ,18.9783 + ,20.2913 + ,22.5439 + ,23.2821 + ,22.6191 + ,22.1599 + ,21.2766 + ,19.0846 + ,18.9096 + ,18.8095 + ,20.1164 + ,20.7762 + ,20.9044 + ,22.0026 + ,23.6401 + ,25.04 + ,24.7185 + ,24.1752 + ,24.1382 + ,22.3949 + ,21.3743 + ,21.4911 + ,21.2187 + ,21.2137 + ,21.6735 + ,22.5096 + ,24.3097 + ,25.7989 + ,25.4376 + ,23.878 + ,23.6966 + ,23.3544 + ,21.1993 + ,22.0431 + ,22.0203 + ,21.886 + ,21.9771 + ,23.0759 + ,24.9859 + ,26.2614 + ,26.1127 + ,25.6296 + ,25.2926 + ,22.8146 + ,22.2974 + ,22.8868 + ,22.4612 + ,22.3165 + ,22.7319 + ,23.2692 + ,24.9432 + ,27.8272 + ,27.4059 + ,26.6232 + ,26.8779 + ,25.105 + ,23.601 + ,23.5374 + ,23.5248 + ,22.9465 + ,23.6633 + ,25.5932 + ,27.7683 + ,29.4691 + ,28.3472 + ,28.3879 + ,27.9696 + ,26.0075 + ,24.2533 + ,24.4999 + ,23.8988 + ,23.6683 + ,23.9427 + ,26.0155 + ,28.9529 + ,30.302 + ,29.874 + ,28.2257 + ,28.0811 + ,26.3398 + ,25.4847 + ,25.4823 + ,24.9697 + ,25.2282 + ,25.9257 + ,28.7818 + ,27.9552 + ,33.3475 + ,32.7834 + ,31.6586 + ,31.6613 + ,29.1839 + ,28.8825 + ,27.6334 + ,27.7511 + ,27.3792 + ,27.7748 + ,31.4329 + ,33.2735 + ,35.0962 + ,34.9537 + ,31.8307 + ,30.9984 + ,28.629 + ,26.4379 + ,25.4408 + ,24.6681 + ,24.0994 + ,24.6043 + ,27.2492 + ,29.5511 + ,29.8522 + ,31.6989 + ,29.6357 + ,30.5197 + ,32.7823 + ,24.9942 + ,23.5187 + ,24.0249 + ,24.5692 + ,24.402 + ,26.7089 + ,31.6874 + ,32.8801 + ,32.7906 + ,30.8785 + ,30.3024 + ,28.3679 + ,25.6578 + ,25.1598 + ,24.6143 + ,24.528 + ,25.2905 + ,30.0016 + ,34.2728 + ,34.4408 + ,34.1907 + ,33.6636 + ,33.9073 + ,30.2175 + ,28.5274 + ,25.9505 + ,26.2398 + ,26.2819 + ,26.7362 + ,28.8395 + ,31.0951 + ,33.7015 + ,33.8091 + ,32.1126 + ,32 + ,29.122 + ,26.8124 + ,25.4654 + ,23.8331 + ,24.714 + ,28.3288 + ,29.6391 + ,32.4542 + ,33.5657 + ,33.1856 + ,33.297 + ,33.51 + ,31.3789 + ,29.4555 + ,27.2699 + ,27.2586 + ,27.8591 + ,29.6362 + ,30.9587 + ,31.8633 + ,33.8188 + ,33.7531 + ,33.6103 + ,32.9052 + ,29.5005 + ,27.3634 + ,27.2298 + ,26.5211 + ,26.5228 + ,27.2991 + ,29.1726 + ,30.297 + ,32.5287 + ,32.487 + ,32.4197 + ,30.854 + ,28.6995 + ,27.7881 + ,26.5609 + ,25.9431 + ,25.5578 + ,27.1275 + ,30.2556 + ,34.0976 + ,34.5614 + ,34.2948 + ,33.3418 + ,31.8187 + ,29.0818 + ,27.3444 + ,26.6233 + ,26.1869 + ,26.2953 + ,28.7043 + ,32.0653 + ,34.5401 + ,34.6636 + ,34.2557 + ,32.0526 + ,30.6892 + ,28.012 + ,26.1528 + ,23.2276 + ,24.244 + ,24.8141 + ,27.8632 + ,29.6233 + ,32.4245 + ,33.3417 + ,33.0442 + ,32.0526 + ,30.2182 + ,28.9292 + ,26.8221 + ,26.1032 + ,25.9792 + ,27.1443 + ,29.4993 + ,31.656 + ,33.3665 + ,35.0521 + ,34.4076 + ,33.069 + ,31.5816 + ,30.0695 + ,29.0035 + ,28.6813 + ,28.359 + ,30.0447 + ,31.5073 + ,34.16 + ,35.57 + ,36.42 + ,35.12 + ,33.14 + ,30.29 + ,28.2 + ,26.5 + ,25.47 + ,24.96 + ,25.6 + ,27.76 + ,30.13 + ,32.35 + ,32.8 + ,32.54 + ,29.78 + ,28.79 + ,26.8 + ,25.41 + ,24.34 + ,24.39 + ,25 + ,26.27 + ,27.88 + ,29.35 + ,29.83 + ,29.46) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 396 > (np <- floor(n / par1)) [1] 33 > arr <- array(NA,dim=c(par1,np)) > j <- 0 > k <- 1 > for (i in 1:(np*par1)) + { + j = j + 1 + arr[j,k] <- x[i] + if (j == par1) { + j = 0 + k=k+1 + } + } > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 8.9634 10.1945 11.3712 11.8352 13.7915 15.8855 18.5658 19.6366 20.9445 [2,] 8.9522 10.3014 11.0723 11.9847 13.7633 16.0137 18.1285 19.8163 20.5731 [3,] 8.8682 10.0675 10.8130 11.5450 13.9775 15.6186 16.7910 18.8602 19.3274 [4,] 8.7331 9.6715 10.3016 11.5285 13.6478 15.3840 16.9468 17.9206 17.7866 [5,] 8.3188 9.5019 10.4227 11.5539 13.2247 15.2751 17.3164 17.6889 17.7483 [6,] 8.3462 9.4597 10.3162 11.6220 13.0971 15.0912 17.1816 17.8400 17.5648 [7,] 8.3087 9.4362 10.4519 11.6578 13.1039 14.9222 16.7627 17.6780 17.4763 [8,] 8.3836 9.5919 10.8567 11.6767 13.2060 15.6231 17.2390 17.7258 17.7264 [9,] 8.8412 10.0167 11.2716 11.8752 13.7901 16.6737 17.8838 18.5865 18.5736 [10,] 9.5001 10.3220 11.4341 13.2643 14.6457 17.6805 18.9038 19.9804 19.9236 [11,] 10.1883 11.1660 12.1273 14.2297 15.5764 19.1919 20.0274 21.1584 21.3286 [12,] 10.2931 11.5454 11.9814 14.3080 15.6102 19.1711 20.0087 21.2921 20.7249 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 20.3334 20.1967 22.1599 24.1752 23.8780 25.6296 26.6232 28.3879 28.2257 [2,] 19.7658 19.8159 21.2766 24.1382 23.6966 25.2926 26.8779 27.9696 28.0811 [3,] 18.7569 18.5784 19.0846 22.3949 23.3544 22.8146 25.1050 26.0075 26.3398 [4,] 17.6963 19.2100 18.9096 21.3743 21.1993 22.2974 23.6010 24.2533 25.4847 [5,] 17.7978 19.3419 18.8095 21.4911 22.0431 22.8868 23.5374 24.4999 25.4823 [6,] 18.1771 19.1200 20.1164 21.2187 22.0203 22.4612 23.5248 23.8988 24.9697 [7,] 18.3738 19.1563 20.7762 21.2137 21.8860 22.3165 22.9465 23.6683 25.2282 [8,] 18.1996 18.9783 20.9044 21.6735 21.9771 22.7319 23.6633 23.9427 25.9257 [9,] 18.8443 20.2913 22.0026 22.5096 23.0759 23.2692 25.5932 26.0155 28.7818 [10,] 20.1001 22.5439 23.6401 24.3097 24.9859 24.9432 27.7683 28.9529 27.9552 [11,] 21.2458 23.2821 25.0400 25.7989 26.2614 27.8272 29.4691 30.3020 33.3475 [12,] 20.8381 22.6191 24.7185 25.4376 26.1127 27.4059 28.3472 29.8740 32.7834 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 31.6586 31.8307 29.6357 30.8785 33.6636 32.1126 33.2970 33.6103 32.4197 [2,] 31.6613 30.9984 30.5197 30.3024 33.9073 32.0000 33.5100 32.9052 30.8540 [3,] 29.1839 28.6290 32.7823 28.3679 30.2175 29.1220 31.3789 29.5005 28.6995 [4,] 28.8825 26.4379 24.9942 25.6578 28.5274 26.8124 29.4555 27.3634 27.7881 [5,] 27.6334 25.4408 23.5187 25.1598 25.9505 25.4654 27.2699 27.2298 26.5609 [6,] 27.7511 24.6681 24.0249 24.6143 26.2398 23.8331 27.2586 26.5211 25.9431 [7,] 27.3792 24.0994 24.5692 24.5280 26.2819 24.7140 27.8591 26.5228 25.5578 [8,] 27.7748 24.6043 24.4020 25.2905 26.7362 28.3288 29.6362 27.2991 27.1275 [9,] 31.4329 27.2492 26.7089 30.0016 28.8395 29.6391 30.9587 29.1726 30.2556 [10,] 33.2735 29.5511 31.6874 34.2728 31.0951 32.4542 31.8633 30.2970 34.0976 [11,] 35.0962 29.8522 32.8801 34.4408 33.7015 33.5657 33.8188 32.5287 34.5614 [12,] 34.9537 31.6989 32.7906 34.1907 33.8091 33.1856 33.7531 32.4870 34.2948 [,28] [,29] [,30] [,31] [,32] [,33] [1,] 33.3418 32.0526 32.0526 33.0690 33.14 29.78 [2,] 31.8187 30.6892 30.2182 31.5816 30.29 28.79 [3,] 29.0818 28.0120 28.9292 30.0695 28.20 26.80 [4,] 27.3444 26.1528 26.8221 29.0035 26.50 25.41 [5,] 26.6233 23.2276 26.1032 28.6813 25.47 24.34 [6,] 26.1869 24.2440 25.9792 28.3590 24.96 24.39 [7,] 26.2953 24.8141 27.1443 30.0447 25.60 25.00 [8,] 28.7043 27.8632 29.4993 31.5073 27.76 26.27 [9,] 32.0653 29.6233 31.6560 34.1600 30.13 27.88 [10,] 34.5401 32.4245 33.3665 35.5700 32.35 29.35 [11,] 34.6636 33.3417 35.0521 36.4200 32.80 29.83 [12,] 34.2557 33.0442 34.4076 35.1200 32.54 29.46 > arr.mean <- array(NA,dim=np) > arr.sd <- array(NA,dim=np) > arr.range <- array(NA,dim=np) > for (j in 1:np) + { + arr.mean[j] <- mean(arr[,j],na.rm=TRUE) + arr.sd[j] <- sd(arr[,j],na.rm=TRUE) + arr.range[j] <- max(arr[,j],na.rm=TRUE) - min(arr[,j],na.rm=TRUE) + } > arr.mean [1] 8.974742 10.106225 11.035000 12.256750 13.952850 16.377550 17.979625 [8] 19.015317 19.141508 19.177417 20.261158 21.453200 22.977950 23.374225 [15] 24.156342 25.588075 26.481033 27.717092 30.556758 27.921667 28.209475 [22] 28.975425 29.914117 29.269408 30.838258 29.619792 29.846667 30.410100 [29] 28.790767 30.102525 31.965492 29.145000 27.275000 > arr.sd [1] 0.6871145 0.6729825 0.6229705 1.0506125 0.8834792 1.5077029 1.1726146 [8] 1.3393985 1.4953790 1.2268705 1.6251022 2.1481105 1.7005781 1.6890477 [15] 2.0013131 2.2051704 2.4940890 2.8248425 2.8518542 2.8747406 3.8498125 [22] 3.9298344 3.2555807 3.4553405 2.5172232 2.6876103 3.3745506 3.3903072 [29] 3.6030913 3.2215781 2.8448881 3.1158320 2.1610414 > arr.range [1] 1.9844 2.1092 1.8257 2.7795 2.5131 4.2697 3.2647 3.6141 3.8523 [10] 3.5495 4.7037 6.2305 4.5852 5.0621 5.5298 6.5226 6.6337 8.3778 [19] 7.7170 7.7313 9.3614 9.9128 7.9568 9.7326 6.5602 7.0892 9.0036 [28] 8.4767 10.1141 9.0729 8.0610 8.1800 5.4900 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -0.8669 0.1317 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -3.750 1.427 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -1.9555 0.3403 > postscript(file="/var/fisher/rcomp/tmp/19vjc1386211712.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.sd,main='Standard Deviation-Mean Plot',xlab='mean',ylab='standard deviation') > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/2r5nw1386211712.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.range,main='Range-Mean Plot',xlab='mean',ylab='range') > dev.off() null device 1 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Standard Deviation-Mean Plot',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Section',header=TRUE) > a<-table.element(a,'Mean',header=TRUE) > a<-table.element(a,'Standard Deviation',header=TRUE) > a<-table.element(a,'Range',header=TRUE) > a<-table.row.end(a) > for (j in 1:np) { + a<-table.row.start(a) + a<-table.element(a,j,header=TRUE) + a<-table.element(a,arr.mean[j]) + a<-table.element(a,arr.sd[j] ) + a<-table.element(a,arr.range[j] ) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/3m5bt1386211712.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: S.E.(k) = alpha + beta * Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/4ywij1386211712.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: ln S.E.(k) = alpha + beta * ln Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Lambda',header=TRUE) > a<-table.element(a,1-lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/560ld1386211713.tab") > > try(system("convert tmp/19vjc1386211712.ps tmp/19vjc1386211712.png",intern=TRUE)) character(0) > try(system("convert tmp/2r5nw1386211712.ps tmp/2r5nw1386211712.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.320 1.081 4.312