R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(493.000,481.000,462.000,457.000,442.000,439.000,488.000,521.000,501.000,485.000,464.000,460.000,467.000,460.000,448.000,443.000,436.000,431.000,484.000,510.000,513.000,503.000,471.000,471.000,476.000,475.000,470.000,461.000,455.000,456.000,517.000,525.000,523.000,519.000,509.000,512.000,519.000,517.000,510.000,509.000,501.000,507.000,569.000,580.000,578.000,565.000,547.000,555.000,562.000,561.000,555.000,544.000,537.000,543.000,594.000,611.000,613.000,611.000,594.000,595.000) > 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] 60 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[i] + if (j == par1) j = 0 + } > ari [1] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 493 467 476 519 562 NA [2,] 481 460 475 517 561 NA [3,] 462 448 470 510 555 NA [4,] 457 443 461 509 544 NA [5,] 442 436 455 501 537 NA [6,] 439 431 456 507 543 NA [7,] 488 484 517 569 594 NA [8,] 521 510 525 580 611 NA [9,] 501 513 523 578 613 NA [10,] 485 503 519 565 611 NA [11,] 464 471 509 547 594 NA [12,] 460 471 512 555 595 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -12 -7 -1 -2 -1 NA [2,] -19 -12 -5 -7 -6 NA [3,] -5 -5 -9 -1 -11 NA [4,] -15 -7 -6 -8 -7 NA [5,] -3 -5 1 6 6 NA [6,] 49 53 61 62 51 NA [7,] 33 26 8 11 17 NA [8,] -20 3 -2 -2 2 NA [9,] -16 -10 -4 -13 -2 NA [10,] -21 -32 -10 -18 -17 NA [11,] -4 0 3 8 1 NA [12,] 7 5 7 7 NA NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/www/html/freestat/rcomp/tmp/1pe6b1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/2o8om1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3dxu41228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/4p88u1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 467 460 448 443 436 431 484 510 501 485 464 460 [2,] 476 475 462 457 442 439 488 521 513 503 471 471 [3,] 493 481 470 461 455 456 517 525 523 519 509 512 [4,] 519 517 510 509 501 507 569 580 578 565 547 555 [5,] 562 561 555 544 537 543 594 611 613 611 594 595 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 462.6163 451.3229 436.0833 424.2569 413.3107 407.9514 459.7656 483.3107 [2,] 523.3837 510.6771 503.9167 497.7431 496.6893 504.0486 574.2344 566.6893 [,9] [,10] [,11] [,12] [1,] 477.0712 475.191 455.2986 452.6458 [2,] 568.9288 562.809 562.7014 571.3542 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(467, 476, 493, 519, 562, 460, 475, 481, 517, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/54idd1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] -12 -19 -11 -8 -5 49 8 -2 -16 -21 -4 5 [2,] -7 -12 -9 -8 -3 51 11 -2 -13 -21 0 6 [3,] -2 -7 -5 -7 1 53 17 -2 -10 -18 1 7 [4,] -1 -6 -5 -7 6 61 26 2 -4 -17 3 7 [5,] -1 -5 -1 -6 6 62 33 3 -2 -17 3 7 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -6.239585 -11.239585 -7.82639 -7.706597 -5.359377 45.93403 6.401038 [2,] 2.239585 -2.760415 -2.17361 -6.293403 7.359377 60.06597 27.598962 [,8] [,9] [,10] [,11] [,12] [1,] -4.82639 -16.359377 -20.82639 -1.119792 6.21 [2,] 0.82639 -3.640623 -15.17361 3.119792 7.79 $out [1] -15 -20 -32 -10 8 $group [1] 4 8 10 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-12, -7, -2, -1, -1, -19, -12, -7, -6, -5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6qgqa1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] 439.0 431.0 455.0 501.0 537.0 NA [2,] 458.5 445.5 465.5 509.5 549.5 NA [3,] 472.5 469.0 492.5 533.0 578.0 NA [4,] 490.5 493.5 518.0 567.0 603.0 NA [5,] 521.0 513.0 525.0 580.0 613.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 457.9046 447.1069 468.5544 506.7739 553.5983 NA [2,] 487.0954 490.8931 516.4456 559.2261 602.4017 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(439, 458.5, 472.5, 490.5, 521, 431, 445.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7h0rn1228765500.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 474.2 455.0 471.50 [2,] 485.9 465.5 484.50 [3,] 510.2 501.0 503.25 [4,] 533.5 518.0 531.25 [5,] 549.4 525.0 550.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 488.4893 477.0544 481.927 [2,] 531.9107 524.9456 524.573 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(474.2, 485.9, 510.2, 533.5, 549.4, 455, 465.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1pe6b1228765500.ps tmp/1pe6b1228765500.png") > system("convert tmp/2o8om1228765500.ps tmp/2o8om1228765500.png") > system("convert tmp/3dxu41228765500.ps tmp/3dxu41228765500.png") > system("convert tmp/4p88u1228765500.ps tmp/4p88u1228765500.png") > system("convert tmp/54idd1228765500.ps tmp/54idd1228765500.png") > system("convert tmp/6qgqa1228765500.ps tmp/6qgqa1228765500.png") > system("convert tmp/7h0rn1228765500.ps tmp/7h0rn1228765500.png") > > > proc.time() user system elapsed 1.852 1.457 2.127