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(517,540,454,292,445,483,545,355,370,372,422,445,471,413,307,308,389,377,521,420,413,384,466,434,263,334,334,416,309,334,350,337,277,439,433,455,372,409,471,382,417,405,410,357,360,329,359,393,448,593,535,449,742,631,513,526,677,631,547,533,433,427,470,418,485,464,439,452,423,537,384,380) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 517 471 263 372 448 433 NA [2,] 540 413 334 409 593 427 NA [3,] 454 307 334 471 535 470 NA [4,] 292 308 416 382 449 418 NA [5,] 445 389 309 417 742 485 NA [6,] 483 377 334 405 631 464 NA [7,] 545 521 350 410 513 439 NA [8,] 355 420 337 357 526 452 NA [9,] 370 413 277 360 677 423 NA [10,] 372 384 439 329 631 537 NA [11,] 422 466 433 359 547 384 NA [12,] 445 434 455 393 533 380 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 23 -58 71 37 145 -6 NA [2,] -86 -106 0 62 -58 43 NA [3,] -162 1 82 -89 -86 -52 NA [4,] 153 81 -107 35 293 67 NA [5,] 38 -12 25 -12 -111 -21 NA [6,] 62 144 16 5 -118 -25 NA [7,] -190 -101 -13 -53 13 13 NA [8,] 15 -7 -60 3 151 -29 NA [9,] 2 -29 162 -31 -46 114 NA [10,] 50 82 -6 30 -84 -153 NA [11,] 23 -32 22 34 -14 -4 NA [12,] 26 -171 -83 55 -100 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/rcomp/tmp/1idyu1244393916.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/rcomp/tmp/27bt81244393916.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/rcomp/tmp/3ekx41244393916.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/rcomp/tmp/4njsw1244393916.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,] 263.0 334 307 292 309 334.0 350 337.0 277.0 329.0 359.0 380.0 [2,] 372.0 409 334 308 389 377.0 410 355.0 360.0 372.0 384.0 393.0 [3,] 440.5 420 462 399 431 434.5 476 388.5 391.5 411.5 427.5 439.5 [4,] 471.0 540 471 418 485 483.0 521 452.0 423.0 537.0 466.0 455.0 [5,] 517.0 593 535 449 485 631.0 545 526.0 423.0 631.0 547.0 533.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 376.6418 335.5008 373.6306 328.0464 369.0769 366.1266 404.4014 325.9319 [2,] 504.3582 504.4992 550.3694 469.9536 492.9231 502.8734 547.5986 451.0681 [,9] [,10] [,11] [,12] [1,] 350.863 305.0697 374.6074 399.508 [2,] 432.137 517.9303 480.3926 479.492 $out [1] 742 677 $group [1] 5 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(263, 372, 440.5, 471, 517, 334, 409, 420, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50ncx1244393916.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,] -58 -106 -162 -107 -21 -118.0 -190 -60 -46.0 -153 -32 -171 [2,] -6 -86 -89 35 -21 -25.0 -101 -29 -31.0 -84 -14 -100 [3,] 30 -29 -69 74 -12 10.5 -33 -2 -13.5 12 9 -83 [4,] 71 43 1 153 25 62.0 13 15 114.0 50 23 26 [5,] 145 62 82 293 38 144.0 13 15 162.0 82 34 55 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -19.66749 -112.20917 -127.05291 -2.113811 -41.67149 -45.61781 -106.53368 [2,] 79.66749 54.20917 -10.94709 150.113811 17.67149 66.61781 40.53368 [,8] [,9] [,10] [,11] [,12] [1,] -30.38142 -107.02968 -74.43433 -14.86620 -172.031283 [2,] 26.38142 80.02968 98.43433 32.86620 6.031283 $out [1] -111 151 $group [1] 5 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-58, -6, 30, 71, 145, -106, -86, -29, 43, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6jmee1244393916.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] [,7] [1,] 292 307.0 263.0 329.0 448.0 380.0 NA [2,] 371 380.5 321.5 359.5 519.5 420.5 NA [3,] 445 413.0 335.5 387.5 541.0 436.0 NA [4,] 500 450.0 424.5 409.5 631.0 467.0 NA [5,] 545 521.0 455.0 471.0 742.0 485.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 386.1622 381.3006 288.521 364.6947 490.1441 414.791 NA [2,] 503.8378 444.6994 382.479 410.3053 591.8559 457.209 NA $out [1] 537 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(292, 371, 445, 500, 545, 307, 380.5, 413, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7uk0g1244393916.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,] 377.5000 388.50 372.0000 [2,] 418.6667 405.25 408.5625 [3,] 437.5833 429.25 427.0625 [4,] 450.8333 440.00 439.6250 [5,] 464.5000 476.00 468.1250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 422.9119 413.4003 412.8947 [2,] 452.2548 445.0997 441.2303 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(377.5, 418.666666666667, 437.583333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1idyu1244393916.ps tmp/1idyu1244393916.png") > system("convert tmp/27bt81244393916.ps tmp/27bt81244393916.png") > system("convert tmp/3ekx41244393916.ps tmp/3ekx41244393916.png") > system("convert tmp/4njsw1244393916.ps tmp/4njsw1244393916.png") > system("convert tmp/50ncx1244393916.ps tmp/50ncx1244393916.png") > system("convert tmp/6jmee1244393916.ps tmp/6jmee1244393916.png") > system("convert tmp/7uk0g1244393916.ps tmp/7uk0g1244393916.png") > > > proc.time() user system elapsed 1.204 0.939 1.560