R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. > x <- c(1025.5 + ,691.2 + ,971.6 + ,926 + ,997.1 + ,964.9 + ,860 + ,948 + ,951.4 + ,827.3 + ,994 + ,944.5 + ,976.2 + ,668.8 + ,939.9 + ,1096.1 + ,977.7 + ,1096.9 + ,1060.8 + ,1121.4 + ,1190.9 + ,1177.9 + ,1108.1 + ,1045.6 + ,1263.9 + ,911 + ,1175.9 + ,1091.3 + ,1027.7 + ,1081.7 + ,879.7 + ,955.5 + ,1037.9 + ,959.9 + ,931.8 + ,1062.2 + ,1077.2 + ,668.4 + ,954.3 + ,797.2 + ,829.2 + ,957.3 + ,844.2 + ,893.6 + ,1132 + ,898.8 + ,1064 + ,1279.7 + ,1382.5 + ,824.1 + ,1304.1 + ,1253.5 + ,1136.3 + ,1414.7 + ,1293.2 + ,1325.7 + ,1463.8 + ,1244.2 + ,1573.6 + ,1327.3 + ,1418.5 + ,1042.2 + ,1384.8 + ,1474.8 + ,1556.5 + ,1466.2 + ,1221.7 + ,1279.7 + ,1348.4 + ,1189.8 + ,1296.6 + ,1417.6 + ,1513.9 + ,1006.1 + ,1202.8 + ,1258.8 + ,1211.5 + ,1283.3 + ,1332.3 + ,1374.3 + ,1406.1 + ,1419.1 + ,1554.4 + ,1499.8 + ,1609.6 + ,1033.9 + ,1550.5 + ,1491.4 + ,1368.9 + ,1537.1 + ,1492.3 + ,1504.1 + ,1301.2 + ,1344.2 + ,1319.1 + ,1420.3 + ,1582.9 + ,1002.6 + ,1559.1 + ,1462.7 + ,1414.8 + ,1537.5 + ,1455.9 + ,1619.9 + ,1667.2 + ,1488.9 + ,1442.5 + ,1779.6 + ,1801.9 + ,1233.4 + ,1581.1 + ,1515 + ,1439.2 + ,1585.8 + ,1488.8 + ,1601.3 + ,1646.8 + ,1630.2 + ,1720.7 + ,2013.5 + ,2051.2 + ,1404.7 + ,2015.9 + ,1544.1 + ,1816.6 + ,1773.4 + ,1577.4 + ,1709.8 + ,1810.2 + ,1520.5 + ,1798.6 + ,1666.8 + ,1730.4 + ,1147.8 + ,1777 + ,1700 + ,1907.4 + ,1745.8 + ,1771.6 + ,1790.2 + ,1958.7 + ,1560.4 + ,1752.1 + ,2011.6 + ,2082.8 + ,1616.4 + ,1846.1 + ,1824.9 + ,1711.3 + ,1805 + ,1737.6 + ,1939.6 + ,1711.4 + ,1964.8 + ,1864.4 + ,1980.7 + ,2226.7 + ,1433.3 + ,1960.7) > par1 = '12' > #'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] 159 > (np <- floor(n / par1)) [1] 13 > 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] [1,] 1025.5 976.2 1263.9 1077.2 1382.5 1418.5 1513.9 1609.6 1582.9 1801.9 [2,] 691.2 668.8 911.0 668.4 824.1 1042.2 1006.1 1033.9 1002.6 1233.4 [3,] 971.6 939.9 1175.9 954.3 1304.1 1384.8 1202.8 1550.5 1559.1 1581.1 [4,] 926.0 1096.1 1091.3 797.2 1253.5 1474.8 1258.8 1491.4 1462.7 1515.0 [5,] 997.1 977.7 1027.7 829.2 1136.3 1556.5 1211.5 1368.9 1414.8 1439.2 [6,] 964.9 1096.9 1081.7 957.3 1414.7 1466.2 1283.3 1537.1 1537.5 1585.8 [7,] 860.0 1060.8 879.7 844.2 1293.2 1221.7 1332.3 1492.3 1455.9 1488.8 [8,] 948.0 1121.4 955.5 893.6 1325.7 1279.7 1374.3 1504.1 1619.9 1601.3 [9,] 951.4 1190.9 1037.9 1132.0 1463.8 1348.4 1406.1 1301.2 1667.2 1646.8 [10,] 827.3 1177.9 959.9 898.8 1244.2 1189.8 1419.1 1344.2 1488.9 1630.2 [11,] 994.0 1108.1 931.8 1064.0 1573.6 1296.6 1554.4 1319.1 1442.5 1720.7 [12,] 944.5 1045.6 1062.2 1279.7 1327.3 1417.6 1499.8 1420.3 1779.6 2013.5 [,11] [,12] [,13] [1,] 2051.2 1730.4 2082.8 [2,] 1404.7 1147.8 1616.4 [3,] 2015.9 1777.0 1846.1 [4,] 1544.1 1700.0 1824.9 [5,] 1816.6 1907.4 1711.3 [6,] 1773.4 1745.8 1805.0 [7,] 1577.4 1771.6 1737.6 [8,] 1709.8 1790.2 1939.6 [9,] 1810.2 1958.7 1711.4 [10,] 1520.5 1560.4 1964.8 [11,] 1798.6 1752.1 1864.4 [12,] 1666.8 2011.6 1980.7 > 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] 925.1250 1038.3583 1031.5417 949.6583 1295.2500 1341.4000 1338.5333 [8] 1414.3833 1501.1333 1604.8083 1724.1000 1737.7500 1840.4167 > arr.sd [1] 92.37423 140.00924 112.96066 166.59897 186.20668 143.32647 156.73203 [8] 155.33972 189.18376 192.95368 194.69553 221.41591 134.81010 > arr.range [1] 334.3 522.1 384.2 611.3 749.5 514.3 548.3 575.7 777.0 780.1 646.5 863.8 [13] 466.4 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 63.17776 0.07131 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 0.3472 0.6541 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 222.0736 0.2754 > postscript(file="/var/www/html/freestat/rcomp/tmp/10jd31229940529.ps",horizontal=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/www/html/freestat/rcomp/tmp/213451229940529.ps",horizontal=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/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/www/html/freestat/rcomp/tmp/3z4xb1229940529.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/www/html/freestat/rcomp/tmp/4fu6z1229940529.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/www/html/freestat/rcomp/tmp/52wm11229940529.tab") > > system("convert tmp/10jd31229940529.ps tmp/10jd31229940529.png") > system("convert tmp/213451229940529.ps tmp/213451229940529.png") > > > proc.time() user system elapsed 0.772 0.428 0.899