R version 2.6.1 (2007-11-26) Copyright (C) 2007 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(-12.7,-2.4,7.1,-3.9,9.5,5,-16.1,-10.8,7,13.6,8.1,-8.1,4.9,-0.8,4.3,4,1.5,5.4,-11.3,-16.4,-2,8.9,-7.2,-18,1.3,6.3,-6,2.8,2,5.1,-7.6,-18.6,5.8,20.3,0.7,-11.2,-5.7,-0.1,3.4,3.3,-1.2,4.2,-8.8,-25.3,8.5,14.5,-3.1,-10.4,-2.9,0.3,22.6,15.4,9,29.1,2.8,-3.8,27.7,28.9,26.5,19.8,13.2,14.1,34.1,30,21.8,32.1,5.3,3,17.1,26.3,38.1,19.5,38,35.5,78.6,62.2,76.9,104.9,32.2,42.5,64.3,74.9,75.4,43,58.7,55.4,76.6,63.3,78.9,82.7) > par1 = '8' > #'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] 90 > (np <- floor(n / par1)) [1] 11 > 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] 12 12 11 11 11 11 11 11 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] -12.7 7.0 1.5 1.3 5.8 -1.2 -2.9 27.7 21.8 38.0 64.3 78.9 [2,] -2.4 13.6 5.4 6.3 20.3 4.2 0.3 28.9 32.1 35.5 74.9 82.7 [3,] 7.1 8.1 -11.3 -6.0 0.7 -8.8 22.6 26.5 5.3 78.6 75.4 NA [4,] -3.9 -8.1 -16.4 2.8 -11.2 -25.3 15.4 19.8 3.0 62.2 43.0 NA [5,] 9.5 4.9 -2.0 2.0 -5.7 8.5 9.0 13.2 17.1 76.9 58.7 NA [6,] 5.0 -0.8 8.9 5.1 -0.1 14.5 29.1 14.1 26.3 104.9 55.4 NA [7,] -16.1 4.3 -7.2 -7.6 3.4 -3.1 2.8 34.1 38.1 32.2 76.6 NA [8,] -10.8 4.0 -18.0 -18.6 3.3 -10.4 -3.8 30.0 19.5 42.5 63.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 10.3 6.6 3.9 5.0 14.5 5.4 3.2 1.2 10.3 -2.5 10.6 3.8 [2,] 9.5 -5.5 -16.7 -12.3 -19.6 -13.0 22.3 -2.4 -26.8 43.1 0.5 NA [3,] -11.0 -16.2 -5.1 8.8 -11.9 -16.5 -7.2 -6.7 -2.3 -16.4 -32.4 NA [4,] 13.4 13.0 14.4 -0.8 5.5 33.8 -6.4 -6.6 14.1 14.7 15.7 NA [5,] -4.5 -5.7 10.9 3.1 5.6 6.0 20.1 0.9 9.2 28.0 -3.3 NA [6,] -21.1 5.1 -16.1 -12.7 3.5 -17.6 -26.3 20.0 11.8 -72.7 21.2 NA [7,] 5.3 -0.3 -10.8 -11.0 -0.1 -7.3 -6.6 -4.1 -18.6 10.3 -13.3 NA [8,] 17.8 -2.5 19.3 24.4 -4.5 7.5 31.5 -8.2 18.5 21.8 15.6 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/196by1199639961.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/2e0251199639961.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/333bm1199639961.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/4dlqr1199639961.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] [1,] -12.70 -2.40 -11.30 -25.30 -5.70 -0.80 -16.10 -18.60 [2,] 0.05 4.80 -2.65 -9.65 3.45 5.05 -5.15 -10.60 [3,] 6.40 16.95 7.10 2.80 9.00 14.10 3.40 3.30 [4,] 32.85 33.80 24.55 17.60 15.15 27.70 33.15 24.75 [5,] 78.90 74.90 26.50 43.00 17.10 55.40 76.60 63.30 $n [1] 12 12 11 11 11 11 11 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -8.5603 3.722905 -5.857752 -10.18157 3.426261 3.309814 -14.84566 [2,] 21.3603 30.177095 20.057752 15.78157 14.573739 24.890186 21.64566 [,8] [1,] -13.54031 [2,] 20.14031 $out [1] 82.7 78.6 75.4 62.2 76.9 58.7 104.9 $group [1] 2 3 3 4 5 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" Warning message: In bxp(list(stats = c(-12.7, 0.05, 6.4, 32.85, 78.9, -2.4, 4.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/539pu1199639961.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] [1,] -2.5 -26.80 -16.5 -6.60 -5.70 -26.30 -18.6 -8.20 [2,] 3.5 -14.85 -16.3 2.35 -1.20 -19.35 -10.9 2.50 [3,] 5.2 -5.50 -11.0 13.40 5.60 -12.70 -6.6 17.80 [4,] 10.3 5.00 -5.9 14.55 10.05 8.45 -0.2 20.55 [5,] 14.5 22.30 8.8 15.70 20.10 21.20 10.3 31.50 $n [1] 12 11 11 11 11 11 11 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2.098474 -14.9563 -15.954434 7.588067 0.2406359 -25.9435843 -11.697351 [2,] 8.301526 3.9563 -6.045566 19.211933 10.9593641 0.5435843 -1.502649 [,8] [1,] 9.201198 [2,] 26.398802 $out [1] 43.1 -32.4 33.8 28.0 -72.7 $group [1] 2 3 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" Warning message: In bxp(list(stats = c(-2.5, 3.5, 5.2, 10.3, 14.5, -26.8, -14.85, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6d3dp1199639961.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] [,10] [,11] [1,] -16.10 -0.80 -18.00 -18.60 -11.2 -25.30 -3.8 13.20 3.00 32.20 43.00 [2,] -11.75 1.60 -13.85 -6.80 -2.9 -9.60 -1.3 16.95 11.20 36.75 57.05 [3,] -3.15 4.60 -4.60 1.65 2.0 -2.15 5.9 27.10 20.65 52.35 63.80 [4,] 6.05 7.55 3.45 3.95 4.6 6.35 19.0 29.45 29.20 77.75 75.15 [5,] 9.50 13.60 8.90 6.30 5.8 14.50 29.1 34.10 38.10 104.90 76.60 [,12] [1,] 78.9 [2,] 78.9 [3,] 80.8 [4,] 82.7 [5,] 82.7 $n [1] 8 8 8 8 8 8 8 8 8 8 8 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -13.093336 1.276245 -14.264028 -4.355104 -2.189608 -11.059899 -5.439871 [2,] 6.793336 7.923755 5.064028 7.655104 6.189608 6.759899 17.239871 [,8] [,9] [,10] [,11] [,12] [1,] 20.11732 10.59494 29.44681 53.68908 76.55453 [2,] 34.08268 30.70506 75.25319 73.91092 85.04547 $out [1] -8.1 20.3 $group [1] 2 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" NA Warning message: In bxp(list(stats = c(-16.1, -11.75, -3.15, 6.05, 9.5, -0.8, 1.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7h5ky1199639961.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,] 7.390909 2.80 3.9750 [2,] 11.750000 3.35 8.1875 [3,] 17.740909 6.75 12.4750 [4,] 21.489773 11.55 15.9250 [5,] 25.150000 16.95 19.0250 $n [1] 8 8 8 $conf [,1] [,2] [,3] [1,] 12.30013 2.169362 8.152721 [2,] 23.18169 11.330638 16.797279 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(7.39090909090909, 11.75, 17.7409090909091, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/196by1199639961.ps tmp/196by1199639961.png") > system("convert tmp/2e0251199639961.ps tmp/2e0251199639961.png") > system("convert tmp/333bm1199639961.ps tmp/333bm1199639961.png") > system("convert tmp/4dlqr1199639961.ps tmp/4dlqr1199639961.png") > system("convert tmp/539pu1199639961.ps tmp/539pu1199639961.png") > system("convert tmp/6d3dp1199639961.ps tmp/6d3dp1199639961.png") > system("convert tmp/7h5ky1199639961.ps tmp/7h5ky1199639961.png") > > > proc.time() user system elapsed 1.479 0.986 2.084