R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(99.2,99.1,99.1,99.1,99.1,99.1,99.9,100,100,101.3,102,102,102.4,103,103,103.6,103.6,103.6,103.6,103.6,103.9,104,104,104,104.9,105.1,105.2,105.5,105.7,105.7,105.7,105.7,105.7,105.8,105.8,105.8,106.6,107,107.2,107.3,107.3,107.3,107.4,107.4,107.4,107.4,107.5,107.5,105,105.2,105.2,105.3,105.3,105.3,105.3,105.3,105.3,105.3,106.1,106.1) > par1 = '12' > 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,] 99.2 102.4 104.9 106.6 105.0 NA [2,] 99.1 103.0 105.1 107.0 105.2 NA [3,] 99.1 103.0 105.2 107.2 105.2 NA [4,] 99.1 103.6 105.5 107.3 105.3 NA [5,] 99.1 103.6 105.7 107.3 105.3 NA [6,] 99.1 103.6 105.7 107.3 105.3 NA [7,] 99.9 103.6 105.7 107.4 105.3 NA [8,] 100.0 103.6 105.7 107.4 105.3 NA [9,] 100.0 103.9 105.7 107.4 105.3 NA [10,] 101.3 104.0 105.8 107.4 105.3 NA [11,] 102.0 104.0 105.8 107.5 106.1 NA [12,] 102.0 104.0 105.8 107.5 106.1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1 0.6 0.2 0.4 0.2 NA [2,] 0.0 0.0 0.1 0.2 0.0 NA [3,] 0.0 0.6 0.3 0.1 0.1 NA [4,] 0.0 0.0 0.2 0.0 0.0 NA [5,] 0.0 0.0 0.0 0.0 0.0 NA [6,] 0.8 0.0 0.0 0.1 0.0 NA [7,] 0.1 0.0 0.0 0.0 0.0 NA [8,] 0.0 0.3 0.0 0.0 0.0 NA [9,] 1.3 0.1 0.1 0.0 0.0 NA [10,] 0.7 0.0 0.0 0.1 0.8 NA [11,] 0.0 0.0 0.0 0.0 0.0 NA [12,] 0.4 0.9 0.8 -2.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/wessaorg/rcomp/tmp/1x5a81452264896.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/2p7il1452264896.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/39as31452264896.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/4dosj1452264896.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,] 99.2 103.0 103.0 103.6 103.6 103.6 103.6 103.6 103.9 104.0 102.0 102.0 [2,] 102.4 103.0 103.0 103.6 103.6 103.6 103.6 103.6 103.9 104.0 104.0 104.0 [3,] 104.9 105.1 105.2 105.3 105.3 105.3 105.3 105.3 105.3 105.3 105.8 105.8 [4,] 105.0 105.2 105.2 105.5 105.7 105.7 105.7 105.7 105.7 105.8 106.1 106.1 [5,] 106.6 107.0 107.2 107.3 107.3 107.3 107.4 107.4 107.4 107.4 107.5 107.5 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 103.0628 103.5455 103.6455 103.9575 103.8161 103.8161 103.8161 103.8161 [2,] 106.7372 106.6545 106.7545 106.6425 106.7839 106.7839 106.7839 106.7839 [,9] [,10] [,11] [,12] [1,] 104.0281 104.0281 104.3161 104.3161 [2,] 106.5719 106.5719 107.2839 107.2839 $out [1] 99.1 99.1 99.1 99.1 99.1 99.9 100.0 100.0 101.3 $group [1] 2 3 4 5 6 7 8 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(99.2, 102.4, 104.9, 105, 106.6, 103, 103, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5wuci1452264896.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,] -0.1 0.0 0.0 0 0 0.0 0 0 0.0 0.0 0 -2.50 [2,] 0.2 0.0 0.1 0 0 0.0 0 0 0.0 0.0 0 -1.05 [3,] 0.2 0.0 0.1 0 0 0.0 0 0 0.1 0.1 0 0.60 [4,] 0.4 0.1 0.3 0 0 0.1 0 0 0.1 0.7 0 0.85 [5,] 0.6 0.2 0.6 0 0 0.1 0 0 0.1 0.8 0 0.90 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.0586805 -0.07065975 -0.0413195 0 0 -0.07065975 0 0 [2,] 0.3413195 0.07065975 0.2413195 0 0 0.07065975 0 0 [,9] [,10] [,11] [,12] [1,] 0.02934025 -0.3946182 0 -0.901 [2,] 0.17065975 0.5946182 0 2.101 $out [1] 0.2 0.8 0.1 0.3 1.3 $group [1] 4 6 7 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.100000000000009, 0.199999999999989, 0.200000000000003, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6u4ob1452264896.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] [1,] 99.10 102.40 104.90 107.20 105.20 NA [2,] 99.10 103.30 105.35 107.25 105.25 NA [3,] 99.55 103.60 105.70 107.35 105.30 NA [4,] 100.65 103.95 105.75 107.40 105.30 NA [5,] 102.00 104.00 105.80 107.50 105.30 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 98.84303 103.3035 105.5176 107.2816 105.2772 NA [2,] 100.25697 103.8965 105.8824 107.4184 105.3228 NA $out [1] 106.6 107.0 105.0 106.1 106.1 $group [1] 4 4 5 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(99.1, 99.1, 99.55, 100.65, 102, 102.4, 103.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7u7sc1452264896.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,] 103.62 105.20 103.700 [2,] 104.05 105.25 104.325 [3,] 104.29 105.30 104.650 [4,] 104.61 105.30 104.850 [5,] 105.08 105.30 105.050 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 104.0346 105.2772 104.4105 [2,] 104.5454 105.3228 104.8895 $out [1] 104.9 105.1 105.8 105.8 $group [1] 2 2 2 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(103.62, 104.05, 104.29, 104.61, 105.08, 105.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1x5a81452264896.ps tmp/1x5a81452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/2p7il1452264896.ps tmp/2p7il1452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/39as31452264896.ps tmp/39as31452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/4dosj1452264896.ps tmp/4dosj1452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/5wuci1452264896.ps tmp/5wuci1452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/6u4ob1452264896.ps tmp/6u4ob1452264896.png",intern=TRUE)) character(0) > try(system("convert tmp/7u7sc1452264896.ps tmp/7u7sc1452264896.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.749 0.532 3.305