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(83.87 + ,84.23 + ,84.61 + ,84.82 + ,85.04 + ,85.06 + ,84.93 + ,84.98 + ,85.23 + ,85.30 + ,85.33 + ,85.55 + ,85.70 + ,85.88 + ,86.04 + ,86.07 + ,86.31 + ,86.38 + ,86.35 + ,86.55 + ,86.70 + ,86.74 + ,86.85 + ,86.95 + ,86.80 + ,87.01 + ,87.17 + ,87.43 + ,87.66 + ,87.68 + ,87.59 + ,87.65 + ,87.72 + ,87.70 + ,87.71 + ,87.80 + ,87.62 + ,87.84 + ,88.17 + ,88.47 + ,88.58 + ,88.57 + ,88.55 + ,88.68 + ,88.79 + ,88.85 + ,88.95 + ,89.27 + ,89.09 + ,89.42 + ,89.72 + ,89.85 + ,89.96 + ,90.25 + ,90.20 + ,90.27 + ,90.78 + ,90.79 + ,90.98 + ,91.25 + ,90.75 + ,91.01 + ,91.50 + ,92.09 + ,92.56 + ,92.66 + ,92.38 + ,92.38 + ,92.66 + ,92.69 + ,92.59 + ,92.98 + ,92.98 + ,93.15 + ,93.65 + ,94.06 + ,94.24 + ,94.24 + ,94.11 + ,94.16 + ,94.43 + ,94.67 + ,94.60 + ,95.00 + ,94.84 + ,95.26 + ,95.81 + ,95.92 + ,95.85 + ,95.90 + ,95.80 + ,96.00 + ,96.34 + ,96.43 + ,96.48 + ,96.75 + ,96.51 + ,96.69 + ,97.28 + ,97.69 + ,98.08 + ,98.09 + ,97.92 + ,98.06 + ,98.23 + ,98.57 + ,98.53 + ,98.92 + ,98.42 + ,98.73 + ,99.32 + ,99.73 + ,100.00 + ,100.08 + ,100.02 + ,100.26 + ,100.71 + ,100.95 + ,100.75 + ,101.03 + ,100.64 + ,100.93 + ,101.41 + ,102.07 + ,102.42 + ,102.53 + ,102.43 + ,102.60 + ,102.65 + ,102.74 + ,102.82 + ,103.21 + ,102.75 + ,103.09 + ,103.71 + ,104.30 + ,104.58 + ,104.71 + ,104.44 + ,104.57 + ,104.95 + ,105.49 + ,106.03 + ,106.48 + ,106.25 + ,106.70 + ,107.60 + ,108.05 + ,108.72 + ,109.17 + ,109.08 + ,109.04 + ,109.34 + ,109.37 + ,108.96 + ,108.77 + ,108.11 + ,108.67 + ,109.05 + ,109.43 + ,109.62 + ,109.85 + ,109.34 + ,109.65 + ,109.69 + ,109.91 + ,110.09) > 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] 167 > (np <- floor(n / par1)) [1] 13 > 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] [1,] 83.87 85.70 86.80 87.62 89.09 90.75 92.98 94.84 96.51 98.42 100.64 [2,] 84.23 85.88 87.01 87.84 89.42 91.01 93.15 95.26 96.69 98.73 100.93 [3,] 84.61 86.04 87.17 88.17 89.72 91.50 93.65 95.81 97.28 99.32 101.41 [4,] 84.82 86.07 87.43 88.47 89.85 92.09 94.06 95.92 97.69 99.73 102.07 [5,] 85.04 86.31 87.66 88.58 89.96 92.56 94.24 95.85 98.08 100.00 102.42 [6,] 85.06 86.38 87.68 88.57 90.25 92.66 94.24 95.90 98.09 100.08 102.53 [7,] 84.93 86.35 87.59 88.55 90.20 92.38 94.11 95.80 97.92 100.02 102.43 [8,] 84.98 86.55 87.65 88.68 90.27 92.38 94.16 96.00 98.06 100.26 102.60 [9,] 85.23 86.70 87.72 88.79 90.78 92.66 94.43 96.34 98.23 100.71 102.65 [10,] 85.30 86.74 87.70 88.85 90.79 92.69 94.67 96.43 98.57 100.95 102.74 [11,] 85.33 86.85 87.71 88.95 90.98 92.59 94.60 96.48 98.53 100.75 102.82 [12,] 85.55 86.95 87.80 89.27 91.25 92.98 95.00 96.75 98.92 101.03 103.21 [,12] [,13] [1,] 102.75 106.25 [2,] 103.09 106.70 [3,] 103.71 107.60 [4,] 104.30 108.05 [5,] 104.58 108.72 [6,] 104.71 109.17 [7,] 104.44 109.08 [8,] 104.57 109.04 [9,] 104.95 109.34 [10,] 105.49 109.37 [11,] 106.03 108.96 [12,] 106.48 108.77 > 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] 84.91250 86.37667 87.49333 88.52833 90.21333 92.18750 94.10750 [8] 95.94833 97.88083 100.00000 102.20417 104.59167 108.42083 > arr.sd [1] 0.4793201 0.3973168 0.3239622 0.4630302 0.6502913 0.7158609 0.5952100 [8] 0.5282533 0.7329822 0.8393179 0.7952182 1.0919860 1.0493328 > arr.range [1] 1.68 1.25 1.00 1.65 2.16 2.23 2.02 1.91 2.41 2.61 2.57 3.73 3.12 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -2.07237 0.02888 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -19.338 4.148 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -6.14845 0.08782 > postscript(file="/var/www/html/rcomp/tmp/1cat21261567659.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/2dimr1261567659.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/31alr1261567659.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/4rwtw1261567659.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/5ypv01261567659.tab") > > try(system("convert tmp/1cat21261567659.ps tmp/1cat21261567659.png",intern=TRUE)) character(0) > try(system("convert tmp/2dimr1261567659.ps tmp/2dimr1261567659.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.493 0.280 0.661