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(15136 + ,16733 + ,20016 + ,17708 + ,18019 + ,19227 + ,22893 + ,23739 + ,21133 + ,22591 + ,26786 + ,29740 + ,15028 + ,17977 + ,20008 + ,21354 + ,19498 + ,22125 + ,25817 + ,28779 + ,20960 + ,22254 + ,27392 + ,29945 + ,16933 + ,17892 + ,20533 + ,23569 + ,22417 + ,22084 + ,26580 + ,27454 + ,24081 + ,23451 + ,28991 + ,31386 + ,16896 + ,20045 + ,23471 + ,21747 + ,25621 + ,23859 + ,25500 + ,30998 + ,24475 + ,23145 + ,29701 + ,34365 + ,17556 + ,22077 + ,25702 + ,22214 + ,26886 + ,23191 + ,27831 + ,35406 + ,23195 + ,25110 + ,30009 + ,36242 + ,18450 + ,21845 + ,26488 + ,22394 + ,28057 + ,25451 + ,24872 + ,33424 + ,24052 + ,28449 + ,33533 + ,37351 + ,19969 + ,21701 + ,26249 + ,24493 + ,24603 + ,26485 + ,30723 + ,34569 + ,26689 + ,26157 + ,32064 + ,38870 + ,21337 + ,19419 + ,23166 + ,28286 + ,24570 + ,24001 + ,33151 + ,24878 + ,26804 + ,28967 + ,33311 + ,40226 + ,20504 + ,23060 + ,23562 + ,27562 + ,23940 + ,24584 + ,34303 + ,25517 + ,23494 + ,29095 + ,32903 + ,34379 + ,16991 + ,21109 + ,23740 + ,25552 + ,21752 + ,20294 + ,29009 + ,25500 + ,24166 + ,26960 + ,31222 + ,38641 + ,14672 + ,17543 + ,25453 + ,32683 + ,22449 + ,22316 + ,27595 + ,25451 + ,25421 + ,25288 + ,32568 + ,35110 + ,16052 + ,22146 + ,21198 + ,19543 + ,22084 + ,23816 + ,29961 + ,26773 + ,26635 + ,26972 + ,30207 + ,38687 + ,16974 + ,21697 + ,24179 + ,23757 + ,25013 + ,24019 + ,30345 + ,24488 + ,25156 + ,25650 + ,30923 + ,37240 + ,17466 + ,19463 + ,24352 + ,26805 + ,25236 + ,24735 + ,29356 + ,31234 + ,22724 + ,28496 + ,32857 + ,37198 + ,13652 + ,22784 + ,23565 + ,26323 + ,23779 + ,27549 + ,29660 + ,23356) > 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] 176 > (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] [,11] [,12] [1,] 15136 18019 21133 15028 19498 20960 16933 22417 24081 16896 25621 24475 [2,] 16733 19227 22591 17977 22125 22254 17892 22084 23451 20045 23859 23145 [3,] 20016 22893 26786 20008 25817 27392 20533 26580 28991 23471 25500 29701 [4,] 17708 23739 29740 21354 28779 29945 23569 27454 31386 21747 30998 34365 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 17556 26886 23195 18450 28057 24052 19969 24603 26689 21337 24570 26804 [2,] 22077 23191 25110 21845 25451 28449 21701 26485 26157 19419 24001 28967 [3,] 25702 27831 30009 26488 24872 33533 26249 30723 32064 23166 33151 33311 [4,] 22214 35406 36242 22394 33424 37351 24493 34569 38870 28286 24878 40226 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [1,] 20504 23940 23494 16991 21752 24166 14672 22449 25421 16052 22084 26635 [2,] 23060 24584 29095 21109 20294 26960 17543 22316 25288 22146 23816 26972 [3,] 23562 34303 32903 23740 29009 31222 25453 27595 32568 21198 29961 30207 [4,] 27562 25517 34379 25552 25500 38641 32683 25451 35110 19543 26773 38687 [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [1,] 16974 25013 25156 17466 25236 22724 13652 23779 [2,] 21697 24019 25650 19463 24735 28496 22784 27549 [3,] 24179 30345 30923 24352 29356 32857 23565 29660 [4,] 23757 24488 37240 26805 31234 37198 26323 23356 > 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] 17398.25 20969.50 25062.50 18591.75 24054.75 25137.75 19731.75 24633.75 [9] 26977.25 20539.75 26494.50 27921.50 21887.25 28328.50 28639.00 22294.25 [17] 27951.00 30846.25 23103.00 29095.00 30945.00 23052.00 26650.00 32327.00 [25] 23672.00 27086.00 29967.75 21848.00 24138.75 30247.25 22587.75 24452.75 [33] 29596.75 19734.75 25658.50 30625.25 21651.75 25966.25 29742.25 22021.50 [41] 27640.25 30318.75 21581.00 26086.00 > arr.sd [1] 2041.967 2775.592 3932.715 2751.607 4078.887 4241.105 2976.809 2778.303 [9] 3843.391 2803.056 3108.022 5143.884 3339.402 5125.532 5824.474 3295.329 [17] 3902.786 5814.896 2805.766 4457.399 5918.791 3809.972 4349.199 5920.461 [25] 2918.617 4854.694 4856.128 3716.443 3917.951 6303.248 8128.803 2546.301 [33] 5007.543 2680.463 3460.514 5610.558 3301.639 2947.267 5638.872 4305.485 [41] 3166.477 6185.182 5499.669 3038.036 > arr.range [1] 4880 5720 8607 6326 9281 8985 6636 5370 7935 6575 7139 11220 [13] 8146 12215 13047 8038 8552 13299 6280 9966 12713 8867 9150 13422 [25] 7058 10363 10885 8561 8715 14475 18011 5279 9822 6094 7877 12052 [37] 7205 6326 12084 9339 6499 14474 12671 6304 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean -1419.0665 0.2198 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) -5.565 1.367 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean -2529.4380 0.4634 > postscript(file="/var/www/html/rcomp/tmp/1dqg91273508197.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/2ozfu1273508197.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/3rie01273508197.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/4d0c51273508197.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/5g1tb1273508197.tab") > > try(system("convert tmp/1dqg91273508197.ps tmp/1dqg91273508197.png",intern=TRUE)) character(0) > try(system("convert tmp/2ozfu1273508197.ps tmp/2ozfu1273508197.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.529 0.284 0.807