R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(348542 + ,335658 + ,330664 + ,326814 + ,322900 + ,322310 + ,385164 + ,404861 + ,412136 + ,411057 + ,410040 + ,414980 + ,413626 + ,411062 + ,408352 + ,409780 + ,411318 + ,415555 + ,479481 + ,497826 + ,501638 + ,497990 + ,499287 + ,506247 + ,510401 + ,508642 + ,501805 + ,495476 + ,490336 + ,490042 + ,553155 + ,569999 + ,573170 + ,571687 + ,575453 + ,580177 + ,579849 + ,574346 + ,563325 + ,555604 + ,545544 + ,545109 + ,605181 + ,627856 + ,631421 + ,625671 + ,613577 + ,606463 + ,601676 + ,589121 + ,573559 + ,558487 + ,552148 + ,545720 + ,606569 + ,636067 + ,630704 + ,623275 + ,617771 + ,605401 + ,619393 + ,596019 + ,569977 + ,546213 + ,528492 + ,505944 + ,554910 + ,567831 + ,564021 + ,552800 + ,541102 + ,542378 + ,540380 + ,521219 + ,504652 + ,490626 + ,481686 + ,477930 + ,522605 + ,531432 + ,532355 + ,539954 + ,524987 + ,533307 + ,530541 + ,508392 + ,495208 + ,482223 + ,470495 + ,466106 + ,515037 + ,517752 + ,515565 + ,510727 + ,499725 + ,498369 + ,493756 + ,476141 + ,458458 + ,443182 + ,429597 + ,424476 + ,476257 + ,480555 + ,469762 + ,459820 + ,451028 + ,450065 + ,444385 + ,428846 + ,421020 + ,399778 + ,389005 + ,384018 + ,431933 + ,445844 + ,431464 + ,423263 + ,415881 + ,416208 + ,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) > 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] 312 > (np <- floor(n / par1)) [1] 26 > 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,] 348542 413626 510401 579849 601676 619393 540380 530541 493756 444385 [2,] 335658 411062 508642 574346 589121 596019 521219 508392 476141 428846 [3,] 330664 408352 501805 563325 573559 569977 504652 495208 458458 421020 [4,] 326814 409780 495476 555604 558487 546213 490626 482223 443182 399778 [5,] 322900 411318 490336 545544 552148 528492 481686 470495 429597 389005 [6,] 322310 415555 490042 545109 545720 505944 477930 466106 424476 384018 [7,] 385164 479481 553155 605181 606569 554910 522605 515037 476257 431933 [8,] 404861 497826 569999 627856 636067 567831 531432 517752 480555 445844 [9,] 412136 501638 573170 631421 630704 564021 532355 515565 469762 431464 [10,] 411057 497990 571687 625671 623275 552800 539954 510727 459820 423263 [11,] 410040 499287 575453 613577 617771 541102 524987 499725 451028 415881 [12,] 414980 506247 580177 606463 605401 542378 533307 498369 450065 416208 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [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 [,21] [,22] [,23] [,24] [,25] [,26] [1,] 492865 467037 476049 519164 562325 590865 [2,] 480961 460070 474605 517009 560854 589379 [3,] 461935 447988 470439 509933 555332 584428 [4,] 456608 442867 461251 509127 543599 573100 [5,] 441977 436087 454724 500857 536662 567456 [6,] 439148 431328 455626 506971 542722 569028 [7,] 488180 484015 516847 569323 593530 620735 [8,] 520564 509673 525192 579714 610763 628884 [9,] 501492 512927 522975 577992 612613 628232 [10,] 485025 502831 518585 565464 611324 612117 [11,] 464196 470984 509239 547344 594167 595404 [12,] 460170 471067 512238 554788 595454 597141 > 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] 368760.5 454346.8 535028.6 589495.5 595041.5 557423.3 516761.1 500845.0 [9] 459424.8 419303.8 402790.1 429495.9 472906.5 549738.4 588676.3 596872.2 [17] 588251.2 570045.9 541047.3 507632.2 474426.8 469739.5 491480.8 538140.5 [25] 576612.1 596397.4 > arr.sd [1] 40518.50 45092.20 38156.16 32627.06 31127.49 29806.29 22396.05 19665.99 [9] 20952.06 19808.52 24181.23 28143.43 32238.49 39100.78 23069.84 27645.66 [17] 23738.74 21684.38 24045.43 23148.00 24540.07 28068.08 28234.06 30455.56 [25] 29164.69 21872.30 > arr.range [1] 92670 97895 90135 86312 90347 113449 62450 64435 69280 61826 [11] 63577 70455 85019 88245 68258 75607 76273 70286 78943 76426 [21] 81416 81599 70468 78857 75951 61428 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 3.475e+04 -1.300e-02 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 12.3903 -0.1654 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 7.111e+04 1.365e-02 > postscript(file="/var/www/rcomp/tmp/1ehmk1322904436.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/rcomp/tmp/20qz31322904436.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3rquv1322904437.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/rcomp/tmp/4zp1a1322904437.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/rcomp/tmp/5l2p81322904437.tab") > > try(system("convert tmp/1ehmk1322904436.ps tmp/1ehmk1322904436.png",intern=TRUE)) character(0) > try(system("convert tmp/20qz31322904436.ps tmp/20qz31322904436.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.070 0.130 1.189