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(24,23,24,24,27,28,25,19,19,19,20,16,22,21,25,29,28,25,26,24,28,28,28,28,32,31,22,29,31,29,32,32,31,29,28,28,29,22,26,24,27,27,23,21,19,17,19,21,13,8,5,10,6,6,8,11,12,13,19,19,18) > 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] 61 > (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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 24 22 32 29 13 18 [2,] 23 21 31 22 8 NA [3,] 24 25 22 26 5 NA [4,] 24 29 29 24 10 NA [5,] 27 28 31 27 6 NA [6,] 28 25 29 27 6 NA [7,] 25 26 32 23 8 NA [8,] 19 24 32 21 11 NA [9,] 19 28 31 19 12 NA [10,] 19 28 29 17 13 NA [11,] 20 28 28 19 19 NA [12,] 16 28 28 21 19 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1 -1 -1 -7 -5 NA [2,] 1 4 -9 4 -3 NA [3,] 0 4 7 -2 5 NA [4,] 3 -1 2 3 -4 NA [5,] 1 -3 -2 0 0 NA [6,] -3 1 3 -4 2 NA [7,] -6 -2 0 -2 3 NA [8,] 0 4 -1 -2 1 NA [9,] 0 0 -2 -2 1 NA [10,] 1 0 -1 2 6 NA [11,] -4 0 0 2 0 NA [12,] 6 4 1 -8 -1 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/1gqum1257946366.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/23q4b1257946366.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/3tdxp1257946366.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/40p041257946366.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,] 13 21 22 24 27 25 23 19 12 13 19 16 [2,] 18 21 22 24 27 25 23 19 19 17 19 19 [3,] 23 22 24 24 27 27 25 21 19 19 20 21 [4,] 29 23 25 29 28 28 26 24 28 28 28 28 [5,] 32 23 26 29 28 29 26 24 31 29 28 28 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 15.90464 20.58681 21.88021 20.46701 26.2934 24.88021 22.88021 17.46701 [2,] 30.09536 23.41319 26.11979 27.53299 27.7066 29.11979 27.11979 24.53299 [,9] [,10] [,11] [,12] [1,] 12.64062 11.22743 13.64062 14.64062 [2,] 25.35938 26.77257 26.35938 27.35938 $out [1] 31 8 5 10 31 6 6 32 8 32 11 $group [1] 2 2 3 4 5 5 6 7 7 8 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(13, 18, 23, 29, 32, 21, 21, 22, 23, 23, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5c5uf1257946366.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,] -7 -9 -2 -4 -3 -4 -2 -2 -2 -1 0 -8 [2,] -5 -3 0 -1 -2 -3 -2 -1 -2 0 0 -1 [3,] -1 1 4 2 0 1 -2 0 0 1 0 1 [4,] -1 4 5 3 0 2 0 1 0 2 0 4 [5,] -1 4 7 3 1 3 3 4 1 2 0 6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.82639 -3.946182 0.4670126 -0.82639 -1.413195 -2.532987 -3.413195 [2,] 1.82639 5.946182 7.5329874 4.82639 1.413195 4.532987 -0.586805 [,8] [,9] [,10] [,11] [,12] [1,] -1.413195 -1.413195 -0.413195 0 -2.532987 [2,] 1.413195 1.413195 2.413195 0 4.532987 $out [1] -6 6 -4 2 $group [1] 7 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-7, -5, -1, -1, -1, -9, -3, 1, 4, 4, -2, 0, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6hojl1257946366.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,] 16.0 21.0 28.0 17.0 5.0 18 [2,] 19.0 24.5 28.5 20.0 7.0 18 [3,] 23.5 27.0 30.0 22.5 10.5 18 [4,] 24.5 28.0 31.5 26.5 13.0 18 [5,] 28.0 29.0 32.0 29.0 19.0 18 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 20.99141 25.40363 28.63168 19.53531 7.76336 18 [2,] 26.00859 28.59637 31.36832 25.46469 13.23664 18 $out [1] 22 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(16, 19, 23.5, 24.5, 28, 21, 24.5, 27, 28, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7b4l41257946366.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,] 20.4 19.0 21.5000 [2,] 21.3 20.5 22.9375 [3,] 22.6 22.5 23.5000 [4,] 23.0 24.5 25.5000 [5,] 23.8 27.0 27.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 21.82462 20.67557 22.33123 [2,] 23.37538 24.32443 24.66877 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(20.4, 21.3, 22.6, 23, 23.8, 19, 20.5, 22.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1gqum1257946366.ps tmp/1gqum1257946366.png") > system("convert tmp/23q4b1257946366.ps tmp/23q4b1257946366.png") > system("convert tmp/3tdxp1257946366.ps tmp/3tdxp1257946366.png") > system("convert tmp/40p041257946366.ps tmp/40p041257946366.png") > system("convert tmp/5c5uf1257946366.ps tmp/5c5uf1257946366.png") > system("convert tmp/6hojl1257946366.ps tmp/6hojl1257946366.png") > system("convert tmp/7b4l41257946366.ps tmp/7b4l41257946366.png") > > > proc.time() user system elapsed 1.254 0.988 1.601