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(16,15,16,15,17,14,15,16,16,15,13,12,13,13,12,10,14,14,15,16,16,15,15,13,15,15,15,13,16,16,14,16,15,14,15,15,14,13,12,13,12,9,10,8,11,8,8,8,4,6,8,10,5,6,5,9,8,6,9,11,11) > 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,] 16 13 15 14 4 11 [2,] 15 13 15 13 6 NA [3,] 16 12 15 12 8 NA [4,] 15 10 13 13 10 NA [5,] 17 14 16 12 5 NA [6,] 14 14 16 9 6 NA [7,] 15 15 14 10 5 NA [8,] 16 16 16 8 9 NA [9,] 16 16 15 11 8 NA [10,] 15 15 14 8 6 NA [11,] 13 15 15 8 9 NA [12,] 12 13 15 8 11 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1 0 0 -1 2 NA [2,] 1 -1 0 -1 2 NA [3,] -1 -2 -2 1 2 NA [4,] 2 4 3 -1 -5 NA [5,] -3 0 0 -3 1 NA [6,] 1 1 -2 1 -1 NA [7,] 1 1 2 -2 4 NA [8,] 0 0 -1 3 -1 NA [9,] -1 -1 -1 -3 -2 NA [10,] -2 0 1 0 3 NA [11,] -1 -2 0 0 2 NA [12,] 1 2 -1 -4 0 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/1qg9b1258124475.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/2jzq01258124475.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/3hhci1258124475.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/446xd1258124475.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,] 11.0 13 8 10 12 6 5 8 8 6 8 8 [2,] 11.0 13 12 10 12 9 10 9 11 8 9 11 [3,] 13.5 13 12 13 14 14 14 16 15 14 13 12 [4,] 15.0 15 15 13 16 14 15 16 16 15 15 13 [5,] 16.0 15 16 15 17 16 15 16 16 15 15 15 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 10.91987 11.58681 9.880208 10.88021 11.17361 10.46701 10.46701 11.05382 [2,] 16.08013 14.41319 14.119792 15.11979 16.82639 17.53299 17.53299 20.94618 [,9] [,10] [,11] [,12] [1,] 11.46701 9.053818 8.760415 10.58681 [2,] 18.53299 18.946182 17.239585 13.41319 $out [1] 4 6 5 $group [1] 1 2 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(11, 11, 13.5, 15, 16, 13, 13, 13, 15, 15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/507yo1258124475.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,] -1 -1 -2 -5 -3 -2 1 -1 -3 0 -2 -4 [2,] -1 -1 -2 -1 -3 -1 1 -1 -2 0 -1 -1 [3,] 0 0 -1 2 0 1 1 0 -1 0 0 0 [4,] 0 1 1 3 0 1 2 0 -1 1 0 1 [5,] 0 2 2 4 1 1 2 0 -1 1 0 2 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7065975 -1.413195 -3.119792 -0.82639 -2.119792 -0.413195 0.2934025 [2,] 0.7065975 1.413195 1.119792 4.82639 2.119792 2.413195 1.7065975 [,8] [,9] [,10] [,11] [,12] [1,] -0.7065975 -1.7065975 -0.7065975 -0.7065975 -1.413195 [2,] 0.7065975 -0.2934025 0.7065975 0.7065975 1.413195 $out [1] 2 -2 4 3 -2 3 2 $group [1] 1 7 7 8 10 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1, -1, 0, 0, 0, -1, -1, 0, 1, 2, -2, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6vdcs1258124475.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,] 13.0 10 13.0 8.0 4.0 11 [2,] 14.5 13 14.5 8.0 5.5 11 [3,] 15.0 14 15.0 10.5 7.0 11 [4,] 16.0 15 15.5 12.5 9.0 11 [5,] 17.0 16 16.0 14.0 11.0 11 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 14.31584 13.08779 14.54389 8.44752 5.403627 11 [2,] 15.68416 14.91221 15.45611 12.55248 8.596373 11 $out [1] 12 $group [1] 1 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(13, 14.5, 15, 16, 17, 10, 13, 14, 15, 16, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/75nie1258124475.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,] 11.60000 12.00 11.50 [2,] 11.80000 13.00 11.75 [3,] 12.18333 13.75 12.50 [4,] 12.70000 14.00 13.50 [5,] 13.20000 15.00 14.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.77284 13.29389 11.70181 [2,] 12.59383 14.20611 13.29819 $out [1] 16 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(11.6, 11.8, 12.1833333333333, 12.7, 13.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1qg9b1258124475.ps tmp/1qg9b1258124475.png") > system("convert tmp/2jzq01258124475.ps tmp/2jzq01258124475.png") > system("convert tmp/3hhci1258124475.ps tmp/3hhci1258124475.png") > system("convert tmp/446xd1258124475.ps tmp/446xd1258124475.png") > system("convert tmp/507yo1258124475.ps tmp/507yo1258124475.png") > system("convert tmp/6vdcs1258124475.ps tmp/6vdcs1258124475.png") > system("convert tmp/75nie1258124475.ps tmp/75nie1258124475.png") > > > proc.time() user system elapsed 1.198 0.930 1.630