R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(413491 + ,399153 + ,385939 + ,373917 + ,364635 + ,364696 + ,418358 + ,428212 + ,423730 + ,420677 + ,417428 + ,423245 + ,423113 + ,418873 + ,405733 + ,397812 + ,389918 + ,391116 + ,443814 + ,460373 + ,455422 + ,456288 + ,452233 + ,459256 + ,461146 + ,451391 + ,443101 + ,438810 + ,430457 + ,435721 + ,488280 + ,505814 + ,502338 + ,500910 + ,501434 + ,515476 + ,520862 + ,519517 + ,511805 + ,508607 + ,505327 + ,511435 + ,570158 + ,591665 + ,593572 + ,586346 + ,586063 + ,591504 + ,594033 + ,585597 + ,572450 + ,562917 + ,554675 + ,553997 + ,601310 + ,622255 + ,616735 + ,606480 + ,595079 + ,598588 + ,599917 + ,591573 + ,575489 + ,567223 + ,555338 + ,555252 + ,608249 + ,630859 + ,628632 + ,624435 + ,609670 + ,615830 + ,621170 + ,604212 + ,584348 + ,573717 + ,555234 + ,544897 + ,598866 + ,620081 + ,607699 + ,589960 + ,578665 + ,580166 + ,579457 + ,571560 + ,560460 + ,551397 + ,536763 + ,540562 + ,588184 + ,607049 + ,598968 + ,577644 + ,562640 + ,565867 + ,561274 + ,554144 + ,539900 + ,526271 + ,511841 + ,505282 + ,554083 + ,584225 + ,568858 + ,539516 + ,521612 + ,525562 + ,526519 + ,515713 + ,503454 + ,489301 + ,479020 + ,475102 + ,523682 + ,551528 + ,531626 + ,511037 + ,492417 + ,492188 + ,492865 + ,480961 + ,461935 + ,456608 + ,441977 + ,439148 + ,488180 + ,520564 + ,501492 + ,485025 + ,464196 + ,460170 + ,467037 + ,460070 + ,447988 + ,442867 + ,436087 + ,431328 + ,484015 + ,509673 + ,512927 + ,502831 + ,470984 + ,471067 + ,476049 + ,474605 + ,470439 + ,461251 + ,454724 + ,455626 + ,516847 + ,525192 + ,522975 + ,518585 + ,509239 + ,512238 + ,519164 + ,517009 + ,509933 + ,509127 + ,500857 + ,506971 + ,569323 + ,579714 + ,577992 + ,565464 + ,547344 + ,554788 + ,562325 + ,560854 + ,555332 + ,543599 + ,536662 + ,542722 + ,593530 + ,610763 + ,612613 + ,611324 + ,594167 + ,595454 + ,590865 + ,589379 + ,584428 + ,573100 + ,567456 + ,569028 + ,620735 + ,628884 + ,628232 + ,612117 + ,595404 + ,597141 + ,593408 + ,590072 + ,579799 + ,574205 + ,572775 + ,572942 + ,619567 + ,625809 + ,619916 + ,587625 + ,565742 + ,557274 + ,560576 + ,548854 + ,531673 + ,525919 + ,511038 + ,498662 + ,555362 + ,564591 + ,541657 + ,527070 + ,509846 + ,514258 + ,516922 + ,507561 + ,492622 + ,490243 + ,469357 + ,477580 + ,528379 + ,533590 + ,517945 + ,506174 + ,501866 + ,516141 + ,528222 + ,532638 + ,536322 + ,536535 + ,523597 + ,536214 + ,586570 + ,596594 + ,580523 + ,564478 + ,557560 + ,575093 + ,580112 + ,574761 + ,563250 + ,551531 + ,537034 + ,544686 + ,600991 + ,604378 + ,586111 + ,563668 + ,548604 + ,551174 + ,555654) > 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] 253 > (np <- floor(n / par1)) [1] 21 > 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,] 413491 423113 461146 520862 594033 599917 621170 579457 561274 526519 [2,] 399153 418873 451391 519517 585597 591573 604212 571560 554144 515713 [3,] 385939 405733 443101 511805 572450 575489 584348 560460 539900 503454 [4,] 373917 397812 438810 508607 562917 567223 573717 551397 526271 489301 [5,] 364635 389918 430457 505327 554675 555338 555234 536763 511841 479020 [6,] 364696 391116 435721 511435 553997 555252 544897 540562 505282 475102 [7,] 418358 443814 488280 570158 601310 608249 598866 588184 554083 523682 [8,] 428212 460373 505814 591665 622255 630859 620081 607049 584225 551528 [9,] 423730 455422 502338 593572 616735 628632 607699 598968 568858 531626 [10,] 420677 456288 500910 586346 606480 624435 589960 577644 539516 511037 [11,] 417428 452233 501434 586063 595079 609670 578665 562640 521612 492417 [12,] 423245 459256 515476 591504 598588 615830 580166 565867 525562 492188 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 492865 467037 476049 519164 562325 590865 593408 560576 516922 528222 [2,] 480961 460070 474605 517009 560854 589379 590072 548854 507561 532638 [3,] 461935 447988 470439 509933 555332 584428 579799 531673 492622 536322 [4,] 456608 442867 461251 509127 543599 573100 574205 525919 490243 536535 [5,] 441977 436087 454724 500857 536662 567456 572775 511038 469357 523597 [6,] 439148 431328 455626 506971 542722 569028 572942 498662 477580 536214 [7,] 488180 484015 516847 569323 593530 620735 619567 555362 528379 586570 [8,] 520564 509673 525192 579714 610763 628884 625809 564591 533590 596594 [9,] 501492 512927 522975 577992 612613 628232 619916 541657 517945 580523 [10,] 485025 502831 518585 565464 611324 612117 587625 527070 506174 564478 [11,] 464196 470984 509239 547344 594167 595404 565742 509846 501866 557560 [12,] 460170 471067 512238 554788 595454 597141 557274 514258 516141 575093 [,21] [1,] 580112 [2,] 574761 [3,] 563250 [4,] 551531 [5,] 537034 [6,] 544686 [7,] 600991 [8,] 604378 [9,] 586111 [10,] 563668 [11,] 548604 [12,] 551174 > 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] 402790.1 429495.9 472906.5 549738.4 588676.3 596872.2 588251.2 570045.9 [9] 541047.3 507632.2 474426.8 469739.5 491480.8 538140.5 576612.1 596397.4 [17] 588261.2 532458.8 504865.0 554528.8 567191.7 > arr.sd [1] 24181.23 28143.43 32238.49 39100.78 23069.84 27645.66 23738.74 21684.38 [9] 24045.43 23148.00 24540.07 28068.08 28234.06 30455.56 29164.69 21872.30 [17] 22629.62 21778.07 19560.16 25444.43 22153.71 > arr.range [1] 63577 70455 85019 88245 68258 75607 76273 70286 78943 76426 81416 81599 [13] 70468 78857 75951 61428 68535 65929 64233 72997 67344 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 3.256e+04 -1.282e-02 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 13.4989 -0.2547 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 79257.697 -0.011 > postscript(file="/var/wessaorg/rcomp/tmp/183mx1323167161.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/wessaorg/rcomp/tmp/238gt1323167161.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/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/wessaorg/rcomp/tmp/37ocg1323167161.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/wessaorg/rcomp/tmp/45t6f1323167161.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/wessaorg/rcomp/tmp/54a9u1323167161.tab") > > try(system("convert tmp/183mx1323167161.ps tmp/183mx1323167161.png",intern=TRUE)) character(0) > try(system("convert tmp/238gt1323167161.ps tmp/238gt1323167161.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.680 0.119 0.810