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(9005.73 + ,9018.68 + ,9349.44 + ,9327.78 + ,9753.63 + ,10443.5 + ,10853.87 + ,10704.02 + ,11052.23 + ,10935.47 + ,10714.03 + ,10394.48 + ,10817.9 + ,11251.2 + ,11281.26 + ,10539.68 + ,10483.39 + ,10947.43 + ,10580.27 + ,10582.92 + ,10654.41 + ,11014.51 + ,10967.87 + ,10433.56 + ,10665.78 + ,10666.71 + ,10682.74 + ,10777.22 + ,10052.6 + ,10213.97 + ,10546.82 + ,10767.2 + ,10444.5 + ,10314.68 + ,9042.56 + ,9220.75 + ,9721.84 + ,9978.53 + ,9923.81 + ,9892.56 + ,10500.98 + ,10179.35 + ,10080.48 + ,9492.44 + ,8616.49 + ,8685.4 + ,8160.67 + ,8048.1 + ,8641.21 + ,8526.63 + ,8474.21 + ,7916.13 + ,7977.64 + ,8334.59 + ,8623.36 + ,9098.03 + ,9154.34 + ,9284.73 + ,9492.49 + ,9682.35 + ,9762.12 + ,10124.63 + ,10540.05 + ,10601.61 + ,10323.73 + ,10418.4 + ,10092.96 + ,10364.91 + ,10152.09 + ,10032.8 + ,10204.59 + ,10001.6 + ,10411.75 + ,10673.38 + ,10539.51 + ,10723.78 + ,10682.06 + ,10283.19 + ,10377.18 + ,10486.64 + ,10545.38 + ,10554.27 + ,10532.54 + ,10324.31 + ,10695.25 + ,10827.81 + ,10872.48 + ,10971.19 + ,11145.65 + ,11234.68 + ,11333.88 + ,10997.97 + ,11036.89 + ,11257.35 + ,11533.59 + ,11963.12 + ,12185.15 + ,12377.62 + ,12512.89 + ,12631.48 + ,12268.53 + ,12754.8 + ,13407.75 + ,13480.21 + ,13673.28 + ,13239.71 + ,13557.69 + ,13901.28 + ,13200.58 + ,13406.97 + ,12538.12 + ,12419.57 + ,12193.88 + ,12656.63 + ,12812.48 + ,12056.67 + ,11322.38 + ,11530.75 + ,11114.08 + ,9181.73 + ,8614.55) > 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] 121 > (np <- floor(n / par1)) [1] 10 > 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,] 9005.73 10817.90 10665.78 9721.84 8641.21 9762.12 10411.75 10695.25 [2,] 9018.68 11251.20 10666.71 9978.53 8526.63 10124.63 10673.38 10827.81 [3,] 9349.44 11281.26 10682.74 9923.81 8474.21 10540.05 10539.51 10872.48 [4,] 9327.78 10539.68 10777.22 9892.56 7916.13 10601.61 10723.78 10971.19 [5,] 9753.63 10483.39 10052.60 10500.98 7977.64 10323.73 10682.06 11145.65 [6,] 10443.50 10947.43 10213.97 10179.35 8334.59 10418.40 10283.19 11234.68 [7,] 10853.87 10580.27 10546.82 10080.48 8623.36 10092.96 10377.18 11333.88 [8,] 10704.02 10582.92 10767.20 9492.44 9098.03 10364.91 10486.64 10997.97 [9,] 11052.23 10654.41 10444.50 8616.49 9154.34 10152.09 10545.38 11036.89 [10,] 10935.47 11014.51 10314.68 8685.40 9284.73 10032.80 10554.27 11257.35 [11,] 10714.03 10967.87 9042.56 8160.67 9492.49 10204.59 10532.54 11533.59 [12,] 10394.48 10433.56 9220.75 8048.10 9682.35 10001.60 10324.31 11963.12 [,9] [,10] [1,] 12185.15 13200.58 [2,] 12377.62 13406.97 [3,] 12512.89 12538.12 [4,] 12631.48 12419.57 [5,] 12268.53 12193.88 [6,] 12754.80 12656.63 [7,] 13407.75 12812.48 [8,] 13480.21 12056.67 [9,] 13673.28 11322.38 [10,] 13239.71 11530.75 [11,] 13557.69 11114.08 [12,] 13901.28 9181.73 > 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] 10129.405 10796.200 10282.961 9440.054 8767.142 10218.291 10511.166 [8] 11155.822 12999.199 12036.153 > arr.sd [1] 783.6741 293.9014 584.1740 837.4894 572.5434 241.5151 141.5297 [8] 345.8751 606.8201 1144.5458 > arr.range [1] 2046.50 847.70 1734.66 2452.88 1766.22 839.49 440.59 1267.87 1716.13 [10] 4225.24 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 169.91979 0.03623 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 2.8170 0.3601 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -274.3092 0.1888 > postscript(file="/var/www/html/rcomp/tmp/1grqt1229280160.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/2gz831229280160.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/3ss711229280160.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/4tjmf1229280160.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/5w6u11229280160.tab") > > system("convert tmp/1grqt1229280160.ps tmp/1grqt1229280160.png") > system("convert tmp/2gz831229280160.ps tmp/2gz831229280160.png") > > > proc.time() user system elapsed 0.518 0.299 0.610