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(14525.87 + ,14295.79 + ,13830.14 + ,14153.22 + ,15418.03 + ,16666.97 + ,16505.21 + ,17135.96 + ,18033.25 + ,17671 + ,17544.22 + ,17677.9 + ,18470.97 + ,18409.96 + ,18941.6 + ,19685.53 + ,19834.71 + ,19598.93 + ,17039.97 + ,16969.28 + ,16973.38 + ,16329.89 + ,16153.34 + ,15311.7 + ,14760.87 + ,14452.93 + ,13720.95 + ,13266.27 + ,12708.47 + ,13411.84 + ,13975.55 + ,12974.89 + ,12151.11 + ,11576.21 + ,9996.83 + ,10438.9 + ,10511.22 + ,10496.2 + ,10300.79 + ,9981.65 + ,11448.79 + ,11384.49 + ,11717.46 + ,10965.88 + ,10352.27 + ,9751.2 + ,9354.01 + ,8792.5 + ,8721.14 + ,8692.94 + ,8570.73 + ,8538.47 + ,8169.75 + ,7905.84 + ,8145.82 + ,8895.71 + ,9676.31 + ,9884.59 + ,10637.44 + ,10717.13 + ,10205.29 + ,10295.98 + ,10892.76 + ,10631.92 + ,11441.08 + ,11950.95 + ,11037.54 + ,11527.72 + ,11383.89 + ,10989.34 + ,11079.42 + ,11028.93 + ,10973 + ,11068.05 + ,11394.84 + ,11545.71 + ,11809.38 + ,11395.64 + ,11082.38 + ,11402.75 + ,11716.87 + ,12204.98 + ,12986.62 + ,13392.79 + ,14368.05 + ,15650.83 + ,16102.64 + ,16187.64 + ,16311.54 + ,17232.97 + ,16397.83 + ,14990.31 + ,15147.55 + ,15786.78 + ,15934.09 + ,16519.44 + ,16101.07 + ,16775.08 + ,17286.32 + ,17741.23 + ,17128.37 + ,17460.53 + ,17611.14 + ,18001.37 + ,17974.77 + ,16460.95 + ,16235.39 + ,16903.36 + ,15543.76 + ,15532.18 + ,13731.31 + ,13547.84 + ,12602.93 + ,13357.7 + ,13995.33 + ,14084.6 + ,13168.91 + ,12989.35 + ,12123.53 + ,9117.03 + ,8531.45) > 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] 121 > (np <- floor(n / par1)) [1] 30 > 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] [1,] 14525.87 15418.03 18033.25 18470.97 19834.71 16973.38 14760.87 12708.47 [2,] 14295.79 16666.97 17671.00 18409.96 19598.93 16329.89 14452.93 13411.84 [3,] 13830.14 16505.21 17544.22 18941.60 17039.97 16153.34 13720.95 13975.55 [4,] 14153.22 17135.96 17677.90 19685.53 16969.28 15311.70 13266.27 12974.89 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 12151.11 10511.22 11448.79 10352.27 8721.14 8169.75 9676.31 10205.29 [2,] 11576.21 10496.20 11384.49 9751.20 8692.94 7905.84 9884.59 10295.98 [3,] 9996.83 10300.79 11717.46 9354.01 8570.73 8145.82 10637.44 10892.76 [4,] 10438.90 9981.65 10965.88 8792.50 8538.47 8895.71 10717.13 10631.92 [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 11441.08 11383.89 10973.00 11809.38 11716.87 14368.05 16311.54 15147.55 [2,] 11950.95 10989.34 11068.05 11395.64 12204.98 15650.83 17232.97 15786.78 [3,] 11037.54 11079.42 11394.84 11082.38 12986.62 16102.64 16397.83 15934.09 [4,] 11527.72 11028.93 11545.71 11402.75 13392.79 16187.64 14990.31 16519.44 [,25] [,26] [,27] [,28] [,29] [,30] [1,] 16101.07 17128.37 17974.77 15543.76 12602.93 13168.91 [2,] 16775.08 17460.53 16460.95 15532.18 13357.70 12989.35 [3,] 17286.32 17611.14 16235.39 13731.31 13995.33 12123.53 [4,] 17741.23 18001.37 16903.36 13547.84 14084.60 9117.03 > 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] 14201.255 16431.542 17731.592 18877.015 18360.722 16192.077 14050.255 [8] 13267.688 11040.763 10322.465 11379.155 9562.495 8630.820 8279.280 [15] 10228.868 10506.487 11489.323 11120.395 11245.400 11422.537 12575.315 [22] 15577.290 16233.163 15846.965 16975.925 17550.353 16893.618 14588.772 [29] 13510.140 11849.705 > arr.sd [1] 291.1732 726.6968 210.2855 589.0333 1569.1076 684.5901 680.7337 [8] 553.8664 995.2569 246.6015 310.9791 657.1941 89.7328 427.8831 [15] 525.7308 316.2136 374.6150 179.4899 269.6746 298.0320 755.3174 [22] 839.8788 926.9225 563.5060 704.2127 362.0540 772.3234 1098.6054 [29] 685.9741 1878.0828 > arr.range [1] 695.73 1717.93 489.03 1275.57 2865.43 1661.68 1494.60 1267.08 2154.28 [10] 529.57 751.58 1559.77 182.67 989.87 1040.82 687.47 913.41 394.55 [19] 572.71 727.00 1675.92 1819.59 2242.66 1371.89 1640.16 873.00 1739.38 [28] 1995.92 1481.67 4051.88 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 86.04288 0.03942 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -5.044 1.189 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 254.81759 0.08183 > postscript(file="/var/www/html/rcomp/tmp/1367t1229012650.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/rcomp/tmp/22dvt1229012650.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/rcomp/tmp/3b7qy1229012650.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/rcomp/tmp/4gckh1229012650.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/rcomp/tmp/59xd01229012650.tab") > > system("convert tmp/1367t1229012650.ps tmp/1367t1229012650.png") > system("convert tmp/22dvt1229012650.ps tmp/22dvt1229012650.png") > > > proc.time() user system elapsed 0.517 0.299 0.746