R version 2.6.2 (2008-02-08) 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(8,5,2,5,-4,-4,-1,5,16,5,11,16,22,12,8,4,17,5,11,9,4,7,-5,9,11,11,-4,-7,9,-3,14,11,8,-14,-8,-2,15,-8,-4,-17,-13,0,9,-7,-14,-21,-10,-1,7,-14,-12,-16,-15,-15,-24,-14,-8,-14,-13,0,-6,-37,-12,-36,-32,-18,-22,-13,-17,-18,-19,-24,-14,-3,-6,-25,-19,-11,-13,-11,-22,-10,-4,5,-8,-7,5,-13,-15,3,3,7,16,16,18,10) > 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] 96 > (np <- floor(n / par1)) [1] 8 > 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] 8 8 8 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 8 22 11 15 7 -6 -14 -8 NA [2,] 5 12 11 -8 -14 -37 -3 -7 NA [3,] 2 8 -4 -4 -12 -12 -6 5 NA [4,] 5 4 -7 -17 -16 -36 -25 -13 NA [5,] -4 17 9 -13 -15 -32 -19 -15 NA [6,] -4 5 -3 0 -15 -18 -11 3 NA [7,] -1 11 14 9 -24 -22 -13 3 NA [8,] 5 9 11 -7 -14 -13 -11 7 NA [9,] 16 4 8 -14 -8 -17 -22 16 NA [10,] 5 7 -14 -21 -14 -18 -10 16 NA [11,] 11 -5 -8 -10 -13 -19 -4 18 NA [12,] 16 9 -2 -1 0 -24 5 10 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -3 -10 0 -23 -21 -31 11 1 NA [2,] -3 -4 -15 4 2 25 -3 12 NA [3,] 3 -4 -3 -13 -4 -24 -19 -18 NA [4,] -9 13 16 4 1 4 6 -2 NA [5,] 0 -12 -12 13 0 14 8 18 NA [6,] 3 6 17 9 -9 -4 -2 0 NA [7,] 6 -2 -3 -16 10 9 2 4 NA [8,] 11 -5 -3 -7 6 -4 -11 9 NA [9,] -11 3 -22 -7 -6 -1 12 0 NA [10,] 6 -12 6 11 1 -1 6 2 NA [11,] 5 14 6 9 13 -5 9 -8 NA [12,] 6 2 17 8 -6 10 -13 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/1mya01209420144.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/2wez51209420144.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/3915y1209420144.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/42v651209420144.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,] -14.0 -37 -12.0 -36.0 -32.0 -18.0 -24.0 -14 -22.0 -21 -19.0 -2.0 [2,] -7.0 -11 -9.0 -21.0 -17.0 -13.0 -17.5 -12 -15.5 -16 -11.5 -1.5 [3,] 7.5 -5 -4.0 -14.5 -14.0 -3.5 1.0 -1 -2.0 -12 -6.5 2.5 [4,] 13.0 8 3.5 -1.5 2.5 1.5 10.0 8 12.0 6 3.5 9.5 [5,] 22.0 12 8.0 5.0 17.0 5.0 14.0 11 16.0 16 18.0 16.0 $n [1] 8 8 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.672287 -15.613673 -10.982679 -25.39298 -24.89298 -11.599908 -14.36189 [2,] 18.672287 5.613673 2.982679 -3.60702 -3.10702 4.599908 16.36189 [,8] [,9] [,10] [,11] [,12] [1,] -12.17229 -17.36189 -24.2895159 -14.879215 -3.644758 [2,] 10.17229 13.36189 0.2895159 1.879215 8.644758 $out [1] -24 $group [1] 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-14, -7, 7.5, 13, 22, -37, -11, -5, 8, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5g8qe1209420144.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,] -31.0 -15.0 -24.0 -9.0 -12.0 -9.0 -16.0 -11.0 -22.0 -1 -8.0 -13 [2,] -22.0 -3.5 -18.5 -0.5 -6.0 -3.0 -2.5 -6.0 -9.0 0 0.0 -2 [3,] -6.5 -0.5 -8.5 4.0 4.0 1.5 3.0 -3.5 -3.5 4 7.5 6 [4,] 0.5 8.0 -3.5 9.5 13.5 7.5 7.5 7.5 1.5 6 11.0 9 [5,] 11.0 25.0 3.0 16.0 18.0 17.0 10.0 11.0 12.0 11 14.0 17 $n [1] 8 8 8 8 8 8 8 8 8 8 8 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -19.068823 -6.924065 -16.8792154 -1.586144 -6.89298 -4.365451 -2.586144 [2,] 6.068823 5.924065 -0.1207846 9.586144 14.89298 7.365451 8.586144 [,8] [,9] [,10] [,11] [,12] [1,] -11.041294 -9.365451 0.6483139 1.355242 -0.5690225 [2,] 4.041294 2.365451 7.3516861 13.644758 12.5690225 $out [1] -12 $group [1] 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-31, -22, -6.5, 0.5, 11, -15, -3.5, -0.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6c8tj1209420144.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] [,8] [,9] [1,] -4.0 -5.0 -14.0 -21.0 -16 -37.0 -25.0 -15.0 NA [2,] 0.5 4.5 -5.5 -13.5 -15 -28.0 -16.5 -7.5 NA [3,] 5.0 8.5 3.0 -7.5 -14 -18.5 -11.0 4.0 NA [4,] 9.5 11.5 11.0 -0.5 -10 -15.0 -5.0 13.0 NA [5,] 16.0 22.0 14.0 15.0 -8 -6.0 5.0 18.0 NA $n [1] 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.8950396 5.307253 -4.525761 -13.429387 -16.28053 -24.42939 -16.245227 [2,] 9.1049604 11.692747 10.525761 -1.570613 -11.71947 -12.57061 -5.754773 [,8] [,9] [1,] -5.350188 NA [2,] 13.350188 NA $out [1] 7 -24 0 $group [1] 5 5 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(-4, 0.5, 5, 9.5, 16, -5, 4.5, 8.5, 11.5, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7pbu71209420144.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,] -9.0000 -14.50 -8.3750 [2,] -5.7500 -9.25 -5.5625 [3,] -3.3125 -3.75 -2.6250 [4,] -1.8750 0.00 -1.7500 [5,] 1.6250 7.50 2.7500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] -5.079914 -7.9689871 -4.3639068 [2,] -1.545086 0.4689871 -0.8860932 $out [1] 4.375 -13.125 -11.625 4.000 $group [1] 1 1 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(-9, -5.75, -3.3125, -1.875, 1.625, -14.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1mya01209420144.ps tmp/1mya01209420144.png") > system("convert tmp/2wez51209420144.ps tmp/2wez51209420144.png") > system("convert tmp/3915y1209420144.ps tmp/3915y1209420144.png") > system("convert tmp/42v651209420144.ps tmp/42v651209420144.png") > system("convert tmp/5g8qe1209420144.ps tmp/5g8qe1209420144.png") > system("convert tmp/6c8tj1209420144.ps tmp/6c8tj1209420144.png") > system("convert tmp/7pbu71209420144.ps tmp/7pbu71209420144.png") > > > proc.time() user system elapsed 1.423 0.937 1.720