R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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(24.90 + ,25.06 + ,25.10 + ,24.92 + ,25.46 + ,25.89 + ,25.39 + ,25.38 + ,25.25 + ,24.88 + ,25.00 + ,25.00 + ,24.07 + ,23.60 + ,23.18 + ,23.25 + ,23.04 + ,22.77 + ,22.25 + ,22.41 + ,22.50 + ,22.91 + ,22.88 + ,21.69 + ,21.19 + ,21.56 + ,22.00 + ,22.13 + ,22.27 + ,22.30 + ,21.94 + ,22.40 + ,22.77 + ,22.90 + ,23.03 + ,23.05 + ,22.41 + ,22.26 + ,21.90 + ,22.01 + ,22.62 + ,22.76 + ,23.40 + ,23.63 + ,24.05 + ,23.82 + ,23.71 + ,23.95 + ,23.61 + ,23.98 + ,23.56 + ,23.99 + ,24.33 + ,24.48 + ,24.31 + ,24.38 + ,24.63 + ,25.54 + ,25.75 + ,25.73 + ,25.85 + ,25.78 + ,25.86 + ,26.86 + ,27.36 + ,27.38 + ,26.58 + ,27.65 + ,27.73 + ,27.18 + ,27.32 + ,27.30 + ,26.90 + ,26.70 + ,26.75 + ,26.41 + ,26.29 + ,27.51 + ,27.91 + ,27.70 + ,27.28 + ,28.25 + ,27.62 + ,27.30 + ,25.94 + ,24.99 + ,25.50 + ,24.42 + ,26.58 + ,25.84 + ,26.76 + ,26.74 + ,26.68 + ,25.55 + ,26.40 + ,25.19 + ,23.94 + ,24.20 + ,24.20 + ,23.07 + ,24.07 + ,25.02 + ,24.65 + ,24.68 + ,24.63 + ,24.49 + ,25.05 + ,24.31 + ,23.90 + ,23.68 + ,24.50 + ,25.22 + ,25.48 + ,26.00 + ,26.07 + ,26.06 + ,26.22 + ,26.70 + ,27.20 + ,26.77 + ,26.11 + ,25.43 + ,24.99 + ,25.51 + ,24.00 + ,23.86 + ,22.96 + ,23.41 + ,23.17 + ,24.12 + ,23.87 + ,24.27 + ,24.40 + ,24.16 + ,25.15 + ,25.09 + ,24.60 + ,24.33 + ,24.14 + ,24.36 + ,25.40 + ,26.15 + ,26.77 + ,26.94 + ,26.33 + ,26.24 + ,26.23 + ,25.88 + ,27.00 + ,26.91 + ,27.15 + ,27.78 + ,28.73 + ,28.83 + ,28.68 + ,27.56 + ,27.15 + ,27.41 + ,27.47 + ,28.76 + ,28.47 + ,27.94 + ,27.23 + ,27.01 + ,26.15 + ,26.11 + ,27.20 + ,27.36 + ,27.33 + ,27.43 + ,28.92 + ,29.45 + ,29.01 + ,29.25 + ,29.14 + ,29.64 + ,30.40 + ,30.62 + ,31.25 + ,31.75 + ,31.30 + ,30.70 + ,31.03 + ,31.46 + ,31.28 + ,31.03 + ,30.95 + ,31.17 + ,31.29 + ,31.91 + ,32.10 + ,31.71 + ,31.90 + ,32.02 + ,32.65 + ,33.77 + ,33.51 + ,34.26 + ,34.21 + ,34.13 + ,34.73 + ,34.73 + ,34.57 + ,34.80 + ,33.98 + ,34.40 + ,34.21 + ,34.61 + ,35.25 + ,35.23 + ,35.00 + ,34.52 + ,33.82 + ,34.35 + ,34.81 + ,34.96 + ,36.69 + ,36.42 + ,36.44 + ,37.41 + ,36.40 + ,36.15 + ,35.78 + ,36.95 + ,36.14 + ,36.36 + ,37.31 + ,37.58 + ,38.00 + ,37.23 + ,37.00 + ,37.87 + ,37.70 + ,36.17 + ,36.56 + ,37.70 + ,38.77 + ,39.02 + ,39.88 + ,39.56 + ,38.52 + ,37.20 + ,38.58 + ,39.41 + ,39.08 + ,38.81 + ,38.73 + ,38.70 + ,39.23 + ,39.82 + ,39.97 + ,40.37 + ,39.54 + ,39.21 + ,39.07 + ,39.78 + ,39.40 + ,38.92) > 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] 258 > (np <- floor(n / par1)) [1] 21 > 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] [1,] 24.90 24.07 21.19 22.41 23.61 25.85 26.90 25.94 23.94 23.90 26.11 24.40 [2,] 25.06 23.60 21.56 22.26 23.98 25.78 26.70 24.99 24.20 23.68 25.43 24.16 [3,] 25.10 23.18 22.00 21.90 23.56 25.86 26.75 25.50 24.20 24.50 24.99 25.15 [4,] 24.92 23.25 22.13 22.01 23.99 26.86 26.41 24.42 23.07 25.22 25.51 25.09 [5,] 25.46 23.04 22.27 22.62 24.33 27.36 26.29 26.58 24.07 25.48 24.00 24.60 [6,] 25.89 22.77 22.30 22.76 24.48 27.38 27.51 25.84 25.02 26.00 23.86 24.33 [7,] 25.39 22.25 21.94 23.40 24.31 26.58 27.91 26.76 24.65 26.07 22.96 24.14 [8,] 25.38 22.41 22.40 23.63 24.38 27.65 27.70 26.74 24.68 26.06 23.41 24.36 [9,] 25.25 22.50 22.77 24.05 24.63 27.73 27.28 26.68 24.63 26.22 23.17 25.40 [10,] 24.88 22.91 22.90 23.82 25.54 27.18 28.25 25.55 24.49 26.70 24.12 26.15 [11,] 25.00 22.88 23.03 23.71 25.75 27.32 27.62 26.40 25.05 27.20 23.87 26.77 [12,] 25.00 21.69 23.05 23.95 25.73 27.30 27.30 25.19 24.31 26.77 24.27 26.94 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 26.33 27.15 27.33 31.30 31.90 33.98 36.69 38.00 38.52 [2,] 26.24 27.41 27.43 30.70 32.02 34.40 36.42 37.23 37.20 [3,] 26.23 27.47 28.92 31.03 32.65 34.21 36.44 37.00 38.58 [4,] 25.88 28.76 29.45 31.46 33.77 34.61 37.41 37.87 39.41 [5,] 27.00 28.47 29.01 31.28 33.51 35.25 36.40 37.70 39.08 [6,] 26.91 27.94 29.25 31.03 34.26 35.23 36.15 36.17 38.81 [7,] 27.15 27.23 29.14 30.95 34.21 35.00 35.78 36.56 38.73 [8,] 27.78 27.01 29.64 31.17 34.13 34.52 36.95 37.70 38.70 [9,] 28.73 26.15 30.40 31.29 34.73 33.82 36.14 38.77 39.23 [10,] 28.83 26.11 30.62 31.91 34.73 34.35 36.36 39.02 39.82 [11,] 28.68 27.20 31.25 32.10 34.57 34.81 37.31 39.88 39.97 [12,] 27.56 27.36 31.75 31.71 34.80 34.96 37.58 39.56 40.37 > 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] 25.18583 22.87917 22.29500 23.04333 24.52417 26.90417 27.21833 25.88250 [9] 24.35917 25.65000 24.30833 25.12417 27.27667 27.35500 29.51583 31.32750 [17] 33.77333 34.59500 36.63583 37.95500 39.03500 > arr.sd [1] 0.3004076 0.6308934 0.5811509 0.7979329 0.7659155 0.7167155 0.6132007 [8] 0.7729886 0.5365116 1.1294005 0.9935596 1.0021927 1.0475975 0.7850014 [15] 1.3474181 0.4092593 1.0439726 0.4677509 0.5622917 1.1595179 0.8283993 > arr.range [1] 1.01 2.38 1.86 2.15 2.19 1.95 1.96 2.34 1.98 3.52 3.15 2.80 2.95 2.65 4.42 [16] 1.40 2.90 1.43 1.80 3.71 3.17 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 0.607844 0.006266 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -0.9839 0.2039 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 1.58356 0.03104 > postscript(file="/var/www/rcomp/tmp/174e91324641542.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/rcomp/tmp/21tvj1324641542.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3xsfw1324641542.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/rcomp/tmp/4hydk1324641542.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/rcomp/tmp/5wb051324641542.tab") > > try(system("convert tmp/174e91324641542.ps tmp/174e91324641542.png",intern=TRUE)) character(0) > try(system("convert tmp/21tvj1324641542.ps tmp/21tvj1324641542.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.060 0.120 1.168