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(17.8,17.9,17.4,16.7,16,16.6,19.1,17.8,17.2,18.6,16.3,15.1,19.2,17.7,19.1,18,17.5,17.8,21.1,17.2,19.4,19.8,17.6,16.2,19.5,19.9,20,17.3,18.9,18.6,21.4,18.6,19.8,20.8,19.6,17.7,19.8,22.2,20.7,17.9,20.9,21.2,21.4,23,21.3,23.9,22.4,18.3,22.8,22.3,17.8,16.4,16,16.4,17.7,16.6,16.2,18.3,17.6,15.1) > 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] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 17.8 19.2 19.5 19.8 22.8 NA [2,] 17.9 17.7 19.9 22.2 22.3 NA [3,] 17.4 19.1 20.0 20.7 17.8 NA [4,] 16.7 18.0 17.3 17.9 16.4 NA [5,] 16.0 17.5 18.9 20.9 16.0 NA [6,] 16.6 17.8 18.6 21.2 16.4 NA [7,] 19.1 21.1 21.4 21.4 17.7 NA [8,] 17.8 17.2 18.6 23.0 16.6 NA [9,] 17.2 19.4 19.8 21.3 16.2 NA [10,] 18.6 19.8 20.8 23.9 18.3 NA [11,] 16.3 17.6 19.6 22.4 17.6 NA [12,] 15.1 16.2 17.7 18.3 15.1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1 -1.5 0.4 2.4 -0.5 NA [2,] -0.5 1.4 0.1 -1.5 -4.5 NA [3,] -0.7 -1.1 -2.7 -2.8 -1.4 NA [4,] -0.7 -0.5 1.6 3.0 -0.4 NA [5,] 0.6 0.3 -0.3 0.3 0.4 NA [6,] 2.5 3.3 2.8 0.2 1.3 NA [7,] -1.3 -3.9 -2.8 1.6 -1.1 NA [8,] -0.6 2.2 1.2 -1.7 -0.4 NA [9,] 1.4 0.4 1.0 2.6 2.1 NA [10,] -2.3 -2.2 -1.2 -1.5 -0.7 NA [11,] -1.2 -1.4 -1.9 -4.1 -2.5 NA [12,] 4.1 3.3 2.1 4.5 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/1402k1260484179.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/2wtxe1260484179.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/3esrj1260484179.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/4tjr01260484179.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,] 19.2 17.7 17.4 16.4 16.0 16.4 17.7 16.6 16.2 18.3 16.3 15.1 [2,] 19.2 17.9 17.8 16.7 16.0 16.6 19.1 17.2 17.2 18.6 17.6 15.1 [3,] 19.5 19.9 19.1 17.3 17.5 17.8 21.1 17.8 19.4 19.8 17.6 16.2 [4,] 19.8 22.2 20.0 17.9 18.9 18.6 21.4 18.6 19.8 20.8 19.6 17.7 [5,] 19.8 22.3 20.7 18.0 20.9 21.2 21.4 18.6 21.3 23.9 22.4 18.3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 19.07604 16.86163 17.54549 16.45208 15.45087 16.38681 19.47483 16.81076 [2,] 19.92396 22.93837 20.65451 18.14792 19.54913 19.21319 22.72517 18.78924 [,9] [,10] [,11] [,12] [1,] 17.56285 18.24549 16.18681 14.36285 [2,] 21.23715 21.35451 19.01319 18.03715 $out [1] 17.8 22.8 23.0 $group [1] 1 1 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(19.2, 19.2, 19.5, 19.8, 19.8, 17.7, 17.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5eanw1260484179.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.5 -1.5 -2.8 -0.7 0.3 0.2 -3.9 -1.7 0.4 -2.3 -4.1 2.1 [2,] -0.5 -1.5 -2.7 -0.5 0.3 1.3 -2.8 -0.6 1.0 -2.2 -2.5 2.7 [3,] 0.1 -0.5 -1.4 -0.4 0.3 2.5 -1.3 -0.4 1.4 -1.5 -1.9 3.7 [4,] 0.4 0.1 -1.1 1.6 0.4 2.8 -1.1 1.2 2.1 -1.2 -1.4 4.3 [5,] 0.4 1.4 -0.7 3.0 0.4 3.3 -1.1 2.2 2.6 -0.7 -1.2 4.5 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.5359377 -1.630556 -2.5305560 -1.883855 0.2293403 1.440104 -2.50121572 [2,] 0.7359377 0.630556 -0.2694440 1.083855 0.3706597 3.559896 -0.09878428 [,8] [,9] [,10] [,11] [,12] [1,] -1.6718755 0.6227428 -2.2065975 -2.677257 2.436 [2,] 0.8718755 2.1772572 -0.7934025 -1.122743 4.964 $out [1] 2.4 -4.5 0.6 -0.3 1.6 $group [1] 1 2 5 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.5, -0.5, 0.0999999999999979, 0.399999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6p6mt1260484179.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,] 15.10 16.20 17.30 17.90 15.10 NA [2,] 16.45 17.55 18.60 20.25 16.30 NA [3,] 17.30 17.90 19.55 21.25 17.10 NA [4,] 17.85 19.30 19.95 22.30 18.05 NA [5,] 19.10 21.10 21.40 23.90 18.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 16.66145 17.10181 18.93426 20.31498 16.30181 NA [2,] 17.93855 18.69819 20.16574 22.18502 17.89819 NA $out [1] 22.8 22.3 $group [1] 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(15.1, 16.45, 17.3, 17.85, 19.1, 16.2, 17.55, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7kqem1260484179.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,] 16.48 16.20 16.400 [2,] 17.99 17.55 17.525 [3,] 18.74 18.45 18.550 [4,] 19.91 19.65 19.600 [5,] 20.28 21.10 20.250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 17.86428 17.49218 17.60358 [2,] 19.61572 19.40782 19.49642 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(16.48, 17.99, 18.74, 19.91, 20.28, 16.2, 17.55, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1402k1260484179.ps tmp/1402k1260484179.png") > system("convert tmp/2wtxe1260484179.ps tmp/2wtxe1260484179.png") > system("convert tmp/3esrj1260484179.ps tmp/3esrj1260484179.png") > system("convert tmp/4tjr01260484179.ps tmp/4tjr01260484179.png") > system("convert tmp/5eanw1260484179.ps tmp/5eanw1260484179.png") > system("convert tmp/6p6mt1260484179.ps tmp/6p6mt1260484179.png") > system("convert tmp/7kqem1260484179.ps tmp/7kqem1260484179.png") > > > proc.time() user system elapsed 1.209 0.955 2.924