R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-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. Natural language support but running in an English locale 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(131676 + ,135050 + ,129070 + ,137792 + ,139762 + ,142917 + ,144198 + ,142648 + ,152170 + ,136022 + ,138142 + ,138135 + ,135027 + ,132911 + ,133976 + ,137012 + ,119610 + ,118106 + ,120383 + ,133185 + ,131416 + ,134248 + ,134397 + ,127728 + ,131837 + ,125955 + ,134187 + ,143291 + ,145074 + ,149812 + ,144668 + ,147253 + ,145568 + ,155564 + ,155872 + ,156323 + ,158010 + ,155598 + ,154785 + ,157294 + ,162938 + ,157283 + ,166074 + ,169282 + ,172552 + ,174055 + ,175409 + ,173696 + ,171283 + ,173322 + ,170717 + ,174229 + ,175339 + ,173511 + ,175839 + ,173816 + ,173990 + ,174777 + ,174819 + ,176726 + ,176199 + ,180952 + ,176663 + ,182346 + ,180605 + ,182497 + ,187856 + ,190020 + ,190108 + ,193288 + ,193230 + ,199068 + ,195076 + ,191563 + ,191067 + ,186665 + ,185508 + ,184371 + ,183046 + ,175714 + ,175768 + ,171029 + ,170465 + ,170102 + ,156389 + ,124291 + ,99360 + ,86675 + ,85056 + ,128236 + ,164257 + ,162401 + ,152779 + ,156005 + ,153387 + ,153190 + ,148840 + ,144211 + ,145953 + ,145542 + ,150271 + ,147489 + ,143824 + ,134754 + ,131736 + ,126304 + ,125511 + ,125495 + ,130133 + ,126257 + ,110323 + ,98417 + ,105749 + ,120665 + ,124075 + ,127245 + ,146731 + ,144979 + ,148210 + ,144670 + ,142970 + ,142524 + ,146142 + ,146522 + ,148128 + ,148798 + ,150181 + ,152388 + ,155694 + ,160662 + ,155520 + ,158262 + ,154338 + ,158196 + ,160371 + ,154856 + ,150636 + ,145899 + ,141242 + ,140834 + ,141119 + ,139104 + ,134437 + ,129425 + ,123155 + ,119273 + ,120472 + ,121523 + ,121983 + ,123658 + ,124794 + ,124827 + ,120382 + ,117395 + ,115790 + ,114283 + ,117271 + ,117448 + ,118764 + ,120550 + ,123554 + ,125412 + ,124182 + ,119828 + ,115361 + ,114226 + ,115214 + ,115864 + ,114276 + ,113469 + ,114883 + ,114172 + ,111225 + ,112149 + ,115618 + ,118002 + ,121382 + ,120663) > 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] 178 > (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] [,10] [1,] 131676 139762 152170 135027 119610 131416 131837 145074 145568 158010 [2,] 135050 142917 136022 132911 118106 134248 125955 149812 155564 155598 [3,] 129070 144198 138142 133976 120383 134397 134187 144668 155872 154785 [4,] 137792 142648 138135 137012 133185 127728 143291 147253 156323 157294 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 162938 172552 171283 175339 173990 176199 180605 190108 195076 185508 [2,] 157283 174055 173322 173511 174777 180952 182497 193288 191563 184371 [3,] 166074 175409 170717 175839 174819 176663 187856 193230 191067 183046 [4,] 169282 173696 174229 173816 176726 182346 190020 199068 186665 175714 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [1,] 175768 156389 85056 152779 148840 150271 131736 130133 105749 146731 [2,] 171029 124291 128236 156005 144211 147489 126304 126257 120665 144979 [3,] 170465 99360 164257 153387 145953 143824 125511 110323 124075 148210 [4,] 170102 86675 162401 153190 145542 134754 125495 98417 127245 144670 [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [,39] [,40] [1,] 142970 148128 155694 154338 150636 141119 123155 121983 120382 117271 [2,] 142524 148798 160662 158196 145899 139104 119273 123658 117395 117448 [3,] 146142 150181 155520 160371 141242 134437 120472 124794 115790 118764 [4,] 146522 152388 158262 154856 140834 129425 121523 124827 114283 120550 [,41] [,42] [,43] [,44] [1,] 123554 115361 114276 111225 [2,] 125412 114226 113469 112149 [3,] 124182 115214 114883 115618 [4,] 119828 115864 114172 118002 > 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] 133397.0 142381.2 141117.2 134731.5 122821.0 131947.2 133817.5 146701.8 [9] 153331.8 156421.8 163894.2 173928.0 172387.8 174626.2 175078.0 179040.0 [17] 185244.5 193923.5 191092.8 182159.8 171841.0 116678.8 134987.5 153840.2 [25] 146136.5 144084.5 127261.5 116282.5 119433.5 146147.5 144539.5 149873.8 [33] 157534.5 156940.2 144652.8 136021.2 121105.8 123815.5 116962.5 118508.2 [41] 123244.0 115166.2 114200.0 114248.5 > arr.sd [1] 3818.0800 1872.5415 7435.7421 1748.6186 6973.7146 3129.3781 [7] 7202.4306 2363.8416 5185.2098 1487.8253 5112.1490 1177.0995 [13] 1660.8133 1137.1108 1162.9460 3071.7416 4423.3867 3737.5894 [19] 3449.3018 4413.3712 2645.6360 30740.9305 37179.4794 1465.2252 [25] 1949.6636 6757.4525 3006.8105 14674.4532 9510.4361 1647.5008 [31] 2083.5773 1881.5540 2432.8422 2855.5651 4603.2049 5212.5095 [37] 1646.6263 1337.0935 2609.8859 1515.3733 2404.5252 685.8408 [43] 579.4854 3136.5451 > arr.range [1] 8722 4436 16148 4101 15079 6669 17336 5144 10755 3225 11999 2857 [13] 3512 2328 2736 6147 9415 8960 8411 9794 5666 69714 79201 3226 [25] 4629 15517 6241 31716 21496 3540 3998 4260 5142 6033 9802 11694 [37] 3882 2844 6099 3279 5584 1638 1414 6777 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 14839.1888 -0.0687 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 16.3781 -0.7037 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 32816.9836 -0.1520 > postscript(file="/var/www/wessaorg/rcomp/tmp/124qp1305034534.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/wessaorg/rcomp/tmp/241fz1305034534.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/wessaorg/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/wessaorg/rcomp/tmp/3muh01305034534.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/wessaorg/rcomp/tmp/42f711305034534.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/wessaorg/rcomp/tmp/5mt571305034534.tab") > > try(system("convert tmp/124qp1305034534.ps tmp/124qp1305034534.png",intern=TRUE)) character(0) > try(system("convert tmp/241fz1305034534.ps tmp/241fz1305034534.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.580 0.190 1.807