R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 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(21571.00 + ,21493.00 + ,21422.00 + ,21272.00 + ,22747.00 + ,22676.00 + ,21571.00 + ,20831.00 + ,20909.00 + ,20909.00 + ,20980.00 + ,21130.00 + ,21051.00 + ,21643.00 + ,21864.00 + ,21643.00 + ,22455.00 + ,21935.00 + ,20759.00 + ,20467.00 + ,20467.00 + ,20610.00 + ,20026.00 + ,20467.00 + ,20097.00 + ,20467.00 + ,21051.00 + ,21272.00 + ,21792.00 + ,21571.00 + ,20246.00 + ,19726.00 + ,19506.00 + ,19726.00 + ,19363.00 + ,19506.00 + ,19064.00 + ,19805.00 + ,20168.00 + ,20246.00 + ,21643.00 + ,21643.00 + ,19805.00 + ,19363.00 + ,19363.00 + ,19584.00 + ,18622.00 + ,18180.00 + ,17668.00 + ,17817.00 + ,18480.00 + ,17960.00 + ,19363.00 + ,19584.00 + ,18180.00 + ,17668.00 + ,17375.00 + ,17668.00 + ,16855.00 + ,16563.00 + ,15388.00 + ,15680.00 + ,15751.00 + ,15830.00 + ,17226.00 + ,17076.00 + ,15388.00 + ,14647.00 + ,14355.00 + ,14725.00 + ,13322.00 + ,12367.00 + ,10601.00 + ,10750.00 + ,10750.00 + ,10601.00 + ,11854.00 + ,11926.00 + ,10451.00 + ,10159.00 + ,9568.00 + ,10380.00 + ,8905.00 + ,8022.00 + ,6333.00 + ,6697.00 + ,6255.00 + ,6404.00 + ,7509.00 + ,7730.00 + ,6996.00 + ,6917.00 + ,6917.00 + ,7879.00 + ,6184.00 + ,5079.00 + ,3163.00 + ,4709.00 + ,4488.00 + ,4566.00 + ,6333.00 + ,6112.00 + ,5300.00 + ,5671.00 + ,5671.00 + ,6996.00 + ,5450.00 + ,4566.00 + ,3163.00 + ,5008.00 + ,4859.00 + ,4930.00 + ,6476.00 + ,6333.00 + ,5813.00 + ,5892.00 + ,6255.00 + ,7067.00 + ,5813.00 + ,4787.00) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 21571 21051 20097 19064 17668 15388 10601 6333 3163 3163 NA [2,] 21493 21643 20467 19805 17817 15680 10750 6697 4709 5008 NA [3,] 21422 21864 21051 20168 18480 15751 10750 6255 4488 4859 NA [4,] 21272 21643 21272 20246 17960 15830 10601 6404 4566 4930 NA [5,] 22747 22455 21792 21643 19363 17226 11854 7509 6333 6476 NA [6,] 22676 21935 21571 21643 19584 17076 11926 7730 6112 6333 NA [7,] 21571 20759 20246 19805 18180 15388 10451 6996 5300 5813 NA [8,] 20831 20467 19726 19363 17668 14647 10159 6917 5671 5892 NA [9,] 20909 20467 19506 19363 17375 14355 9568 6917 5671 6255 NA [10,] 20909 20610 19726 19584 17668 14725 10380 7879 6996 7067 NA [11,] 20980 20026 19363 18622 16855 13322 8905 6184 5450 5813 NA [12,] 21130 20467 19506 18180 16563 12367 8022 5079 4566 4787 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -78 592 370 741 149 292 149 364 1546 1845 NA [2,] -71 221 584 363 663 71 0 -442 -221 -149 NA [3,] -150 -221 221 78 -520 79 -149 149 78 71 NA [4,] 1475 812 520 1397 1403 1396 1253 1105 1767 1546 NA [5,] -71 -520 -221 0 221 -150 72 221 -221 -143 NA [6,] -1105 -1176 -1325 -1838 -1404 -1688 -1475 -734 -812 -520 NA [7,] -740 -292 -520 -442 -512 -741 -292 -79 371 79 NA [8,] 78 0 -220 0 -293 -292 -591 0 0 363 NA [9,] 0 143 220 221 293 370 812 962 1325 812 NA [10,] 71 -584 -363 -962 -813 -1403 -1475 -1695 -1546 -1254 NA [11,] 150 441 143 -442 -292 -955 -883 -1105 -884 -1026 NA [12,] -79 -370 -442 -512 -1175 -1766 -1689 -1916 -1403 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/1bhl11471277691.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/2hrch1471277691.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/35rvx1471277691.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/4jcsr1471277691.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] [1,] 3163 4709.0 4488.0 4566 6333.0 6112 5300 5671.0 5671 6996.0 [2,] 6333 6697.0 6255.0 6404 7509.0 7730 6996 6917.0 6917 7879.0 [3,] 16528 16748.5 17115.5 16895 18294.5 18330 16784 16157.5 15865 16196.5 [4,] 20097 20467.0 21051.0 21272 21792.0 21643 20246 19726.0 19506 19726.0 [5,] 21571 21643.0 21864.0 21643 22747.0 22676 21571 20831.0 20909 20909.0 [,11] [,12] [1,] 5450.0 4566 [2,] 6184.0 5079 [3,] 15088.5 14465 [4,] 19363.0 19506 [5,] 20980.0 21130 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 9650.957 9868.459 9722.828 9466.354 11158.14 11378.51 10163.77 [2,] 23405.043 23628.541 24508.172 24323.646 25430.86 25281.49 23404.23 [,8] [,9] [,10] [,11] [,12] [1,] 9757.613 9575.034 10277.27 8503.746 7256.696 [2,] 22557.387 22154.966 22115.73 21673.254 21673.304 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(3163, 6333, 16528, 20097, 21571, 4709, 6697, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5rrrt1471277691.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] [1,] -78 -442.0 -221.0 812.0 -520 -1838.0 -741 -591 0.0 -1695 -1105.0 [2,] 149 -149.0 -150.0 1105.0 -221 -1475.0 -520 -292 220.0 -1475 -955.0 [3,] 367 35.5 74.5 1396.5 -107 -1250.5 -367 0 331.5 -1108 -662.5 [4,] 741 363.0 79.0 1475.0 72 -812.0 -79 0 812.0 -584 143.0 [5,] 1546 663.0 221.0 1767.0 221 -520.0 371 363 1325.0 71 441.0 [,12] [1,] -1916 [2,] -1689 [3,] -1175 [4,] -442 [5,] -79 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 71.2132 -220.3156 -39.91753 1211.633 -253.39448 -1581.7612 -587.3412 [2,] 662.7868 291.3156 188.91753 1581.367 39.39448 -919.2388 -146.6588 [,8] [,9] [,10] [,11] [,12] [1,] -145.8948 35.7132 -1553.1791 -1211.1046 -1831.7533 [2,] 145.8948 627.2868 -662.8209 -113.8954 -518.2467 $out [1] 1845 -520 520 $group [1] 1 3 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-78, 149, 367, 741, 1546, -442, -149, 35.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/65jwb1471277691.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] [1,] 20831.0 20026.0 19363.0 18180.0 16563.0 13322.0 8905.0 5079.0 3163.0 [2,] 20944.5 20467.0 19616.0 19213.5 17521.5 14501.0 9863.5 6294.0 4566.0 [3,] 21347.0 20905.0 20171.5 19694.5 17742.5 15388.0 10526.0 6807.0 5375.0 [4,] 21571.0 21753.5 21161.5 20207.0 18330.0 15790.5 10750.0 7252.5 5891.5 [5,] 21571.0 22455.0 21792.0 21643.0 19363.0 17226.0 11926.0 7879.0 6996.0 [,10] [,11] [1,] 3163.0 NA [2,] 4894.5 NA [3,] 5813.0 NA [4,] 6294.0 NA [5,] 7067.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 21061.25 20318.22 19466.59 19241.36 17373.74 14799.85 10121.66 6369.822 [2,] 21632.75 21491.78 20876.41 20147.64 18111.26 15976.15 10930.34 7244.178 [,9] [,10] [,11] [1,] 4770.431 5174.679 NA [2,] 5979.569 6451.321 NA $out [1] 22747 22676 19584 12367 8022 $group [1] 1 1 5 6 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(20831, 20944.5, 21347, 21571, 21571, 20026, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7zrbj1471277691.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,] 13066.70 15088.50 13021.00 [2,] 13924.25 16011.25 13572.19 [3,] 14428.90 16638.25 14001.81 [4,] 14531.60 17005.25 14169.44 [5,] 14554.40 18330.00 14234.38 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 14151.88 16184.88 13729.40 [2,] 14705.92 17091.62 14274.22 $out [1] 15739.80 15658.60 14465.00 15175.00 15202.00 12494.62 $group [1] 1 1 2 3 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(13066.7, 13924.25, 14428.9, 14531.6, 14554.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1bhl11471277691.ps tmp/1bhl11471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/2hrch1471277691.ps tmp/2hrch1471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/35rvx1471277691.ps tmp/35rvx1471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/4jcsr1471277691.ps tmp/4jcsr1471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/5rrrt1471277691.ps tmp/5rrrt1471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/65jwb1471277691.ps tmp/65jwb1471277691.png",intern=TRUE)) character(0) > try(system("convert tmp/7zrbj1471277691.ps tmp/7zrbj1471277691.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.602 0.216 2.869