R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(13,16,19,15,14,13,19,15,14,15,16,16,16,16,17,15,15,20,18,16,16,16,19,16,17,17,16,15,16,14,15,12,14,16,14,7,10,14,16,16,16,14,20,14,14,11,14,15,16,14,16,14,12,16,9,14,16,16,15,16,12,16,16,14,16,17,18,18,12,16,10,14,18,18,16,17,16,16,13,16,16,20,16,15,15,16,14,16,16,15,12,17,16,15,13,16,16,16,16,14,16,16,20,15,16,13,17,16,16,12,16,16,17,13,12,18,14,14,13,16,13,16,13,16,15,16,15,17,15,12,16,10,16,12,14,15,13,15,11,12,8,16,15,17,16,10,18,13,16,13,10,15,16,16,14,10,17,13,15,16,12,13) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 162 > (np <- floor(n / par1)) [1] 13 > 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] 14 14 14 14 14 14 13 13 13 13 13 13 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 13 16 17 10 16 12 18 15 16 16 13 16 16 [2,] 16 16 17 14 14 16 18 16 16 12 16 12 10 [3,] 19 17 16 16 16 16 16 14 16 16 13 14 18 [4,] 15 15 15 16 14 14 17 16 14 16 16 15 13 [5,] 14 15 16 16 12 16 16 16 16 17 15 13 16 [6,] 13 20 14 14 16 17 16 15 16 13 16 15 13 [7,] 19 18 15 20 9 18 13 12 20 12 15 11 10 [8,] 15 16 12 14 14 18 16 17 15 18 17 12 15 [9,] 14 16 14 14 16 12 16 16 16 14 15 8 16 [10,] 15 16 16 11 16 16 20 15 13 14 12 16 16 [11,] 16 19 14 14 15 10 16 13 17 13 16 15 14 [12,] 16 16 7 15 16 14 15 16 16 16 10 17 10 [,14] [1,] 17 [2,] 13 [3,] 15 [4,] 16 [5,] 12 [6,] 13 [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 3 0 0 4 -2 4 0 1 0 -4 3 -4 -6 [2,] 3 1 -1 2 2 0 -2 -2 0 4 -3 2 8 [3,] -4 -2 -1 0 -2 -2 1 2 -2 0 3 1 -5 [4,] -1 0 1 0 -2 2 -1 0 2 1 -1 -2 3 [5,] -1 5 -2 -2 4 1 0 -1 0 -4 1 2 -3 [6,] 6 -2 1 6 -7 1 -3 -3 4 -1 -1 -4 -3 [7,] -4 -2 -3 -6 5 0 3 5 -5 6 2 1 5 [8,] -1 0 2 0 2 -6 0 -1 1 -4 -2 -4 1 [9,] 1 0 2 -3 0 4 4 -1 -3 0 -3 8 0 [10,] 1 3 -2 3 -1 -6 -4 -2 4 -1 4 -1 -2 [11,] 0 -3 -7 1 1 4 -1 3 -1 3 -6 2 -4 [12,] 0 1 3 1 -4 4 0 0 0 -3 6 -1 7 [,14] [1,] -4 [2,] 2 [3,] 1 [4,] -4 [5,] 1 [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/wessaorg/rcomp/tmp/1292b1321352623.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2ca9q1321352623.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3qrie1321352623.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4v80b1321352623.ps",horizontal=F,onefile=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,] 10 10 14 13 12 13 9 12 12 11 13 14 [2,] 13 13 15 14 14 13 12 14 14 14 14 14 [3,] 16 16 16 15 16 15 15 15 15 16 15 16 [4,] 16 16 16 16 16 16 18 17 16 16 16 16 [5,] 18 18 17 17 17 20 20 18 16 16 19 17 $n [1] 14 14 14 14 14 14 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 14.73318 14.73318 15.57773 14.15545 15.15545 13.73318 12.37072 13.68536 [2,] 17.26682 17.26682 16.42227 15.84455 16.84455 16.26682 17.62928 16.31464 [,9] [,10] [,11] [,12] [1,] 14.12357 15.12357 14.12357 15.12357 [2,] 15.87643 16.87643 15.87643 16.87643 $out [1] 19 13 18 8 20 10 7 10 10 $group [1] 3 3 3 9 10 11 12 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(10, 13, 16, 16, 18, 10, 13, 16, 16, 18, 14, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/59yss1321352623.ps",horizontal=F,onefile=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 -3.0 -5.0 -4 -4 -7 -6 -6 -3 -6 -7 -4 [2,] -4 -1.0 -2.0 -1 -2 -3 -3 -2 -1 -2 -3 0 [3,] 0 1.5 -0.5 0 0 -1 1 0 0 -1 0 0 [4,] 3 2.0 1.0 1 1 1 5 1 2 3 2 3 [5,] 4 4.0 3.0 3 5 6 6 2 4 4 4 7 $n [1] 14 14 14 14 14 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.955909 0.2331817 -1.7668183 -0.8445455 -1.266818 -2.7528526 -2.505705 [2,] 2.955909 2.7668183 0.7668183 0.8445455 1.266818 0.7528526 4.505705 [,8] [,9] [,10] [,11] [,12] [1,] -1.314639 -1.314639 -3.191066 -2.191066 -1.314639 [2,] 1.314639 1.314639 1.191066 2.191066 1.314639 $out [1] 8 8 $group [1] 2 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-6, -4, 0, 3, 4, -3, -1, 1.5, 2, 4, -5, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6uyaf1321352623.ps",horizontal=F,onefile=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] [,12] [,13] [,14] [1,] 13 15.0 12 11 12.0 10.0 15.0 13.0 15.0 12 10 8.0 10.0 12 [2,] 14 16.0 14 14 14.0 13.0 16.0 14.5 15.5 13 13 12.0 11.5 13 [3,] 15 16.0 15 14 15.5 16.0 16.0 15.5 16.0 15 15 14.5 14.5 14 [4,] 16 17.5 16 16 16.0 16.5 17.5 16.0 16.0 16 16 15.5 16.0 16 [5,] 19 19.0 17 16 16.0 18.0 18.0 17.0 16.0 18 17 17.0 18.0 17 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 14.08779 15.31584 14.08779 13.08779 14.58779 14.40363 15.31584 14.81584 [2,] 15.91221 16.68416 15.91221 14.91221 16.41221 17.59637 16.68416 16.18416 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 15.77195 13.63168 13.63168 12.90363 12.44752 12.0649 [2,] 16.22805 16.36832 16.36832 16.09637 16.55248 15.9351 $out [1] 20 7 10 20 9 13 20 12 14 20 13 17 $group [1] 2 3 4 4 5 7 7 8 9 9 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(13, 14, 15, 16, 19, 15, 16, 16, 17.5, 19, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/79jdp1321352623.ps",horizontal=F,onefile=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,] 14.38462 15.0 14.625 [2,] 14.74176 15.0 14.875 [3,] 15.03571 15.5 15.000 [4,] 15.10989 16.0 15.125 [5,] 15.30769 16.0 15.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 14.86781 15.04389 14.88597 [2,] 15.20362 15.95611 15.11403 $out [1] 15.85714 14.15385 15.62500 $group [1] 1 1 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(14.3846153846154, 14.7417582417582, 15.0357142857143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1292b1321352623.ps tmp/1292b1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/2ca9q1321352623.ps tmp/2ca9q1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/3qrie1321352623.ps tmp/3qrie1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/4v80b1321352623.ps tmp/4v80b1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/59yss1321352623.ps tmp/59yss1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/6uyaf1321352623.ps tmp/6uyaf1321352623.png",intern=TRUE)) character(0) > try(system("convert tmp/79jdp1321352623.ps tmp/79jdp1321352623.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.533 0.447 2.015