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(1356.876334 + ,1267.205322 + ,1296.765977 + ,1088.768988 + ,974.9813884 + ,901.3596576 + ,697.4384802 + ,619.518781 + ,446.3076104 + ,279.7073872 + ,388.5496968 + ,290.3616669 + ,278.7900756 + ,433.3678289 + ,436.029714 + ,642.0796877 + ,800.8666721 + ,1005.060868 + ,986.1196671 + ,1320.620732 + ,1293.652614 + ,1315.564345 + ,1438.509653 + ,1311.68492 + ,1281.851742 + ,1229.184547 + ,1157.483378 + ,1049.930474 + ,720.8534348 + ,756.8141819 + ,587.8054359 + ,440.0632504 + ,476.8424862 + ,376.9041092 + ,408.9909215 + ,335.6074609 + ,510.7385144 + ,784.0262709 + ,868.9048671 + ,930.5891366 + ,1232.387738 + ,1433.973937 + ,1441.341759 + ,1560.894767 + ,1570.121112 + ,1539.736335 + ,1509.516021 + ,1264.261299 + ,1280.1511 + ,1104.198071 + ,867.0732077 + ,832.9038416 + ,551.1656185 + ,578.9382082 + ,548.7690841 + ,526.7505509 + ,543.7872669 + ,387.4285031 + ,583.0257696 + ,858.5103593 + ,835.2939603 + ,1234.576103 + ,1307.198241 + ,1550.368145 + ,1513.93417 + ,1607.433912 + ,1768.513076 + ,1778.655313 + ,1668.394241 + ,1383.577733 + ,1271.618447 + ,1140.579064 + ,998.7028247 + ,804.5968421 + ,743.1134557 + ,661.133487 + ,635.0605076 + ,334.5931783 + ,502.1494165 + ,450.8321675 + ,700.3681247 + ,799.3587889 + ,1068.293463 + ,1229.161035 + ,1369.983001 + ,1586.670588 + ,1649.664042 + ,1871.680788 + ,1816.035687 + ,1919.694672 + ,1817.473725 + ,1707.303794 + ,1606.456459 + ,1446.737592 + ,1005.045182 + ,913.67958 + ,694.7422417 + ,647.2193014 + ,603.2233095 + ,561.3616255 + ,477.9286605 + ,648.8516322 + ,676.4550378 + ,1016.256499 + ,1139.927185 + ,1269.321991 + ,1546.025319 + ,1753.304467 + ,1958.22963 + ,2094.065774 + ,1977.440699 + ,2027.739055 + ,1842.633768 + ,1852.639287 + ,1706.985147 + ,1471.71997 + ,1159.935346 + ,888.3265125 + ,747.4889418 + ,573.6363 + ,696.6030203 + ,736.0360216 + ,625.9859074 + ,668.0129992 + ,878.1341576 + ,925.7355157 + ,1384.068603 + ,1504.264376 + ,1677.525248 + ,1935.129054 + ,1995.385689 + ,2158.635275 + ,2278.786793 + ,2004.468115 + ,2055.40499 + ,1967.431468 + ,1770.334016 + ,1699.341376 + ,1476.810831 + ,970.7915825 + ,997.474492 + ,652.0843291 + ,708.677725 + ,656.5517255 + ,770.8461221 + ,901.3881145 + ,832.0016083 + ,1028.128263 + ,1296.071512 + ,1785.233557 + ,1804.294853 + ,2165.319782 + ,2274.425758 + ,2444.192672 + ,2254.896853 + ,2475.21364 + ,2096.602738 + ,2180.683121 + ,2069.506046 + ,1776.663609 + ,1612.449679 + ,1322.927331 + ,914.8881288 + ,749.3597793 + ,985.6467572 + ,880.7232311 + ,819.4581121 + ,760.5542696 + ,985.0475722 + ,1295.758114 + ,1683.545809 + ,1787.214405 + ,1972.790239 + ,2134.412385 + ,2263.189757 + ,2432.266646 + ,2369.774565 + ,2360.715385 + ,2432.992026 + ,2437.706015 + ,1921.308588 + ,1960.743986 + ,1481.140265 + ,1436.91711 + ,1299.84893 + ,985.736701 + ,805.8439046 + ,736.9963963 + ,898.3310247 + ,1065.843227 + ,1113.559476 + ,1211.918524 + ,1462.155718 + ,1801.38398 + ,2045.731198 + ,2405.387519 + ,2376.281401 + ,2542.194732 + ,2535.172687 + ,2518.76254 + ,2467.712934 + ,2483.547793 + ,2111.5245 + ,1987.469819 + ,1900.284914 + ,1545.174509 + ,1241.063215 + ,1244.17204 + ,1001.510714 + ,1004.787213 + ,1064.602774 + ,1250.752996 + ,1244.505238 + ,1565.513983 + ,1904.45973 + ,2200.393469 + ,2489.302736 + ,2382.022655 + ,2740.656964 + ,2692.201467 + ,2707.985974 + ,2793.734301 + ,2909.368555 + ,2611.616903 + ,2367.927913 + ,2036.392713 + ,1794.090508 + ,1658.074271 + ,1450.206111 + ,1159.117531 + ,1144.297116 + ,1188.107289 + ,1082.864685 + ,1152.30001 + ,1370.470201 + ,1560.414285 + ,1878.82661 + ,2213.171169 + ,2306.794427 + ,2878.274067 + ,3043.563683 + ,3163.511145 + ,3218.690493 + ,3177.601319 + ,2941.518453 + ,2922.823356 + ,2325.88093 + ,2414.009426 + ,1874.014382 + ,1866.949762 + ,1330.453111 + ,1413.735476 + ,988.2221384 + ,1046.533458 + ,1398.652585 + ,1444.958119 + ,1637.387943 + ,1926.364707 + ,2088.421239 + ,2250.892557 + ,2803.393628 + ,2920.006864 + ,3028.392467 + ,3284.085805 + ,3116.539112 + ,3120.244711 + ,2946.135624 + ,2740.67997 + ,2810.140837 + ,2233.823039 + ,2114.011418 + ,2076.542437 + ,1571.481405 + ,1567.958655 + ,1217.444043 + ,1136.643661 + ,1481.287919 + ,1528.477337 + ,1797.720002 + ,1819.469046 + ,2395.358987 + ,2707.314708 + ,2921.060577 + ,3246.433366 + ,3051.477548 + ,3444.481052 + ,3432.580153 + ,3421.04804 + ,3381.830601 + ,3169.679136 + ,2872.11508 + ,2601.76563 + ,2143.011809 + ,2159.598897 + ,1645.12941 + ,1622.54215 + ,1350.064447 + ,1372.486802 + ,1475.078831 + ,1356.08523 + ,1974.230192 + ,1835.493872 + ,2495.225532 + ,2813.660064 + ,3199.803837 + ,3128.428211 + ,3614.588977 + ,3741.816099 + ,3711.62971 + ,3501.116488 + ,3620.888016 + ,3348.935195) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 312 > (np <- floor(n / par1)) [1] 26 > 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] [1,] 1356.8763 278.7901 1281.8517 510.7385 1280.1511 835.294 998.7028 [2,] 1267.2053 433.3678 1229.1845 784.0263 1104.1981 1234.576 804.5968 [3,] 1296.7660 436.0297 1157.4834 868.9049 867.0732 1307.198 743.1135 [4,] 1088.7690 642.0797 1049.9305 930.5891 832.9038 1550.368 661.1335 [5,] 974.9814 800.8667 720.8534 1232.3877 551.1656 1513.934 635.0605 [6,] 901.3597 1005.0609 756.8142 1433.9739 578.9382 1607.434 334.5932 [7,] 697.4385 986.1197 587.8054 1441.3418 548.7691 1768.513 502.1494 [8,] 619.5188 1320.6207 440.0633 1560.8948 526.7506 1778.655 450.8322 [9,] 446.3076 1293.6526 476.8425 1570.1211 543.7873 1668.394 700.3681 [10,] 279.7074 1315.5643 376.9041 1539.7363 387.4285 1383.578 799.3588 [11,] 388.5497 1438.5097 408.9909 1509.5160 583.0258 1271.618 1068.2935 [12,] 290.3617 1311.6849 335.6075 1264.2613 858.5104 1140.579 1229.1610 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1369.9830 694.7422 1958.2296 696.6030 2278.7868 770.8461 2096.6027 [2,] 1586.6706 647.2193 2094.0658 736.0360 2004.4681 901.3881 2180.6831 [3,] 1649.6640 603.2233 1977.4407 625.9859 2055.4050 832.0016 2069.5060 [4,] 1871.6808 561.3616 2027.7391 668.0130 1967.4315 1028.1283 1776.6636 [5,] 1816.0357 477.9287 1842.6338 878.1342 1770.3340 1296.0715 1612.4497 [6,] 1919.6947 648.8516 1852.6393 925.7355 1699.3414 1785.2336 1322.9273 [7,] 1817.4737 676.4550 1706.9851 1384.0686 1476.8108 1804.2949 914.8881 [8,] 1707.3038 1016.2565 1471.7200 1504.2644 970.7916 2165.3198 749.3598 [9,] 1606.4565 1139.9272 1159.9353 1677.5252 997.4745 2274.4258 985.6468 [10,] 1446.7376 1269.3220 888.3265 1935.1291 652.0843 2444.1927 880.7232 [11,] 1005.0452 1546.0253 747.4889 1995.3857 708.6777 2254.8969 819.4581 [12,] 913.6796 1753.3045 573.6363 2158.6353 656.5517 2475.2136 760.5543 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 985.0476 1921.3086 1462.156 1900.285 2489.303 1450.206 3043.564 [2,] 1295.7581 1960.7440 1801.384 1545.175 2382.023 1159.118 3163.511 [3,] 1683.5458 1481.1403 2045.731 1241.063 2740.657 1144.297 3218.690 [4,] 1787.2144 1436.9171 2405.388 1244.172 2692.201 1188.107 3177.601 [5,] 1972.7902 1299.8489 2376.281 1001.511 2707.986 1082.865 2941.518 [6,] 2134.4124 985.7367 2542.195 1004.787 2793.734 1152.300 2922.823 [7,] 2263.1898 805.8439 2535.173 1064.603 2909.369 1370.470 2325.881 [8,] 2432.2666 736.9964 2518.763 1250.753 2611.617 1560.414 2414.009 [9,] 2369.7746 898.3310 2467.713 1244.505 2367.928 1878.827 1874.014 [10,] 2360.7154 1065.8432 2483.548 1565.514 2036.393 2213.171 1866.950 [11,] 2432.9920 1113.5595 2111.524 1904.460 1794.091 2306.794 1330.453 [12,] 2437.7060 1211.9185 1987.470 2200.393 1658.074 2878.274 1413.735 [,22] [,23] [,24] [,25] [,26] [1,] 988.2221 3116.539 1481.288 3381.831 1974.230 [2,] 1046.5335 3120.245 1528.477 3169.679 1835.494 [3,] 1398.6526 2946.136 1797.720 2872.115 2495.226 [4,] 1444.9581 2740.680 1819.469 2601.766 2813.660 [5,] 1637.3879 2810.141 2395.359 2143.012 3199.804 [6,] 1926.3647 2233.823 2707.315 2159.599 3128.428 [7,] 2088.4212 2114.011 2921.061 1645.129 3614.589 [8,] 2250.8926 2076.542 3246.433 1622.542 3741.816 [9,] 2803.3936 1571.481 3051.478 1350.064 3711.630 [10,] 2920.0069 1567.959 3444.481 1372.487 3501.116 [11,] 3028.3925 1217.444 3432.580 1475.079 3620.888 [12,] 3284.0858 1136.644 3421.048 1356.085 3348.935 > 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] 800.6534 938.5289 735.1943 1220.5410 721.8918 1421.6785 743.9469 [8] 1559.2021 919.5514 1525.0700 1265.4597 1436.5131 1669.3344 1347.4552 [15] 2012.9511 1243.1823 2228.1104 1430.6017 2431.9479 1615.4036 2474.3960 [22] 2068.1093 2220.9704 2603.8924 2095.7823 3082.1513 > arr.sd [1] 400.8356 411.2024 355.5971 359.5303 268.0541 280.1167 260.2184 325.5222 [9] 420.8587 544.5107 576.4386 606.1880 666.4106 567.9870 485.2685 399.3218 [17] 347.3273 393.8276 404.7915 580.0212 704.2309 795.0308 727.2224 769.3573 [25] 745.3437 665.1063 > arr.range [1] 1077.1689 1159.7196 946.2443 1059.3826 892.7226 943.3614 894.5679 [8] 1006.0151 1275.3758 1520.4295 1532.6494 1626.7025 1704.3675 1431.3233 [15] 1452.6584 1223.7476 1080.0390 1198.8828 1251.2943 1795.4094 1888.2374 [22] 2295.8637 1983.6010 1963.1931 2031.7662 1906.3222 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 233.3779 0.1672 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 2.2605 0.5346 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 725.2490 0.4373 > postscript(file="/var/wessaorg/rcomp/tmp/1wiv71386181365.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/wessaorg/rcomp/tmp/2p5b51386181365.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/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,'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/wessaorg/rcomp/tmp/38xkx1386181365.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/wessaorg/rcomp/tmp/4p9731386181365.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/wessaorg/rcomp/tmp/555ng1386181365.tab") > > try(system("convert tmp/1wiv71386181365.ps tmp/1wiv71386181365.png",intern=TRUE)) character(0) > try(system("convert tmp/2p5b51386181365.ps tmp/2p5b51386181365.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.585 0.710 3.262