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(131.676 + ,135.050 + ,129.070 + ,137.792 + ,139.762 + ,142.917 + ,144.198 + ,142.648 + ,152.170 + ,136.022 + ,138.142 + ,138.135 + ,135.027 + ,132.911 + ,133.976 + ,137.012 + ,119.610 + ,118.106 + ,120.383 + ,133.185 + ,131.416 + ,134.248 + ,134.397 + ,127.728 + ,131.837 + ,125.955 + ,134.187 + ,143.291 + ,145.074 + ,149.812 + ,144.668 + ,147.253 + ,145.568 + ,155.564 + ,155.872 + ,156.323 + ,158.010 + ,155.598 + ,154.785 + ,157.294 + ,162.938 + ,157.283 + ,166.074 + ,169.282 + ,172.552 + ,174.055 + ,175.409 + ,173.696 + ,171.283 + ,173.322 + ,170.717 + ,174.229 + ,175.339 + ,173.511 + ,175.839 + ,173.816 + ,173.990 + ,174.777 + ,174.819 + ,176.726 + ,176.199 + ,180.952 + ,176.663 + ,182.346 + ,180.605 + ,182.497 + ,187.856 + ,190.020 + ,190.108 + ,193.288 + ,193.230 + ,199.068 + ,195.076 + ,191.563 + ,191.067 + ,186.665 + ,185.508 + ,184.371 + ,183.046 + ,175.714 + ,175.768 + ,171.029 + ,170.465 + ,170.102 + ,156.389 + ,124.291 + ,99.360 + ,86.675 + ,85.056 + ,128.236 + ,164.257 + ,162.401 + ,152.779 + ,156.005 + ,153.387 + ,153.190 + ,148.840 + ,144.211 + ,145.953 + ,145.542 + ,150.271 + ,147.489 + ,143.824 + ,134.754 + ,131.736 + ,126.304 + ,125.511 + ,125.495 + ,130.133 + ,126.257 + ,110.323 + ,98.417 + ,105.749 + ,120.665 + ,124.075 + ,127.245 + ,146.731 + ,144.979 + ,148.210 + ,144.670 + ,142.970 + ,142.524 + ,146.142 + ,146.522 + ,148.128 + ,148.798 + ,150.181 + ,152.388 + ,155.694 + ,160.662 + ,155.520 + ,158.262 + ,154.338 + ,158.196 + ,160.371 + ,154.856 + ,150.636 + ,145.899 + ,141.242 + ,140.834 + ,141.119 + ,139.104 + ,134.437 + ,129.425 + ,123.155 + ,119.273 + ,120.472 + ,121.523 + ,121.983 + ,123.658 + ,124.794 + ,124.827 + ,120.382 + ,117.395 + ,115.790 + ,114.283 + ,117.271 + ,117.448 + ,118.764 + ,120.550 + ,123.554 + ,125.412 + ,124.182 + ,119.828 + ,115.361 + ,114.226 + ,115.214 + ,115.864 + ,114.276 + ,113.469 + ,114.883 + ,114.172 + ,111.225 + ,112.149 + ,115.618 + ,118.002 + ,121.382 + ,120.663 + ,128.049) > par1 = '4' > #'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] 179 > (np <- floor(n / par1)) [1] 44 > 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,] 131.676 139.762 152.170 135.027 119.610 131.416 131.837 145.074 145.568 [2,] 135.050 142.917 136.022 132.911 118.106 134.248 125.955 149.812 155.564 [3,] 129.070 144.198 138.142 133.976 120.383 134.397 134.187 144.668 155.872 [4,] 137.792 142.648 138.135 137.012 133.185 127.728 143.291 147.253 156.323 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 158.010 162.938 172.552 171.283 175.339 173.990 176.199 180.605 190.108 [2,] 155.598 157.283 174.055 173.322 173.511 174.777 180.952 182.497 193.288 [3,] 154.785 166.074 175.409 170.717 175.839 174.819 176.663 187.856 193.230 [4,] 157.294 169.282 173.696 174.229 173.816 176.726 182.346 190.020 199.068 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 195.076 185.508 175.768 156.389 85.056 152.779 148.840 150.271 131.736 [2,] 191.563 184.371 171.029 124.291 128.236 156.005 144.211 147.489 126.304 [3,] 191.067 183.046 170.465 99.360 164.257 153.387 145.953 143.824 125.511 [4,] 186.665 175.714 170.102 86.675 162.401 153.190 145.542 134.754 125.495 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 130.133 105.749 146.731 142.970 148.128 155.694 154.338 150.636 141.119 [2,] 126.257 120.665 144.979 142.524 148.798 160.662 158.196 145.899 139.104 [3,] 110.323 124.075 148.210 146.142 150.181 155.520 160.371 141.242 134.437 [4,] 98.417 127.245 144.670 146.522 152.388 158.262 154.856 140.834 129.425 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [1,] 123.155 121.983 120.382 117.271 123.554 115.361 114.276 111.225 [2,] 119.273 123.658 117.395 117.448 125.412 114.226 113.469 112.149 [3,] 120.472 124.794 115.790 118.764 124.182 115.214 114.883 115.618 [4,] 121.523 124.827 114.283 120.550 119.828 115.864 114.172 118.002 > 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] 133.3970 142.3812 141.1172 134.7315 122.8210 131.9472 133.8175 146.7018 [9] 153.3317 156.4218 163.8942 173.9280 172.3878 174.6262 175.0780 179.0400 [17] 185.2445 193.9235 191.0927 182.1598 171.8410 116.6788 134.9875 153.8402 [25] 146.1365 144.0845 127.2615 116.2825 119.4335 146.1475 144.5395 149.8738 [33] 157.5345 156.9402 144.6527 136.0213 121.1058 123.8155 116.9625 118.5083 [41] 123.2440 115.1663 114.2000 114.2485 > arr.sd [1] 3.8180800 1.8725415 7.4357421 1.7486186 6.9737146 3.1293781 [7] 7.2024306 2.3638416 5.1852098 1.4878253 5.1121490 1.1770995 [13] 1.6608133 1.1371108 1.1629460 3.0717416 4.4233867 3.7375894 [19] 3.4493018 4.4133712 2.6456360 30.7409305 37.1794794 1.4652252 [25] 1.9496636 6.7574525 3.0068105 14.6744532 9.5104361 1.6475008 [31] 2.0835773 1.8815540 2.4328422 2.8555651 4.6032049 5.2125095 [37] 1.6466263 1.3370935 2.6098859 1.5153733 2.4045252 0.6858408 [43] 0.5794854 3.1365451 > arr.range [1] 8.722 4.436 16.148 4.101 15.079 6.669 17.336 5.144 10.755 3.225 [11] 11.999 2.857 3.512 2.328 2.736 6.147 9.415 8.960 8.411 9.794 [21] 5.666 69.714 79.201 3.226 4.629 15.517 6.241 31.716 21.496 3.540 [31] 3.998 4.260 5.142 6.033 9.802 11.694 3.882 2.844 6.099 3.279 [41] 5.584 1.638 1.414 6.777 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 14.8392 -0.0687 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 4.6092 -0.7037 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 32.8170 -0.1520 > postscript(file="/var/www/rcomp/tmp/1eh911305058672.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/23oey1305058672.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/32fkj1305058672.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/4ldvo1305058672.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/59ddp1305058672.tab") > > try(system("convert tmp/1eh911305058672.ps tmp/1eh911305058672.png",intern=TRUE)) character(0) > try(system("convert tmp/23oey1305058672.ps tmp/23oey1305058672.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.630 0.420 1.021