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(1418 + ,869 + ,1530 + ,2172 + ,901 + ,463 + ,3201 + ,371 + ,1192 + ,1583 + ,1439 + ,1764 + ,1495 + ,1373 + ,2187 + ,1491 + ,4041 + ,1706 + ,2152 + ,1036 + ,1882 + ,1929 + ,2242 + ,1220 + ,1289 + ,2515 + ,2147 + ,2352 + ,1638 + ,1222 + ,1812 + ,1677 + ,1579 + ,1731 + ,807 + ,2452 + ,829 + ,1940 + ,2662 + ,186 + ,1499 + ,865 + ,1793 + ,2527 + ,2747 + ,1324 + ,2702 + ,1383 + ,1179 + ,2099 + ,4308 + ,918 + ,1831 + ,3373 + ,1713 + ,1438 + ,496 + ,2253 + ,744 + ,1161 + ,2352 + ,2144 + ,4691 + ,1112 + ,2694 + ,1973 + ,1769 + ,3148 + ,2474 + ,2084 + ,1954 + ,1226 + ,1389 + ,1496 + ,2269 + ,1833 + ,1268 + ,1943 + ,893 + ,1762 + ,1403 + ,1425 + ,1857 + ,1840 + ,1502 + ,1441 + ,1420 + ,1416 + ,2970 + ,1317 + ,1644 + ,870 + ,1654 + ,1054 + ,937 + ,3004 + ,2008 + ,2547 + ,1885 + ,1626 + ,1468 + ,2445 + ,1964 + ,1381 + ,1369 + ,1659 + ,2888 + ,1290 + ,2845 + ,1982 + ,1904 + ,1391 + ,602 + ,1743 + ,1559 + ,2014 + ,2143 + ,2146 + ,874 + ,1590 + ,1590 + ,1210 + ,2072 + ,1281 + ,1401 + ,834 + ,1105 + ,1272 + ,1944 + ,391 + ,761 + ,1605 + ,530 + ,1988 + ,1386 + ,2395 + ,387 + ,1742 + ,620 + ,449 + ,800 + ,1684 + ,1050 + ,2699 + ,1606 + ,1502 + ,1204 + ,1138 + ,568 + ,1459 + ,2158 + ,1111 + ,1421 + ,2833 + ,1955 + ,2922 + ,1002 + ,1060 + ,956 + ,2186 + ,3604 + ,1035 + ,1417 + ,3261 + ,1587 + ,1424 + ,1701 + ,1249 + ,946 + ,1926 + ,3352 + ,1641 + ,2035 + ,2312 + ,1369 + ,1577 + ,2201 + ,961 + ,1900 + ,1254 + ,1335 + ,1597 + ,207 + ,1645 + ,2429 + ,151 + ,474 + ,141 + ,1639 + ,872 + ,1318 + ,1018 + ,1383 + ,1314 + ,1335 + ,1403 + ,910 + ,616 + ,1407 + ,771 + ,766 + ,473 + ,1376 + ,1232 + ,1521 + ,572 + ,1059 + ,1544 + ,1230 + ,1206 + ,1205 + ,1255 + ,613 + ,721 + ,1109 + ,740 + ,1126 + ,728 + ,689 + ,592 + ,995 + ,1613 + ,2048 + ,705 + ,301 + ,1803 + ,799 + ,861 + ,1186 + ,1451 + ,628 + ,1161 + ,1463 + ,742 + ,979 + ,675 + ,1241 + ,676 + ,1049 + ,620 + ,1081 + ,1688 + ,736 + ,617 + ,812 + ,1051 + ,1656 + ,705 + ,945 + ,554 + ,1597 + ,982 + ,222 + ,1212 + ,1143 + ,435 + ,532 + ,882 + ,608 + ,459 + ,578 + ,826 + ,509 + ,717 + ,637 + ,857 + ,830 + ,652 + ,707 + ,954 + ,1461 + ,672 + ,778 + ,1141 + ,680 + ,1090 + ,616 + ,285 + ,1145 + ,733 + ,888 + ,849 + ,1182 + ,528 + ,642 + ,947 + ,819 + ,757 + ,894) > par1 = '4' > #'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!) > par1 <- as.numeric(par1) > (n <- length(x)) [1] 289 > (np <- floor(n / par1)) [1] 72 > 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] [,10] [,11] [,12] [,13] [,14] [1,] 1418 901 1192 1495 4041 1882 1289 1638 1579 829 1499 2747 1179 1831 [2,] 869 463 1583 1373 1706 1929 2515 1222 1731 1940 865 1324 2099 3373 [3,] 1530 3201 1439 2187 2152 2242 2147 1812 807 2662 1793 2702 4308 1713 [4,] 2172 371 1764 1491 1036 1220 2352 1677 2452 186 2527 1383 918 1438 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [1,] 496 2352 2694 2474 1389 1268 1403 1502 2970 1654 2008 1468 [2,] 2253 2144 1973 2084 1496 1943 1425 1441 1317 1054 2547 2445 [3,] 744 4691 1769 1954 2269 893 1857 1420 1644 937 1885 1964 [4,] 1161 1112 3148 1226 1833 1762 1840 1416 870 3004 1626 1381 [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [1,] 1369 2845 602 2143 1590 1401 1944 530 387 800 1606 568 [2,] 1659 1982 1743 2146 1210 834 391 1988 1742 1684 1502 1459 [3,] 2888 1904 1559 874 2072 1105 761 1386 620 1050 1204 2158 [4,] 1290 1391 2014 1590 1281 1272 1605 2395 449 2699 1138 1111 [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 1421 1002 3604 1587 946 2035 2201 1335 2429 1639 1383 910 [2,] 2833 1060 1035 1424 1926 2312 961 1597 151 872 1314 616 [3,] 1955 956 1417 1701 3352 1369 1900 207 474 1318 1335 1407 [4,] 2922 2186 3261 1249 1641 1577 1254 1645 141 1018 1403 771 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 766 1521 1230 613 1126 995 301 1186 1463 1241 1081 812 [2,] 473 572 1206 721 728 1613 1803 1451 742 676 1688 1051 [3,] 1376 1059 1205 1109 689 2048 799 628 979 1049 736 1656 [4,] 1232 1544 1255 740 592 705 861 1161 675 620 617 705 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [1,] 945 222 532 578 637 707 778 616 888 642 [2,] 554 1212 882 826 857 954 1141 285 849 947 [3,] 1597 1143 608 509 830 1461 680 1145 1182 819 [4,] 982 435 459 717 652 672 1090 733 528 757 > 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] 1497.25 1234.00 1494.50 1636.50 2233.75 1818.25 2075.75 1587.25 1642.25 [10] 1404.25 1671.00 2039.00 2126.00 2088.75 1163.50 2574.75 2396.00 1934.50 [19] 1746.75 1466.50 1631.25 1444.75 1700.25 1662.25 2016.50 1814.50 1801.50 [28] 2030.50 1479.50 1688.25 1538.25 1153.00 1175.25 1574.75 799.50 1558.25 [37] 1362.50 1324.00 2282.75 1301.00 2329.25 1490.25 1966.25 1823.25 1579.00 [46] 1196.00 798.75 1211.75 1358.75 926.00 961.75 1174.00 1224.00 795.75 [55] 783.75 1340.25 941.00 1106.50 964.75 896.50 1030.50 1056.00 1019.50 [64] 753.00 620.25 657.50 744.00 948.50 922.25 694.75 861.75 791.25 > arr.sd [1] 534.58356 1331.56399 241.55676 371.33767 1289.18072 429.64976 [7] 545.68207 254.65712 674.58994 1108.15293 689.64725 792.12667 [13] 1540.33827 871.85564 776.43480 1511.43582 639.36583 521.46045 [19] 396.25108 477.03145 251.11535 39.71041 903.99571 948.03600 [25] 387.85092 492.56641 741.50230 602.97181 614.12512 602.49170 [31] 392.21285 244.76519 721.64459 810.49671 636.01179 846.63742 [37] 226.77081 666.00450 721.44502 591.53247 1291.04980 196.94902 [43] 1011.37213 428.44554 570.81053 673.26171 1097.78455 340.00037 [49] 41.28256 342.41398 417.06624 459.32487 23.67840 216.19339 [55] 235.22241 604.99112 626.95242 344.93139 356.85139 298.33371 [61] 480.47511 425.34770 430.94973 498.62010 184.79967 141.78035 [67] 115.58258 363.98764 227.65819 355.09846 267.58223 127.11773 > arr.range [1] 1303 2830 572 814 3005 1022 1226 590 1645 2476 1662 1423 3390 1935 1757 [16] 3579 1379 1248 880 1050 454 86 2100 2067 921 1064 1598 1454 1412 1272 [31] 862 567 1553 1865 1355 1899 468 1590 1501 1230 2569 452 2406 943 1240 [46] 1438 2288 767 89 791 903 972 50 496 534 1343 1502 823 788 621 [61] 1071 951 1043 990 423 317 220 789 461 860 654 305 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 16.7423 0.3763 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -0.6882 0.9398 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 27.3940 0.8443 > postscript(file="/var/wessaorg/rcomp/tmp/1a0ps1324391896.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/2i5f91324391896.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/38ovl1324391896.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/4cqz41324391896.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/5b5471324391896.tab") > > try(system("convert tmp/1a0ps1324391896.ps tmp/1a0ps1324391896.png",intern=TRUE)) character(0) > try(system("convert tmp/2i5f91324391896.ps tmp/2i5f91324391896.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.817 0.135 0.945