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(40801,49081,52431,59650,75428,78705,68870,70641,80074,76464,69976,92917,92559,73981,71107,96942,86270,69610,57768,80077,71454,70382,69881,84530,79322,80181,82137,88439,91575,82909,73282,94089,108112,95653,85273,105093,102275,99308,79687,93263,114918,103374,65124,104045,101183,95492,85035,90692,107486,98179,82551,106804,110898,89950,65184,95357,98280,92146,77874,100039,104777,102341,71316,88838,85457,70784,70522,88629,88452,98886,79601,108135,113835,101617,68698,79182,86003,84165,68550,90385,100368,99081,81288,103491,111695,82504,62237,78249,92341,84412,75102,90461,106451,98379,72615,98367,116949,95832,68060,83923,87653,78054,57566,78784,88916,84662,63442,77773,88102,87972,61790,95276,104418,95420,82141,104064,96287,78426,59111,76837,76615,65860,57703,68656,77955,65856,60947,69885,80550,73694,67538,76326,84727) > 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] 133 > (np <- floor(n / par1)) [1] 33 > 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,] 40801 75428 80074 92559 86270 71454 79322 91575 108112 102275 114918 [2,] 49081 78705 76464 73981 69610 70382 80181 82909 95653 99308 103374 [3,] 52431 68870 69976 71107 57768 69881 82137 73282 85273 79687 65124 [4,] 59650 70641 92917 96942 80077 84530 88439 94089 105093 93263 104045 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] 101183 107486 110898 98280 104777 85457 88452 113835 86003 100368 111695 [2,] 95492 98179 89950 92146 102341 70784 98886 101617 84165 99081 82504 [3,] 85035 82551 65184 77874 71316 70522 79601 68698 68550 81288 62237 [4,] 90692 106804 95357 100039 88838 88629 108135 79182 90385 103491 78249 [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [1,] 92341 106451 116949 87653 88916 88102 104418 96287 76615 77955 80550 [2,] 84412 98379 95832 78054 84662 87972 95420 78426 65860 65856 73694 [3,] 75102 72615 68060 57566 63442 61790 82141 59111 57703 60947 67538 [4,] 90461 98367 83923 78784 77773 95276 104064 76837 68656 69885 76326 > 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] 50490.75 73411.00 79857.75 83647.25 73431.25 74061.75 82519.75 85463.75 [9] 98532.75 93633.25 96865.25 93100.50 98755.00 90347.25 92084.75 91818.00 [17] 78848.00 93768.50 90833.00 82275.75 96057.00 83671.25 85579.00 93953.00 [25] 91191.00 75514.25 78698.25 83285.00 96510.75 77665.25 67208.50 68660.75 [33] 74527.00 > arr.sd [1] 7821.660 4486.584 9656.730 12998.255 12502.518 7009.609 4118.227 [8] 9428.045 10310.397 10025.262 21812.239 6877.481 11603.421 18980.498 [15] 10059.827 15361.007 9551.566 12403.875 20583.899 9515.212 10018.600 [22] 20619.739 7760.756 14726.202 20598.385 12736.176 11159.122 14730.813 [29] 10444.387 15190.946 7804.923 7193.757 5448.331 > arr.range [1] 18849 9835 22941 25835 28502 14649 9117 20807 22839 22588 49794 16148 [13] 24935 45714 22165 33461 18107 28534 45137 21835 22203 49458 17239 33836 [25] 48889 30087 25474 33486 22277 37176 18912 17008 13012 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -3200.9919 0.1762 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -4.611 1.226 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -4875.3441 0.3716 > postscript(file="/var/www/html/rcomp/tmp/1s3si1273754524.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/2s3si1273754524.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/3wlr61273754524.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/4zm7t1273754524.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/5k4nh1273754524.tab") > > try(system("convert tmp/1s3si1273754524.ps tmp/1s3si1273754524.png",intern=TRUE)) character(0) > try(system("convert tmp/2s3si1273754524.ps tmp/2s3si1273754524.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.541 0.299 3.205