R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-bit) 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(8.3,8.2,8.1,8,8.1,8.1,8,7.8,7.7,7.7,7.7,7.6,7.5,7.3,7.2,7.1,7.2,7.2,7.2,6.9,6.8,6.8,6.8,6.9,7,7.2,7.2,7.2,7,7,7.2,7.4,7.8,8,7.8,7.8,7.9,7.9,8,8,8,8,8.2,8.4,8.6,8.6,8.5,8.5,8.4,8.4,8.4,8.5,8.6,8.6,8.6,8.6,8.6,8.5,8.4,8.4,8.3,8.3,8.3,8.6,8.8,8.8,8.5,8.1,7.9,8,8.4,8.5,8.5,8.4,8.3,8.3,8.2,8.1,8.1,8.2,8.2,8.2,8.1,8.1,8,7.8,7.7,7.7,7.7,7.7,7.7,7.5,7.4,7.3,7.4,7.4,7.3,7.3,7.1,7,6.5,6.3,6.3,6.5,6.6,6.5,6.3,6.3,6.3,6.5,6.7,6.7,6.7,6.8,6.7,6.8,6.8,7,7,7.2,7.4,7.6,7.8,7.9,8.1,8.3,8.5,8.7,8.8,8.9,9,9,9.1,9.1,9.1,9.2,9.4,9.4,9.3,9.4,9.4,9.5,9.5,9.4,9.4,9.4,9.3,9.3,9.3,9.3,9.3,9.2,9.1,9.1,9.1,9.1,9.2,9.2,9.2,9.3,9.4,9.4,9.5,9.6,9.7,9.7,9.8,9.9,9.9,9.9,9.8,9.8,9.7,9.7,9.6,9.6,9.6,9.6,9.6,9.7,9.7,9.7,9.7,9.8,9.8,9.8,9.8,9.9,9.9,9.8,9.7,9.6,9.6,9.5,9.3,9.2,9,8.9,8.7,8.5,8.4,8.2,8.1,7.9,7.8,7.6,7.5,7.4,7.2,7.2,7.1,7,7,6.9,6.8,6.7,6.7,6.6,6.6,6.5,6.5,6.4,6.4,6.4,6.4,6.3,6.4,6.4,6.4,6.4,6.4,6.4,6.4,6.5,6.5,6.6,6.6,6.6,6.7,6.7,6.8) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '12' > ylab = '' > xlab = '' > main = '' > #'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] 241 > (np <- floor(n / par1)) [1] 20 > 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,] 8.3 7.5 7.0 7.9 8.4 8.3 8.5 8.0 7.3 6.3 7.4 9.1 9.4 [2,] 8.2 7.3 7.2 7.9 8.4 8.3 8.4 7.8 7.3 6.5 7.6 9.1 9.4 [3,] 8.1 7.2 7.2 8.0 8.4 8.3 8.3 7.7 7.1 6.7 7.8 9.1 9.3 [4,] 8.0 7.1 7.2 8.0 8.5 8.6 8.3 7.7 7.0 6.7 7.9 9.2 9.3 [5,] 8.1 7.2 7.0 8.0 8.6 8.8 8.2 7.7 6.5 6.7 8.1 9.4 9.3 [6,] 8.1 7.2 7.0 8.0 8.6 8.8 8.1 7.7 6.3 6.8 8.3 9.4 9.3 [7,] 8.0 7.2 7.2 8.2 8.6 8.5 8.1 7.7 6.3 6.7 8.5 9.3 9.3 [8,] 7.8 6.9 7.4 8.4 8.6 8.1 8.2 7.5 6.5 6.8 8.7 9.4 9.2 [9,] 7.7 6.8 7.8 8.6 8.6 7.9 8.2 7.4 6.6 6.8 8.8 9.4 9.1 [10,] 7.7 6.8 8.0 8.6 8.5 8.0 8.2 7.3 6.5 7.0 8.9 9.5 9.1 [11,] 7.7 6.8 7.8 8.5 8.4 8.4 8.1 7.4 6.3 7.0 9.0 9.5 9.1 [12,] 7.6 6.9 7.8 8.5 8.4 8.5 8.1 7.4 6.3 7.2 9.0 9.4 9.1 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 9.2 9.9 9.7 9.6 7.8 6.7 6.4 [2,] 9.2 9.9 9.7 9.5 7.6 6.6 6.4 [3,] 9.2 9.8 9.7 9.3 7.5 6.6 6.4 [4,] 9.3 9.8 9.8 9.2 7.4 6.5 6.4 [5,] 9.4 9.7 9.8 9.0 7.2 6.5 6.4 [6,] 9.4 9.7 9.8 8.9 7.2 6.4 6.5 [7,] 9.5 9.6 9.8 8.7 7.1 6.4 6.5 [8,] 9.6 9.6 9.9 8.5 7.0 6.4 6.6 [9,] 9.7 9.6 9.9 8.4 7.0 6.4 6.6 [10,] 9.7 9.6 9.8 8.2 6.9 6.3 6.6 [11,] 9.8 9.6 9.7 8.1 6.8 6.4 6.7 [12,] 9.9 9.7 9.6 7.9 6.7 6.4 6.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] 7.941667 7.075000 7.383333 8.216667 8.500000 8.375000 8.225000 7.608333 [9] 6.666667 6.766667 8.333333 9.316667 9.241667 9.491667 9.708333 9.766667 [17] 8.775000 7.183333 6.466667 6.516667 > arr.sd [1] 0.23143164 0.23011855 0.36639108 0.28230652 0.09534626 0.28643578 [7] 0.12880570 0.20652243 0.39619401 0.23484360 0.56622086 0.15275252 [13] 0.11645002 0.24664414 0.11645002 0.08876254 0.56427749 0.33529724 [19] 0.11547005 0.11934163 > arr.range [1] 0.7 0.7 1.0 0.7 0.2 0.9 0.4 0.7 1.0 0.9 1.6 0.4 0.3 0.7 0.3 0.3 1.7 1.1 0.4 [20] 0.3 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 0.39409 -0.01858 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 0.1864 -0.8424 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 1.28065 -0.07002 > postscript(file="/var/www/wessaorg/rcomp/tmp/1z0p81293640608.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2z0p81293640608.ps",horizontal=F,onefile=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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/wessaorg/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/wessaorg/rcomp/tmp/32j5d1293640608.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/wessaorg/rcomp/tmp/4yu7e1293640609.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/wessaorg/rcomp/tmp/5ul451293640609.tab") > > try(system("convert tmp/1z0p81293640608.ps tmp/1z0p81293640608.png",intern=TRUE)) character(0) > try(system("convert tmp/2z0p81293640608.ps tmp/2z0p81293640608.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.67 0.06 0.77