R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(7787.0 + ,8474.2 + ,9154.7 + ,8557.2 + ,7951.1 + ,9156.7 + ,7865.7 + ,7337.4 + ,9131.7 + ,8814.6 + ,8598.8 + ,8439.6 + ,7451.8 + ,8016.2 + ,9544.1 + ,8270.7 + ,8102.2 + ,9369.0 + ,7657.7 + ,7816.6 + ,9391.3 + ,9445.4 + ,9533.1 + ,10068.7 + ,8955.5 + ,10423.9 + ,11617.2 + ,9391.1 + ,10872.0 + ,10230.4 + ,9221.0 + ,9428.6 + ,10934.5 + ,10986.0 + ,11724.6 + ,11180.9 + ,11163.2 + ,11240.9 + ,12107.1 + ,10762.3 + ,11340.4 + ,11266.8 + ,9542.7 + ,9227.7 + ,10571.9 + ,10774.4 + ,10392.8 + ,9920.2 + ,9884.9 + ,10174.5 + ,11395.4 + ,10760.2 + ,10570.1 + ,10536.0 + ,9902.6 + ,8889.0 + ,10837.3 + ,11624.1 + ,10509.0 + ,10984.9 + ,10649.1 + ,10855.7 + ,11677.4 + ,10760.2 + ,10046.2 + ,10772.8 + ,9987.7 + ,8638.7 + ,11063.7 + ,11855.7 + ,10684.5 + ,11337.4 + ,10478.0 + ,11123.9 + ,12909.3 + ,11339.9 + ,10462.2 + ,12733.5 + ,10519.2 + ,10414.9 + ,12476.8 + ,12384.6 + ,12266.7 + ,12919.9 + ,11497.3 + ,12142.0 + ,13919.4 + ,12656.8 + ,12034.1 + ,13199.7 + ,10881.3 + ,11301.2 + ,13643.9 + ,12517.0 + ,13981.1 + ,14275.7 + ,13435.0 + ,13565.7 + ,16216.3 + ,12970.0 + ,14079.9 + ,14235.0 + ,12213.4 + ,12581.0 + ,14130.4 + ,14210.8 + ,14378.5 + ,13142.8 + ,13714.7 + ,13621.9 + ,15379.8 + ,13306.3 + ,14391.2 + ,14909.9 + ,14025.4 + ,12951.2 + ,14344.3 + ,16093.4 + ,15413.6 + ,14705.7 + ,15972.8 + ,16241.4 + ,16626.4 + ,17136.2 + ,15622.9 + ,18003.9 + ,16136.1 + ,14423.7 + ,16789.4 + ,16782.2 + ,14133.8 + ,12607) > 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] 132 > (np <- floor(n / par1)) [1] 11 > 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] [1,] 7787.0 7451.8 8955.5 11163.2 9884.9 10649.1 10478.0 11497.3 13435.0 [2,] 8474.2 8016.2 10423.9 11240.9 10174.5 10855.7 11123.9 12142.0 13565.7 [3,] 9154.7 9544.1 11617.2 12107.1 11395.4 11677.4 12909.3 13919.4 16216.3 [4,] 8557.2 8270.7 9391.1 10762.3 10760.2 10760.2 11339.9 12656.8 12970.0 [5,] 7951.1 8102.2 10872.0 11340.4 10570.1 10046.2 10462.2 12034.1 14079.9 [6,] 9156.7 9369.0 10230.4 11266.8 10536.0 10772.8 12733.5 13199.7 14235.0 [7,] 7865.7 7657.7 9221.0 9542.7 9902.6 9987.7 10519.2 10881.3 12213.4 [8,] 7337.4 7816.6 9428.6 9227.7 8889.0 8638.7 10414.9 11301.2 12581.0 [9,] 9131.7 9391.3 10934.5 10571.9 10837.3 11063.7 12476.8 13643.9 14130.4 [10,] 8814.6 9445.4 10986.0 10774.4 11624.1 11855.7 12384.6 12517.0 14210.8 [11,] 8598.8 9533.1 11724.6 10392.8 10509.0 10684.5 12266.7 13981.1 14378.5 [12,] 8439.6 10068.7 11180.9 9920.2 10984.9 11337.4 12919.9 14275.7 13142.8 [,10] [,11] [1,] 13714.7 15972.8 [2,] 13621.9 16241.4 [3,] 15379.8 16626.4 [4,] 13306.3 17136.2 [5,] 14391.2 15622.9 [6,] 14909.9 18003.9 [7,] 14025.4 16136.1 [8,] 12951.2 14423.7 [9,] 14344.3 16789.4 [10,] 16093.4 16782.2 [11,] 15413.6 14133.8 [12,] 14705.7 12607.0 > 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] 8439.058 8722.233 10413.808 10692.533 10505.667 10694.092 11669.075 [8] 12670.792 13763.233 14404.783 15872.983 > arr.sd [1] 595.0035 913.9863 961.2010 823.1348 733.8787 855.4038 1041.5556 [8] 1137.8742 1045.1024 940.1138 1490.5749 > arr.range [1] 1819.3 2616.9 2769.1 2879.4 2735.1 3217.0 2505.0 3394.4 4002.9 3142.2 [11] 5396.9 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 31.29480 0.07973 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -1.9479 0.9405 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -807.8272 0.3392 > postscript(file="/var/www/html/rcomp/tmp/1p49z1260813962.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/2lj3g1260813962.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/3r9ko1260813962.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/4gev21260813962.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/5kosc1260813962.tab") > > try(system("convert tmp/1p49z1260813962.ps tmp/1p49z1260813962.png",intern=TRUE)) character(0) > try(system("convert tmp/2lj3g1260813962.ps tmp/2lj3g1260813962.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.521 0.280 0.661