R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(25,24,21,23,17,19,18,27,23,23,29,21,26,25,25,23,26,20,29,24,23,24,30,22,22,13,24,17,24,21,23,24,24,24,23,26,24,21,23,28,23,22,24,21,23,23,20,23,21,27,12,15,22,21,21,20,24,24,29,25,14,30,19,29,25,25,25,16,25,28,24,25,21,22,20,25,27,21,13,26,26,25,22,19,23,25,15,21,23,25,24,24,21,24,22,24,28,21,17,28,24,10,20,22,19,22,22,26,24,22,20,20,15,20,20,24,22,29,23,24,22,16,23,27,16,21,26,22,23,19,18,24,24,29,22,24,22,12,26,18,22,24,21,15,23,22,22,24,23,13) > 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] 150 > (np <- floor(n / par1)) [1] 12 > 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] 13 13 13 13 13 13 12 12 12 12 12 12 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 25 26 22 24 21 14 21 23 28 24 22 24 23 [2,] 24 25 13 21 27 30 22 25 21 22 16 29 22 [3,] 21 25 24 23 12 19 20 15 17 20 23 22 22 [4,] 23 23 17 28 15 29 25 21 28 20 27 24 24 [5,] 17 26 24 23 22 25 27 23 24 15 16 22 23 [6,] 19 20 21 22 21 25 21 25 10 20 21 12 13 [7,] 18 29 23 24 21 25 13 24 20 20 26 26 NA [8,] 27 24 24 21 20 16 26 24 22 24 22 18 NA [9,] 23 23 24 23 24 25 26 21 19 22 23 22 NA [10,] 23 24 24 23 24 28 25 24 22 29 19 24 NA [11,] 29 30 23 20 29 24 22 22 22 23 18 21 NA [12,] 21 22 26 23 25 25 19 24 26 24 24 15 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -1 -1 -9 -3 6 16 1 2 -7 -2 -6 5 -1 [2,] -3 0 11 2 -15 -11 -2 -10 -4 -2 7 -7 0 [3,] 2 -2 -7 5 3 10 5 6 11 0 4 2 2 [4,] -6 3 7 -5 7 -4 2 2 -4 -5 -11 -2 -1 [5,] 2 -6 -3 -1 -1 0 -6 2 -14 5 5 -10 -10 [6,] -1 9 2 2 0 0 -8 -1 10 0 5 14 NA [7,] 9 -5 1 -3 -1 -9 13 0 2 4 -4 -8 NA [8,] -4 -1 0 2 4 9 0 -3 -3 -2 1 4 NA [9,] 0 1 0 0 0 3 -1 3 3 7 -4 2 NA [10,] 6 6 -1 -3 5 -4 -3 -2 0 -6 -1 -3 NA [11,] -8 -8 3 3 -4 1 -3 2 4 1 6 -6 NA [12,] 5 0 -2 -2 -11 -4 4 4 -2 -2 0 8 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/rcomp/tmp/1r5tl1292691085.ps",horizontal=F,onefile=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/rcomp/tmp/2r5tl1292691085.ps",horizontal=F,onefile=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/rcomp/tmp/3kwso1292691085.ps",horizontal=F,onefile=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/rcomp/tmp/4kwso1292691085.ps",horizontal=F,onefile=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,] 21 16 15 15 22 19 13.0 16.0 19 22.0 18.0 19.0 [2,] 22 21 19 21 22 19 20.0 20.5 22 23.0 21.5 21.5 [3,] 23 22 21 24 23 21 23.5 23.0 23 24.0 22.5 24.0 [4,] 24 25 23 27 24 21 25.5 24.0 24 24.5 26.5 25.0 [5,] 26 30 25 29 27 22 29.0 27.0 26 25.0 30.0 26.0 $n [1] 13 13 13 13 13 13 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 22.12357 20.24715 19.24715 21.37072 22.12357 20.12357 20.99141 21.40363 [2,] 23.87643 23.75285 22.75285 26.62928 23.87643 21.87643 26.00859 24.59637 [,9] [,10] [,11] [,12] [1,] 22.08779 23.31584 20.21947 22.40363 [2,] 23.91221 24.68416 24.78053 25.59637 $out [1] 14 28 13 12 17 15 16 25 25 10 12 13 28 29 19 15 $group [1] 1 1 2 3 5 5 5 6 6 6 6 6 10 10 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(21, 22, 23, 24, 26, 16, 21, 22, 25, 30, 15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5kwso1292691085.ps",horizontal=F,onefile=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,] -9 -15 -2 -11 -14 -8.0 -9.0 -4.0 -4.0 -6.0 -8 -11 [2,] -3 -7 2 -5 -6 -0.5 -4.5 -2.5 0.0 -3.0 -5 -2 [3,] -1 -2 3 -2 -1 1.0 -0.5 0.0 0.5 -1.5 1 -1 [4,] 2 0 5 2 2 7.0 3.0 3.0 3.0 2.5 3 4 [5,] 6 7 6 7 5 14.0 13.0 9.0 7.0 6.0 6 8 $n [1] 13 13 13 13 13 12 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.191066 -5.067492 1.685361 -5.067492 -4.505705 -2.420800 -3.920800 [2,] 1.191066 1.067492 4.314639 1.067492 2.505705 4.420800 2.920800 [,8] [,9] [,10] [,11] [,12] [1,] -2.508587 -0.8683201 -4.008587 -2.648854 -3.736640 [2,] 2.508587 1.8683201 1.008587 4.648854 1.736640 $out [1] 16 11 -7 10 11 $group [1] 1 2 3 3 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-9, -3, -1, 2, 6, -15, -7, -2, 0, 7, -2, 2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6d6r81292691085.ps",horizontal=F,onefile=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] [,10] [,11] [,12] [,13] [1,] 17.0 20.0 21.0 20.0 15.0 14.0 13.0 21.0 17.0 15 16.0 15.0 22.0 [2,] 20.0 23.0 21.5 21.5 20.5 21.5 20.5 21.5 19.5 20 18.5 19.5 22.0 [3,] 23.0 24.5 23.5 23.0 21.5 25.0 22.0 23.5 22.0 22 22.0 22.0 22.5 [4,] 24.5 26.0 24.0 23.5 24.5 26.5 25.5 24.0 25.0 24 23.5 24.0 23.0 [5,] 29.0 30.0 26.0 24.0 29.0 30.0 27.0 25.0 28.0 29 27.0 29.0 24.0 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 20.94752 23.13168 22.35973 22.08779 19.67557 22.71947 19.71947 22.35973 [2,] 25.05248 25.86832 24.64027 23.91221 23.32443 27.28053 24.28053 24.64027 [,9] [,10] [,11] [,12] [,13] [1,] 19.49141 20.17557 19.71947 19.94752 21.85497 [2,] 24.50859 23.82443 24.28053 24.05248 23.14503 $out [1] 13 17 28 12 15 10 12 13 $group [1] 3 3 4 5 8 9 12 13 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" NA Warning message: In bxp(list(stats = c(17, 20, 23, 24.5, 29, 20, 23, 24.5, 26, 30, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7d6r81292691085.ps",horizontal=F,onefile=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,] 22.07692 21.00 22.3750 [2,] 22.20513 22.25 22.5000 [3,] 22.83974 23.00 23.0000 [4,] 23.15064 23.75 23.4375 [5,] 24.08333 24.00 24.0000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 22.40849 22.31584 22.5724 [2,] 23.27100 23.68416 23.4276 $out [1] 20.23077 19.23077 21.00000 20.00000 $group [1] 1 1 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(22.0769230769231, 22.2051282051282, 22.8397435897436, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1r5tl1292691085.ps tmp/1r5tl1292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/2r5tl1292691085.ps tmp/2r5tl1292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/3kwso1292691085.ps tmp/3kwso1292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/4kwso1292691085.ps tmp/4kwso1292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/5kwso1292691085.ps tmp/5kwso1292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/6d6r81292691085.ps tmp/6d6r81292691085.png",intern=TRUE)) character(0) > try(system("convert tmp/7d6r81292691085.ps tmp/7d6r81292691085.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.610 1.070 2.693