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(15 + ,14.4 + ,13.5 + ,12.8 + ,12.3 + ,12.2 + ,14.5 + ,17.2 + ,18 + ,18.1 + ,18 + ,18.3 + ,18.7 + ,18.6 + ,18.3 + ,17.9 + ,17.4 + ,17.4 + ,20.1 + ,23.2 + ,24.2 + ,24.2 + ,23.9 + ,23.8 + ,23.8 + ,23.3 + ,22.4 + ,21.5 + ,20.5 + ,19.9 + ,22 + ,24.9 + ,25.7 + ,25.3 + ,24.4 + ,23.8 + ,23.5 + ,23 + ,22.2 + ,21.4 + ,20.3 + ,19.5 + ,21.7 + ,24.7 + ,25.3 + ,24.9 + ,24.1 + ,23.4 + ,23.1 + ,22.4 + ,21.3 + ,20.3 + ,19.3 + ,18.7 + ,21 + ,24 + ,24.8 + ,24.2 + ,23.3 + ,22.7 + ,22.3 + ,21.8 + ,21.2 + ,20.5 + ,19.7 + ,19.2 + ,21.2 + ,23.9 + ,24.8 + ,24.2 + ,23 + ,22.2 + ,21.8 + ,21.2 + ,20.5 + ,19.7 + ,19 + ,18.4 + ,20.7 + ,24.5 + ,26 + ,25.2 + ,24.1 + ,23.7 + ,23.5 + ,23.1 + ,22.7 + ,22.5 + ,21.7 + ,20.5 + ,21.9 + ,22.9 + ,21.5 + ,19 + ,17 + ,16.1 + ,15.9 + ,15.7 + ,15.1 + ,14.8 + ,14.3 + ,14.5 + ,18.9 + ,21.6 + ,20.4 + ,17.9 + ,15.7 + ,14.5 + ,14 + ,13.9 + ,14.4 + ,15.8 + ,15.6 + ,14.7 + ,16.7 + ,17.9 + ,18.7 + ,20.1 + ,19.5 + ,19.4 + ,18.6 + ,17.8 + ,17.1 + ,16.5 + ,15.5 + ,14.9 + ,18.6 + ,19.1 + ,18.8 + ,18.2 + ,18 + ,19 + ,20.7 + ,21.2 + ,20.7 + ,19.6 + ,18.6 + ,18.7 + ,23.8 + ,24.9 + ,24.8 + ,23.8 + ,22.3 + ,21.7 + ,20.7 + ,19.7 + ,18.4 + ,17.4 + ,17 + ,18 + ,23.8 + ,25.5 + ,25.6 + ,23.7 + ,22 + ,21.3 + ,20.7 + ,20.4 + ,20.3 + ,20.4 + ,19.8 + ,19.5 + ,23.1 + ,23.5 + ,23.5 + ,22.9 + ,21.9 + ,21.5 + ,20.5 + ,20.2 + ,19.4 + ,19.2 + ,18.8 + ,18.8 + ,22.6 + ,23.3 + ,23 + ,21.4 + ,19.9 + ,18.8 + ,18.6 + ,18.4 + ,18.6 + ,19.9 + ,19.2 + ,18.4 + ,21.1 + ,20.5 + ,19.1 + ,18.1 + ,17 + ,17.1 + ,17.4 + ,16.8 + ,15.3 + ,14.3 + ,13.4 + ,15.3 + ,22.1 + ,23.7 + ,22.2 + ,19.5 + ,16.6 + ,17.3 + ,19.8 + ,21.2 + ,21.5 + ,20.6 + ,19.1 + ,19.6 + ,23.5 + ,24 + ,23.2 + ,21.2) > 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] 214 > (np <- floor(n / par1)) [1] 17 > 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] [1,] 15.0 18.7 23.8 23.5 23.1 22.3 21.8 23.5 15.9 14.0 18.6 20.7 20.7 [2,] 14.4 18.6 23.3 23.0 22.4 21.8 21.2 23.1 15.7 13.9 17.8 21.2 19.7 [3,] 13.5 18.3 22.4 22.2 21.3 21.2 20.5 22.7 15.1 14.4 17.1 20.7 18.4 [4,] 12.8 17.9 21.5 21.4 20.3 20.5 19.7 22.5 14.8 15.8 16.5 19.6 17.4 [5,] 12.3 17.4 20.5 20.3 19.3 19.7 19.0 21.7 14.3 15.6 15.5 18.6 17.0 [6,] 12.2 17.4 19.9 19.5 18.7 19.2 18.4 20.5 14.5 14.7 14.9 18.7 18.0 [7,] 14.5 20.1 22.0 21.7 21.0 21.2 20.7 21.9 18.9 16.7 18.6 23.8 23.8 [8,] 17.2 23.2 24.9 24.7 24.0 23.9 24.5 22.9 21.6 17.9 19.1 24.9 25.5 [9,] 18.0 24.2 25.7 25.3 24.8 24.8 26.0 21.5 20.4 18.7 18.8 24.8 25.6 [10,] 18.1 24.2 25.3 24.9 24.2 24.2 25.2 19.0 17.9 20.1 18.2 23.8 23.7 [11,] 18.0 23.9 24.4 24.1 23.3 23.0 24.1 17.0 15.7 19.5 18.0 22.3 22.0 [12,] 18.3 23.8 23.8 23.4 22.7 22.2 23.7 16.1 14.5 19.4 19.0 21.7 21.3 [,14] [,15] [,16] [,17] [1,] 20.7 20.5 18.6 17.4 [2,] 20.4 20.2 18.4 16.8 [3,] 20.3 19.4 18.6 15.3 [4,] 20.4 19.2 19.9 14.3 [5,] 19.8 18.8 19.2 13.4 [6,] 19.5 18.8 18.4 15.3 [7,] 23.1 22.6 21.1 22.1 [8,] 23.5 23.3 20.5 23.7 [9,] 23.5 23.0 19.1 22.2 [10,] 22.9 21.4 18.1 19.5 [11,] 21.9 19.9 17.0 16.6 [12,] 21.5 18.8 17.1 17.3 > 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] 15.35833 20.64167 23.12500 22.83333 22.09167 22.00000 22.06667 21.03333 [9] 16.60833 16.72500 17.67500 21.73333 21.09167 21.45833 20.49167 18.83333 [17] 17.82500 > arr.sd [1] 2.423918 2.934267 1.878164 1.846536 1.969983 1.761198 2.551411 2.434724 [9] 2.488687 2.307350 1.391614 2.221520 3.075256 1.478610 1.687633 1.230176 [17] 3.337153 > arr.range [1] 6.1 6.8 5.8 5.8 6.1 5.6 7.6 7.4 7.3 6.2 4.2 6.3 8.6 4.0 4.5 [16] 4.1 10.3 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 3.04344 -0.04309 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 1.6934 -0.3181 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 7.50667 -0.06122 > postscript(file="/var/www/html/rcomp/tmp/15pch1262215563.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/2t2hg1262215563.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/3jelx1262215563.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/44idd1262215563.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/5ok0w1262215563.tab") > try(system("convert tmp/15pch1262215563.ps tmp/15pch1262215563.png",intern=TRUE)) character(0) > try(system("convert tmp/2t2hg1262215563.ps tmp/2t2hg1262215563.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.530 0.283 1.157