R version 2.10.1 (2009-12-14) 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 + ,594 + ,586 + ,586 + ,572 + ,572 + ,563 + ,563 + ,555 + ,555 + ,554 + ,554 + ,601 + ,601 + ,622 + ,622 + ,617 + ,617 + ,606 + ,606 + ,595 + ,595 + ,599 + ,599 + ,600 + ,600 + ,592 + ,592 + ,575 + ,575 + ,567 + ,567 + ,555 + ,555 + ,555 + ,555 + ,608 + ,608 + ,631 + ,631 + ,629 + ,629 + ,624 + ,624 + ,610 + ,610 + ,616 + ,616 + ,621 + ,621 + ,604 + ,604 + ,584 + ,584 + ,574 + ,574 + ,555 + ,555 + ,545 + ,545 + ,599 + ,599 + ,620 + ,620 + ,608 + ,608 + ,590 + ,590 + ,579 + ,579 + ,580 + ,580 + ,579 + ,579 + ,572 + ,572 + ,560 + ,560 + ,551 + ,551 + ,537 + ,537 + ,541 + ,541 + ,588 + ,588 + ,607 + ,607 + ,599 + ,599 + ,578 + ,578 + ,563 + ,563 + ,566 + ,566 + ,561 + ,561 + ,554 + ,554 + ,540 + ,540 + ,526 + ,526 + ,512 + ,512 + ,505 + ,505 + ,554 + ,554 + ,584 + ,584 + ,569 + ,569 + ,540 + ,540 + ,522 + ,522 + ,526 + ,526 + ,527 + ,527 + ,516 + ,516 + ,503 + ,503 + ,489 + ,489 + ,479 + ,479 + ,475 + ,475 + ,524 + ,524 + ,552 + ,552 + ,532 + ,532 + ,511 + ,511 + ,492 + ,492 + ,492 + ,492 + ,493 + ,493 + ,481 + ,481 + ,462 + ,462 + ,457 + ,457 + ,442 + ,442 + ,439 + ,439 + ,488 + ,488 + ,521 + ,521 + ,501 + ,501 + ,485 + ,485 + ,464 + ,464 + ,460 + ,460 + ,467 + ,467 + ,460 + ,460 + ,448 + ,448 + ,443 + ,443 + ,436 + ,436 + ,431 + ,431 + ,484 + ,484 + ,510 + ,510 + ,513 + ,513 + ,503 + ,503 + ,471 + ,471 + ,471 + ,471 + ,476 + ,476 + ,475 + ,475 + ,470 + ,470 + ,461 + ,461 + ,455 + ,455 + ,456 + ,456 + ,517 + ,517 + ,525 + ,525 + ,523 + ,523 + ,519 + ,519 + ,509 + ,509 + ,512 + ,512 + ,519 + ,519 + ,517 + ,517 + ,510 + ,510 + ,509 + ,509 + ,501 + ,501 + ,507 + ,507 + ,569 + ,569 + ,580 + ,580 + ,578 + ,578 + ,565 + ,565 + ,547 + ,547 + ,555 + ,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 + ,575 + ,580 + ,575 + ,563 + ,552 + ,537 + ,545 + ,601 + ,604 + ,586 + ,564 + ,549 + ,551) > 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] 492 > (np <- floor(n / par1)) [1] 41 > 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 601 600 608 621 599 579 588 561 554 527 [2,] 520 594 601 600 608 621 599 579 588 561 554 527 [3,] 512 586 622 592 631 604 620 572 607 554 584 516 [4,] 509 586 622 592 631 604 620 572 607 554 584 516 [5,] 505 572 617 575 629 584 608 560 599 540 569 503 [6,] 511 572 617 575 629 584 608 560 599 540 569 503 [7,] 570 563 606 567 624 574 590 551 578 526 540 489 [8,] 592 563 606 567 624 574 590 551 578 526 540 489 [9,] 594 555 595 555 610 555 579 537 563 512 522 479 [10,] 586 555 595 555 610 555 579 537 563 512 522 479 [11,] 586 554 599 555 616 545 580 541 566 505 526 475 [12,] 592 554 599 555 616 545 580 541 566 505 526 475 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 524 493 488 467 484 476 517 519 569 562 591 593 [2,] 524 493 488 467 484 476 517 519 569 561 589 590 [3,] 552 481 521 460 510 475 525 517 580 555 584 580 [4,] 552 481 521 460 510 475 525 517 580 544 573 574 [5,] 532 462 501 448 513 470 523 510 578 537 567 573 [6,] 532 462 501 448 513 470 523 510 578 543 569 573 [7,] 511 457 485 443 503 461 519 509 565 594 621 620 [8,] 511 457 485 443 503 461 519 509 565 611 629 626 [9,] 492 442 464 436 471 455 509 501 547 613 628 620 [10,] 492 442 464 436 471 455 509 501 547 611 612 588 [11,] 492 439 460 431 471 456 512 507 555 594 595 566 [12,] 492 439 460 431 471 456 512 507 555 595 597 557 [,38] [,39] [,40] [,41] [1,] 561 517 528 580 [2,] 549 508 533 575 [3,] 532 493 536 563 [4,] 526 490 537 552 [5,] 511 469 524 537 [6,] 499 478 536 545 [7,] 555 528 587 601 [8,] 565 534 597 604 [9,] 542 518 581 586 [10,] 527 506 564 564 [11,] 510 502 558 549 [12,] 514 516 575 551 > 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 570.6667 606.6667 [17] 574.0000 619.6667 580.5000 596.0000 556.6667 583.5000 533.0000 549.1667 [25] 498.1667 517.1667 462.3333 486.5000 447.5000 492.0000 465.5000 517.5000 [33] 510.5000 565.6667 576.6667 596.2500 588.3333 532.5833 504.9167 554.6667 [41] 567.2500 > arr.sd [1] 40.433634 45.048122 38.170570 32.581367 31.157834 29.797295 22.189781 [8] 19.889848 21.051704 19.748993 24.015620 27.975503 32.176007 39.158961 [15] 15.744167 10.174240 17.949424 9.316001 27.493801 15.433140 16.007574 [22] 16.892710 21.523771 23.311462 19.821170 22.501852 20.339542 21.798666 [29] 13.221883 18.250778 8.959505 5.900693 6.317364 12.294369 29.105867 [36] 21.975710 22.712965 21.831830 19.579481 25.535477 22.017039 > arr.range [1] 93 98 90 86 90 113 62 65 70 62 63 70 85 89 40 27 45 23 76 [20] 41 42 44 56 62 52 60 54 61 36 42 21 16 18 33 76 62 69 66 [39] 65 73 67 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 37.38113 -0.02898 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 6.9110 -0.6242 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 86.01376 -0.04946 > postscript(file="/var/yougetitorg/rcomp/tmp/1mlht1296569144.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/yougetitorg/rcomp/tmp/2yhty1296569144.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/yougetitorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/yougetitorg/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/yougetitorg/rcomp/tmp/35b6s1296569144.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/yougetitorg/rcomp/tmp/4tyll1296569144.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/yougetitorg/rcomp/tmp/5edat1296569144.tab") > > try(system("convert tmp/1mlht1296569144.ps tmp/1mlht1296569144.png",intern=TRUE)) character(0) > try(system("convert tmp/2yhty1296569144.ps tmp/2yhty1296569144.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.720 0.440 0.946