R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(0,9,1,4,6,21,24,23,22,21,20,16,18,18,24,16,15,24,18,15,4,3,6,5,12,12,12,14,12,17,12,20,21,15,22,19,19,26,25,19,20,30,31,35,33,26,25,17,14,8,12,7,4,10,8,16,14,20,9,10) > 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,] 0 18 12 19 14 NA [2,] 9 18 12 26 8 NA [3,] 1 24 12 25 12 NA [4,] 4 16 14 19 7 NA [5,] 6 15 12 20 4 NA [6,] 21 24 17 30 10 NA [7,] 24 18 12 31 8 NA [8,] 23 15 20 35 16 NA [9,] 22 4 21 33 14 NA [10,] 21 3 15 26 20 NA [11,] 20 6 22 25 9 NA [12,] 16 5 19 17 10 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 9 0 0 7 -6 NA [2,] -8 6 0 -1 4 NA [3,] 3 -8 2 -6 -5 NA [4,] 2 -1 -2 1 -3 NA [5,] 15 9 5 10 6 NA [6,] 3 -6 -5 1 -2 NA [7,] -1 -3 8 4 8 NA [8,] -1 -11 1 -2 -2 NA [9,] -1 -1 -6 -7 6 NA [10,] -1 3 7 -1 -11 NA [11,] -4 -1 -3 -8 1 NA [12,] 2 7 0 -3 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/1mfef1228771446.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/2uug61228771446.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/35nrz1228771446.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/4f4751228771446.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,] 12 8 1 4 4 10 8 15 4 15 6 5 [2,] 12 9 12 7 6 17 12 16 14 15 9 10 [3,] 14 12 12 14 12 21 18 20 21 20 20 16 [4,] 18 18 24 16 15 24 24 23 22 21 22 17 [5,] 19 26 25 19 20 30 31 23 33 26 25 19 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 9.760415 5.640623 3.52083 7.640623 5.640623 16.05382 9.52083 [2,] 18.239585 18.359377 20.47917 20.359377 18.359377 25.94618 26.47917 [,8] [,9] [,10] [,11] [,12] [1,] 15.05382 15.34722 15.76042 10.81423 11.05382 [2,] 24.94618 26.65278 24.23958 29.18577 20.94618 $out [1] 0 35 3 $group [1] 1 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(12, 12, 14, 18, 19, 8, 9, 12, 18, 26, 1, 12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5aahz1228771446.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,] -6 -8 -8 -3 5 -6 -3 -2 -7 -1 -8 -3.0 [2,] 0 -1 -6 -2 6 -5 -1 -2 -6 -1 -4 -1.5 [3,] 0 0 -5 -1 9 -2 4 -2 -1 -1 -3 1.0 [4,] 7 4 2 1 10 1 8 -1 -1 3 -1 4.5 [5,] 9 6 3 2 15 3 8 -1 6 7 1 7.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4.946182 -3.532987 -10.6527798 -3.119792 6.17361 -6.239585 -2.359377 [2,] 4.946182 3.532987 0.6527798 1.119792 11.82639 2.239585 10.359377 [,8] [,9] [,10] [,11] [,12] [1,] -2.706597 -4.532987 -3.82639 -5.1197924 -3.74 [2,] -1.293403 2.532987 1.82639 -0.8802076 5.74 $out [1] -11 1 -11 $group [1] 8 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-6, 0, 0, 7, 9, -8, -1, 0, 4, 6, -8, -6, -5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6qjvs1228771446.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,] 0.0 3.0 12.0 17.0 4 NA [2,] 5.0 5.5 12.0 19.5 8 NA [3,] 18.0 15.5 14.5 25.5 10 NA [4,] 21.5 18.0 19.5 30.5 14 NA [5,] 24.0 24.0 22.0 35.0 20 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 10.47424 9.798666 11.0792 20.48283 7.26336 NA [2,] 25.52576 21.201334 17.9208 30.51717 12.73664 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(0, 5, 18, 21.5, 24, 3, 5.5, 15.5, 18, 24, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7j6qz1228771446.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.4 12 10.50 [2,] 13.0 13 13.50 [3,] 15.6 17 16.75 [4,] 18.7 20 18.00 [5,] 21.8 21 20.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 13.00019 13.80725 14.69752 [2,] 18.19981 20.19275 18.80248 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(11.4, 13, 15.6, 18.7, 21.8, 12, 13, 17, 20, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1mfef1228771446.ps tmp/1mfef1228771446.png") > system("convert tmp/2uug61228771446.ps tmp/2uug61228771446.png") > system("convert tmp/35nrz1228771446.ps tmp/35nrz1228771446.png") > system("convert tmp/4f4751228771446.ps tmp/4f4751228771446.png") > system("convert tmp/5aahz1228771446.ps tmp/5aahz1228771446.png") > system("convert tmp/6qjvs1228771446.ps tmp/6qjvs1228771446.png") > system("convert tmp/7j6qz1228771446.ps tmp/7j6qz1228771446.png") > > > proc.time() user system elapsed 1.230 0.953 1.474