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(100 + ,97.56592292 + ,93.71196755 + ,92.69776876 + ,89.65517241 + ,89.04665314 + ,98.98580122 + ,105.6795132 + ,101.6227181 + ,98.37728195 + ,94.11764706 + ,93.30628803 + ,94.72616633 + ,93.30628803 + ,90.87221095 + ,89.85801217 + ,88.43813387 + ,87.42393509 + ,98.17444219 + ,103.4482759 + ,104.0567951 + ,102.0283976 + ,95.53752535 + ,95.53752535 + ,96.55172414 + ,96.34888438 + ,95.3346856 + ,93.50912779 + ,92.29208925 + ,92.49492901 + ,104.8681542 + ,106.4908722 + ,106.0851927 + ,105.2738337 + ,103.2454361 + ,103.8539554 + ,105.2738337 + ,104.8681542 + ,103.4482759 + ,103.2454361 + ,101.6227181 + ,102.8397566 + ,115.4158215 + ,117.6470588 + ,117.2413793 + ,114.6044625 + ,110.9533469 + ,112.5760649 + ,113.9959432 + ,113.7931034 + ,112.5760649 + ,110.3448276 + ,108.9249493 + ,110.1419878 + ,120.4868154 + ,123.9350913 + ,124.3407708 + ,123.9350913 + ,120.4868154 + ,120.6896552 + ,119.8782961 + ,119.4726166 + ,118.4584178 + ,116.2271805 + ,115.010142 + ,115.4158215 + ,125.9634888 + ,127.5862069 + ,127.3833671 + ,124.137931 + ,120.6896552 + ,121.0953347 + ,120.2839757 + ,119.6754564 + ,117.6470588 + ,116.4300203 + ,116.2271805 + ,116.2271805 + ,125.7606491 + ,126.9776876 + ,125.7606491 + ,119.2697769 + ,114.8073022 + ,112.9817444 + ,113.7931034 + ,111.3590264 + ,107.9107505 + ,106.693712 + ,103.6511156 + ,101.2170385 + ,112.5760649 + ,114.6044625 + ,109.9391481 + ,106.8965517 + ,103.4482759 + ,104.2596349 + ,104.8681542 + ,103.0425963 + ,100 + ,99.39148073 + ,95.13184584 + ,96.95740365 + ,107.0993915 + ,108.31643 + ,105.0709939 + ,102.6369168 + ,101.8255578 + ,104.6653144) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] [1,] 100.00000 94.72617 96.55172 105.2738 113.9959 119.8783 120.2840 [2,] 97.56592 93.30629 96.34888 104.8682 113.7931 119.4726 119.6755 [3,] 93.71197 90.87221 95.33469 103.4483 112.5761 118.4584 117.6471 [4,] 92.69777 89.85801 93.50913 103.2454 110.3448 116.2272 116.4300 [5,] 89.65517 88.43813 92.29209 101.6227 108.9249 115.0101 116.2272 [6,] 89.04665 87.42394 92.49493 102.8398 110.1420 115.4158 116.2272 [7,] 98.98580 98.17444 104.86815 115.4158 120.4868 125.9635 125.7606 [8,] 105.67951 103.44828 106.49087 117.6471 123.9351 127.5862 126.9777 [9,] 101.62272 104.05680 106.08519 117.2414 124.3408 127.3834 125.7606 [10,] 98.37728 102.02840 105.27383 114.6045 123.9351 124.1379 119.2698 [11,] 94.11765 95.53753 103.24544 110.9533 120.4868 120.6897 114.8073 [12,] 93.30629 95.53753 103.85396 112.5761 120.6897 121.0953 112.9817 [,8] [,9] [1,] 113.7931 104.86815 [2,] 111.3590 103.04260 [3,] 107.9108 100.00000 [4,] 106.6937 99.39148 [5,] 103.6511 95.13185 [6,] 101.2170 96.95740 [7,] 112.5761 107.09939 [8,] 114.6045 108.31643 [9,] 109.9391 105.07099 [10,] 106.8966 102.63692 [11,] 103.4483 101.82556 [12,] 104.2596 104.66531 > 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] 96.23056 95.28398 99.69574 109.14469 116.97093 120.94320 119.33739 [8] 108.02907 102.41717 > arr.sd [1] 4.983916 5.715702 5.719218 6.170924 5.903827 4.457548 4.607092 4.428363 [9] 3.971497 > arr.range [1] 16.63286 16.63286 14.19878 16.02434 15.41582 12.57606 13.99594 13.38742 [9] 13.18458 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 6.59780 -0.01387 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 3.0105 -0.2975 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 23.31449 -0.08035 > postscript(file="/var/www/html/rcomp/tmp/1ibyg1261073051.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/2z4qs1261073051.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/36ups1261073051.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/4xaxa1261073051.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/5pvyd1261073051.tab") > > try(system("convert tmp/1ibyg1261073051.ps tmp/1ibyg1261073051.png",intern=TRUE)) character(0) > try(system("convert tmp/2z4qs1261073051.ps tmp/2z4qs1261073051.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.520 0.280 1.724