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(129,132,182,144,153,162,105,132,125,121,131,97,132,180,141,162,153,130,78,94,83,80,94,53,88,113,139,72,75,91,69,71,91,94,95,82,108,102,128,77,98,84,57,70,71,76,78,52,63,69,74,102,89,95,78,80,94,128,81,84) > 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,] 129 132 88 108 63 NA [2,] 132 180 113 102 69 NA [3,] 182 141 139 128 74 NA [4,] 144 162 72 77 102 NA [5,] 153 153 75 98 89 NA [6,] 162 130 91 84 95 NA [7,] 105 78 69 57 78 NA [8,] 132 94 71 70 80 NA [9,] 125 83 91 71 94 NA [10,] 121 80 94 76 128 NA [11,] 131 94 95 78 81 NA [12,] 97 53 82 52 84 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3 48 25 -6 6 NA [2,] 50 -39 26 26 5 NA [3,] -38 21 -67 -51 28 NA [4,] 9 -9 3 21 -13 NA [5,] 9 -23 16 -14 6 NA [6,] -57 -52 -22 -27 -17 NA [7,] 27 16 2 13 2 NA [8,] -7 -11 20 1 14 NA [9,] -4 -3 3 5 34 NA [10,] 10 14 1 2 -47 NA [11,] -34 -41 -13 -26 3 NA [12,] 35 35 26 11 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/1erhz1258144160.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/2bwlo1258144160.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/3ne041258144160.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/4k9wu1258144160.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,] 63 69 128 72 75 84 57 70 71 76 78 52 [2,] 88 102 128 77 89 91 69 71 83 80 81 53 [3,] 108 113 139 102 98 95 78 80 91 94 94 82 [4,] 129 132 141 144 153 130 78 94 94 121 95 84 [5,] 132 132 141 162 153 162 78 94 94 128 95 97 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 79.0295 91.80208 129.8142 54.65797 52.77776 67.4427 71.64062 63.74826 [2,] 136.9705 134.19792 148.1858 149.34203 143.22224 122.5573 84.35938 96.25174 [,9] [,10] [,11] [,12] [1,] 83.22743 65.0295 84.10764 60.09548 [2,] 98.77257 122.9705 103.89236 103.90452 $out [1] 180 182 74 105 132 125 131 $group [1] 2 3 3 7 8 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(63, 88, 108, 129, 132, 69, 102, 113, 132, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5ku9b1258144160.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,] -6 5 -67 -13 -23 -57 2 -11 -4 1 -41 11.0 [2,] 3 5 -51 -9 -14 -52 2 -7 -3 1 -34 18.5 [3,] 6 26 -38 3 6 -27 13 1 3 2 -26 30.5 [4,] 25 26 21 9 9 -22 16 14 5 10 -13 35.0 [5,] 48 50 28 21 16 -17 27 20 5 14 3 35.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -9.545145 11.16145 -88.87502 -9.718755 -10.25174 -48.197924 3.107635 [2,] 21.545145 40.83855 12.87502 15.718755 22.25174 -5.802076 22.892365 [,8] [,9] [,10] [,11] [,12] [1,] -13.83855 -2.65278 -4.359377 -40.83855 17.465 [2,] 15.83855 8.65278 8.359377 -11.16145 43.535 $out [1] -39 34 -47 $group [1] 2 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-6, 3, 6, 25, 48, 5, 5, 26, 26, 50, -67, -51, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/63lgh1258144160.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,] 97.0 53.0 69.0 52.0 63.0 NA [2,] 123.0 81.5 73.5 70.5 76.0 NA [3,] 131.5 112.0 89.5 77.5 82.5 NA [4,] 148.5 147.0 94.5 100.0 94.5 NA [5,] 182.0 180.0 113.0 128.0 102.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 119.8693 82.12501 79.92176 64.04485 74.06203 NA [2,] 143.1307 141.87499 99.07824 90.95515 90.93797 NA $out [1] 139 128 $group [1] 3 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(97, 123, 131.5, 148.5, 182, 53, 81.5, 112, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7njdc1258144160.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,] 73.6 78.0 68.50 [2,] 91.1 86.5 85.25 [3,] 101.9 94.5 104.50 [4,] 113.0 105.0 113.75 [5,] 132.8 113.0 134.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 91.91126 86.06203 91.50096 [2,] 111.88874 102.93797 117.49904 $out [1] 139 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(73.6, 91.1, 101.9, 113, 132.8, 78, 86.5, 94.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1erhz1258144160.ps tmp/1erhz1258144160.png") > system("convert tmp/2bwlo1258144160.ps tmp/2bwlo1258144160.png") > system("convert tmp/3ne041258144160.ps tmp/3ne041258144160.png") > system("convert tmp/4k9wu1258144160.ps tmp/4k9wu1258144160.png") > system("convert tmp/5ku9b1258144160.ps tmp/5ku9b1258144160.png") > system("convert tmp/63lgh1258144160.ps tmp/63lgh1258144160.png") > system("convert tmp/7njdc1258144160.ps tmp/7njdc1258144160.png") > > > proc.time() user system elapsed 1.244 0.988 1.519