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(349 + ,336 + ,331 + ,327 + ,323 + ,322 + ,385 + ,405 + ,412 + ,411 + ,410 + ,415 + ,414 + ,411 + ,408 + ,410 + ,411 + ,416 + ,479 + ,498 + ,502 + ,498 + ,499 + ,506 + ,510 + ,509 + ,502 + ,495 + ,490 + ,490 + ,553 + ,570 + ,573 + ,572 + ,575 + ,580 + ,580 + ,574 + ,563 + ,556 + ,546 + ,545 + ,605 + ,628 + ,631 + ,626 + ,614 + ,606 + ,602 + ,589 + ,574 + ,558 + ,552 + ,546 + ,607 + ,636 + ,631 + ,623 + ,618 + ,605 + ,619 + ,596 + ,570 + ,546 + ,528 + ,506 + ,555 + ,568 + ,564 + ,553 + ,541 + ,542 + ,540 + ,521 + ,505 + ,491 + ,482 + ,478 + ,523 + ,531 + ,532 + ,540 + ,525 + ,533 + ,531 + ,508 + ,495 + ,482 + ,470 + ,466 + ,515 + ,518 + ,516 + ,511 + ,500 + ,498 + ,494 + ,476 + ,458 + ,443 + ,430 + ,424 + ,476 + ,481 + ,470 + ,460 + ,451 + ,450 + ,444 + ,429 + ,421 + ,400 + ,389 + ,384 + ,432 + ,446 + ,431 + ,423 + ,416 + ,416 + ,413 + ,399 + ,386 + ,374 + ,365 + ,365 + ,418 + ,428 + ,424 + ,421 + ,417 + ,423 + ,423 + ,419 + ,406 + ,398 + ,390 + ,391 + ,444 + ,460 + ,455 + ,456 + ,452 + ,459 + ,461 + ,451 + ,443 + ,439 + ,430 + ,436 + ,488 + ,506 + ,502 + ,501 + ,501 + ,515 + ,521 + ,520 + ,512 + ,509 + ,505 + ,511 + ,570 + ,592 + ,594 + ,586 + ,586 + ,592 + ,594 + ,586 + ,572 + ,563 + ,555 + ,554 + ,601 + ,622 + ,617 + ,606 + ,595 + ,599 + ,600 + ,592 + ,575 + ,567 + ,555 + ,555 + ,608 + ,631 + ,629 + ,624 + ,610 + ,616 + ,621 + ,604 + ,584 + ,574 + ,555 + ,545 + ,599 + ,620 + ,608 + ,590 + ,579 + ,580 + ,579 + ,572 + ,560 + ,551 + ,537 + ,541 + ,588 + ,607 + ,599 + ,578 + ,563 + ,566 + ,561 + ,554 + ,540 + ,526 + ,512 + ,505 + ,554 + ,584 + ,569 + ,540 + ,522 + ,526 + ,527 + ,516 + ,503 + ,489 + ,479 + ,475 + ,524 + ,552 + ,532 + ,511 + ,492 + ,492 + ,493 + ,481 + ,462 + ,457 + ,442 + ,439 + ,488 + ,521 + ,501 + ,485 + ,464 + ,460 + ,467 + ,460 + ,448 + ,443 + ,436 + ,431 + ,484 + ,510 + ,513 + ,503 + ,471 + ,471 + ,476 + ,475 + ,470 + ,461 + ,455 + ,456 + ,517 + ,525 + ,523 + ,519 + ,509 + ,512 + ,519 + ,517 + ,510 + ,509 + ,501 + ,507 + ,569 + ,580 + ,578 + ,565 + ,547 + ,555 + ,562 + ,561 + ,555 + ,544 + ,537 + ,543 + ,594 + ,611 + ,613 + ,611 + ,594 + ,595 + ,591 + ,589 + ,584 + ,573 + ,567 + ,569 + ,621 + ,629 + ,628 + ,612 + ,595 + ,597 + ,593 + ,590 + ,580 + ,574 + ,573 + ,573 + ,620 + ,626 + ,620 + ,588 + ,566 + ,557 + ,561 + ,549 + ,532 + ,526 + ,511 + ,499 + ,555 + ,565 + ,542 + ,527 + ,510 + ,514 + ,517 + ,508 + ,493 + ,490 + ,469 + ,478 + ,528 + ,534 + ,518 + ,506 + ,502 + ,516 + ,528 + ,533 + ,536 + ,537 + ,524 + ,536 + ,587 + ,597 + ,581 + ,564 + ,558) > 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] 359 > (np <- floor(n / par1)) [1] 29 > 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] [,13] [1,] 349 414 510 580 602 619 540 531 494 444 413 423 461 [2,] 336 411 509 574 589 596 521 508 476 429 399 419 451 [3,] 331 408 502 563 574 570 505 495 458 421 386 406 443 [4,] 327 410 495 556 558 546 491 482 443 400 374 398 439 [5,] 323 411 490 546 552 528 482 470 430 389 365 390 430 [6,] 322 416 490 545 546 506 478 466 424 384 365 391 436 [7,] 385 479 553 605 607 555 523 515 476 432 418 444 488 [8,] 405 498 570 628 636 568 531 518 481 446 428 460 506 [9,] 412 502 573 631 631 564 532 516 470 431 424 455 502 [10,] 411 498 572 626 623 553 540 511 460 423 421 456 501 [11,] 410 499 575 614 618 541 525 500 451 416 417 452 501 [12,] 415 506 580 606 605 542 533 498 450 416 423 459 515 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 521 594 600 621 579 561 527 493 467 476 519 562 [2,] 520 586 592 604 572 554 516 481 460 475 517 561 [3,] 512 572 575 584 560 540 503 462 448 470 510 555 [4,] 509 563 567 574 551 526 489 457 443 461 509 544 [5,] 505 555 555 555 537 512 479 442 436 455 501 537 [6,] 511 554 555 545 541 505 475 439 431 456 507 543 [7,] 570 601 608 599 588 554 524 488 484 517 569 594 [8,] 592 622 631 620 607 584 552 521 510 525 580 611 [9,] 594 617 629 608 599 569 532 501 513 523 578 613 [10,] 586 606 624 590 578 540 511 485 503 519 565 611 [11,] 586 595 610 579 563 522 492 464 471 509 547 594 [12,] 592 599 616 580 566 526 492 460 471 512 555 595 [,26] [,27] [,28] [,29] [1,] 591 593 561 517 [2,] 589 590 549 508 [3,] 584 580 532 493 [4,] 573 574 526 490 [5,] 567 573 511 469 [6,] 569 573 499 478 [7,] 621 620 555 528 [8,] 629 626 565 534 [9,] 628 620 542 518 [10,] 612 588 527 506 [11,] 595 566 510 502 [12,] 597 557 514 516 > 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] 368.8333 454.3333 534.9167 589.5000 595.0833 557.3333 516.7500 500.8333 [9] 459.4167 419.2500 402.7500 429.4167 472.7500 549.8333 588.6667 596.8333 [17] 588.2500 570.0833 541.0833 507.6667 474.4167 469.7500 491.5000 538.0833 [25] 576.6667 596.2500 588.3333 532.5833 504.9167 > arr.sd [1] 40.43363 45.04812 38.17057 32.58137 31.15783 29.79729 22.18978 19.88985 [9] 21.05170 19.74899 24.01562 27.97550 32.17601 39.15896 23.00329 27.80724 [17] 23.71852 21.61421 23.97142 23.41069 24.57071 28.17841 28.19574 30.42265 [25] 29.10587 21.97571 22.71297 21.83183 19.57948 > arr.range [1] 93 98 90 86 90 113 62 65 70 62 63 70 85 89 68 76 76 70 79 [20] 77 82 82 70 79 76 62 69 66 65 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 35.15752 -0.01506 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 4.5862 -0.2088 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 73.482445 0.006793 > postscript(file="/var/www/html/rcomp/tmp/1w3me1260564096.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/2kcd51260564096.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/3dn4h1260564096.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/4ipn61260564096.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/5jjsc1260564096.tab") > > system("convert tmp/1w3me1260564096.ps tmp/1w3me1260564096.png") > system("convert tmp/2kcd51260564096.ps tmp/2kcd51260564096.png") > > > proc.time() user system elapsed 0.536 0.276 0.658