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(2341 + ,2115 + ,2402 + ,2180 + ,2453 + ,2507 + ,2679 + ,2622 + ,2618 + ,2648 + ,2523 + ,2473 + ,2513 + ,2466 + ,2544 + ,2537 + ,2564 + ,2582 + ,2716 + ,2904 + ,2851 + ,2932 + ,2772 + ,2811 + ,2935 + ,2783 + ,3003 + ,2995 + ,3127 + ,2985 + ,3287 + ,3236 + ,3252 + ,3228 + ,2856 + ,3176 + ,3362 + ,3036 + ,3330 + ,3251 + ,3318 + ,3238 + ,3597 + ,3708 + ,3902 + ,3745 + ,3426 + ,3526 + ,3483 + ,3458 + ,3824 + ,3696 + ,3518 + ,3814 + ,3996 + ,4136 + ,4037 + ,3915 + ,3760 + ,3955 + ,4160 + ,4115 + ,4202 + ,4018 + ,4233 + ,4029 + ,4401 + ,4645 + ,4491 + ,4379 + ,4394 + ,4472 + ,4614 + ,4160 + ,4328 + ,4202 + ,4635 + ,4542 + ,4920 + ,4774 + ,4698 + ,4916 + ,4703 + ,4616 + ,4873 + ,4375 + ,4801 + ,4427 + ,4684 + ,4648 + ,5225 + ,5174 + ,5181 + ,5266 + ,4839 + ,5032 + ,5221 + ,4658 + ,5014 + ,4980 + ,4952 + ,4946 + ,5365 + ,5456 + ,5397 + ,5436 + ,4995 + ,5019 + ,5249 + ,4799 + ,5137 + ,4979 + ,4951 + ,5265 + ,5612 + ,5572 + ,5403 + ,5373 + ,5252 + ,5437 + ,5296 + ,5011 + ,5294 + ,5335 + ,5398 + ,5396 + ,5724 + ,5898 + ,5718 + ,5625 + ,5380 + ,5488 + ,5678 + ,5224 + ,5596 + ,5184 + ,5620 + ,5531 + ,5816 + ,6086 + ,6175 + ,6112 + ,5813 + ,5740 + ,5821 + ,5294 + ,5881 + ,5589 + ,5845 + ,5706 + ,6355 + ,6404 + ,6426 + ,6375 + ,5869 + ,5994 + ,6105 + ,5792 + ,6011 + ,5968 + ,6255 + ,6208 + ,6897 + ,6814 + ,6897 + ,6596 + ,6188 + ,6406 + ,6548 + ,5842 + ,6555 + ,6424 + ,6596 + ,6645 + ,7203 + ,7128 + ,7133 + ,6778 + ,6593 + ,6591 + ,6120 + ,5612 + ,6070 + ,5983 + ,6145 + ,6303 + ,6588 + ,6640 + ,6719 + ,6575 + ,6487 + ,6510 + ,6365 + ,5844 + ,5974 + ,5880 + ,6279 + ,6342 + ,6598 + ,6801 + ,6529 + ,6369 + ,6028 + ,6187 + ,6164 + ,5866 + ,6198 + ,5898 + ,6462 + ,6063 + ,6496 + ,6678 + ,6554 + ,6513 + ,6210 + ,5928 + ,6268 + ,5582 + ,5869 + ,5764 + ,6082 + ,6062 + ,6810 + ,6727 + ,6537 + ,6175 + ,6014 + ,6109) > par1 = '36' > par1 <- '36' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Mon, 30 Nov 2015 07:01:18 +0000) > #Author: root > #To cite this work: Wessa P., (2015), Mean Plot (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > x <- na.omit(x) > (n <- length(x)) [1] 228 > (np <- floor(n / par1)) [1] 6 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2341 3362 4614 5249 5821 6120 6268 [2,] 2115 3036 4160 4799 5294 5612 5582 [3,] 2402 3330 4328 5137 5881 6070 5869 [4,] 2180 3251 4202 4979 5589 5983 5764 [5,] 2453 3318 4635 4951 5845 6145 6082 [6,] 2507 3238 4542 5265 5706 6303 6062 [7,] 2679 3597 4920 5612 6355 6588 6810 [8,] 2622 3708 4774 5572 6404 6640 6727 [9,] 2618 3902 4698 5403 6426 6719 6537 [10,] 2648 3745 4916 5373 6375 6575 6175 [11,] 2523 3426 4703 5252 5869 6487 6014 [12,] 2473 3526 4616 5437 5994 6510 6109 [13,] 2513 3483 4873 5296 6105 6365 NA [14,] 2466 3458 4375 5011 5792 5844 NA [15,] 2544 3824 4801 5294 6011 5974 NA [16,] 2537 3696 4427 5335 5968 5880 NA [17,] 2564 3518 4684 5398 6255 6279 NA [18,] 2582 3814 4648 5396 6208 6342 NA [19,] 2716 3996 5225 5724 6897 6598 NA [20,] 2904 4136 5174 5898 6814 6801 NA [21,] 2851 4037 5181 5718 6897 6529 NA [22,] 2932 3915 5266 5625 6596 6369 NA [23,] 2772 3760 4839 5380 6188 6028 NA [24,] 2811 3955 5032 5488 6406 6187 NA [25,] 2935 4160 5221 5678 6548 6164 NA [26,] 2783 4115 4658 5224 5842 5866 NA [27,] 3003 4202 5014 5596 6555 6198 NA [28,] 2995 4018 4980 5184 6424 5898 NA [29,] 3127 4233 4952 5620 6596 6462 NA [30,] 2985 4029 4946 5531 6645 6063 NA [31,] 3287 4401 5365 5816 7203 6496 NA [32,] 3236 4645 5456 6086 7128 6678 NA [33,] 3252 4491 5397 6175 7133 6554 NA [34,] 3228 4379 5436 6112 6778 6513 NA [35,] 2856 4394 4995 5813 6593 6210 NA [36,] 3176 4472 5019 5740 6591 5928 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -226 -326 -454 -450 -527 -508 -686 [2,] 287 294 168 338 587 458 287 [3,] -222 -79 -126 -158 -292 -87 -105 [4,] 273 67 433 -28 256 162 318 [5,] 54 -80 -93 314 -139 158 -20 [6,] 172 359 378 347 649 285 748 [7,] -57 111 -146 -40 49 52 -83 [8,] -4 194 -76 -169 22 79 -190 [9,] 30 -157 218 -30 -51 -144 -362 [10,] -125 -319 -213 -121 -506 -88 -161 [11,] -50 100 -87 185 125 23 95 [12,] 40 -43 257 -141 111 -145 NA [13,] -47 -25 -498 -285 -313 -521 NA [14,] 78 366 426 283 219 130 NA [15,] -7 -128 -374 41 -43 -94 NA [16,] 27 -178 257 63 287 399 NA [17,] 18 296 -36 -2 -47 63 NA [18,] 134 182 577 328 689 256 NA [19,] 188 140 -51 174 -83 203 NA [20,] -53 -99 7 -180 83 -272 NA [21,] 81 -122 85 -93 -301 -160 NA [22,] -160 -155 -427 -245 -408 -341 NA [23,] 39 195 193 108 218 159 NA [24,] 124 205 189 190 142 -23 NA [25,] -152 -45 -563 -454 -706 -298 NA [26,] 220 87 356 372 713 332 NA [27,] -8 -184 -34 -412 -131 -300 NA [28,] 132 215 -28 436 172 564 NA [29,] -142 -204 -6 -89 49 -399 NA [30,] 302 372 419 285 558 433 NA [31,] -51 244 91 270 -75 182 NA [32,] 16 -154 -59 89 5 -124 NA [33,] -24 -112 39 -63 -355 -41 NA [34,] -372 15 -441 -299 -185 -303 NA [35,] 320 78 24 -73 -2 -282 NA [36,] 186 142 230 81 -471 340 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/1iw841457981796.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/2es9v1457981796.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/3z5eo1457981796.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/4bs0h1457981796.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] [1,] 2341.0 2115 2402 2180.0 2453.0 2507 2679.0 2622 2618.0 2648.0 2523.0 [2,] 3988.0 3598 3829 3726.5 3976.5 3890 4258.5 4241 4300.0 4330.5 4064.5 [3,] 5249.0 4799 5137 4979.0 4951.0 5265 5612.0 5572 5403.0 5373.0 5252.0 [4,] 5970.5 5438 5875 5676.5 5963.5 5884 6471.5 6522 6481.5 6275.0 5941.5 [5,] 6268.0 5612 6070 5983.0 6145.0 6303 6810.0 6727 6719.0 6575.0 6487.0 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] 2473.0 2513.0 2466 2544.0 2537 2564 2582 2716.0 2904 2851.0 2932.0 [2,] 4071.0 3483.0 3458 3824.0 3696 3518 3814 3996.0 4136 4037.0 3915.0 [3,] 5437.0 5084.5 4693 5047.5 4881 5041 5022 5474.5 5536 5449.5 5445.5 [4,] 6051.5 6105.0 5792 5974.0 5880 6255 6208 6598.0 6801 6529.0 6369.0 [5,] 6510.0 6365.0 5844 6011.0 5968 6279 6342 6897.0 6814 6897.0 6596.0 [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [1,] 2772.0 2811 2935.0 2783 3003 2995 3127 2985.0 3287.0 3236 3252 [2,] 3760.0 3955 4160.0 4115 4202 4018 4233 4029.0 4401.0 4645 4491 [3,] 5109.5 5260 5449.5 4941 5305 5082 5286 5238.5 5590.5 5771 5786 [4,] 6028.0 6187 6164.0 5842 6198 5898 6462 6063.0 6496.0 6678 6554 [5,] 6188.0 6406 6548.0 5866 6555 6424 6596 6645.0 7203.0 7128 7133 [,34] [,35] [,36] [1,] 3228 2856 3176.0 [2,] 4379 4394 4472.0 [3,] 5774 5404 5379.5 [4,] 6513 6210 5928.0 [5,] 6778 6593 6591.0 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 4065.083 3700.182 3915.162 3814.491 3764.396 4074.215 4290.432 4209.824 [2,] 6432.917 5897.818 6358.838 6143.509 6137.604 6455.785 6933.568 6934.176 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 4100.243 4211.776 4131.086 4254.277 3393.225 3187.495 3660.681 3472.249 [2,] 6705.757 6534.224 6372.914 6619.723 6775.775 6198.505 6434.319 6289.751 [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 3275.547 3477.793 3796.126 3816.989 3842.08 3862.591 3646.567 3820.288 [2,] 6806.453 6566.207 7152.874 7255.011 7056.92 7028.409 6572.433 6699.712 [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [1,] 4156.855 3827.029 4017.516 3869.339 3848.223 3926.504 4239.157 4459.649 [2,] 6742.145 6054.971 6592.484 6294.661 6723.777 6550.496 6941.843 7082.351 [,33] [,34] [,35] [,36] [1,] 4455.298 4397.501 4232.621 4440.333 [2,] 7116.702 7150.499 6575.379 6318.667 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" "33" "34" "35" "36" Warning message: In bxp(list(stats = c(2341, 3988, 5249, 5970.5, 6268, 2115, 3598, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5r2du1457981796.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,] -686.0 168 -292 -28.0 -139.0 172.0 -146.0 -190.0 -362.0 -319 -87.0 [2,] -517.5 287 -190 114.5 -86.5 316.0 -70.0 -122.5 -150.5 -266 -13.5 [3,] -454.0 294 -126 256.0 -20.0 359.0 -40.0 -4.0 -51.0 -161 95.0 [4,] -388.0 398 -96 295.5 106.0 513.5 50.5 50.5 0.0 -123 112.5 [5,] -226.0 458 -79 433.0 314.0 748.0 111.0 194.0 218.0 -88 185.0 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [1,] -145.0 -521 78 -128.0 -178 -47 134 -83 -272 -301.0 -427 39 [2,] -141.0 -498 130 -128.0 27 -36 182 -51 -180 -160.0 -408 108 [3,] -1.5 -299 251 -68.5 160 8 292 157 -76 -107.5 -293 176 [4,] 111.0 -47 366 -7.0 287 63 577 188 7 81.0 -160 195 [5,] 257.0 -25 426 41.0 399 63 689 203 83 85.0 -155 218 [,24] [,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 124.0 -706 87 -412.0 -28.0 -399.0 285.0 -75.0 -154 -112 -441 -282 [2,] 124.0 -563 220 -300.0 132.0 -204.0 302.0 -51.0 -124 -112 -372 -73 [3,] 165.5 -376 344 -157.5 193.5 -115.5 395.5 136.5 -27 -52 -301 11 [4,] 190.0 -152 372 -34.0 436.0 -6.0 433.0 244.0 16 -24 -185 78 [5,] 205.0 -45 372 -8.0 564.0 49.0 558.0 270.0 89 39 15 78 [,36] [1,] 81 [2,] 81 [3,] 164 [4,] 230 [5,] 340 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -531.3353 227.7126 -182.13528 147.9097 -134.95789 241.0562 -111.96066 [2,] -376.6647 360.2874 -69.86472 364.0903 94.95789 476.9438 31.96066 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -107.31281 -140.87617 -246.39729 19.75483 -164.0481 -589.909567 98.77238 [2,] 99.31281 38.87617 -75.60271 170.24517 161.0481 -8.090433 403.22762 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -146.548908 -7.708398 -55.8582 37.21224 2.837281 -196.62104 -262.95278 [2,] 9.548908 327.708398 71.8582 546.78776 311.162719 44.62104 47.95278 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -452.968 119.8822 122.9279 -641.1083 245.9551 -329.07859 -2.589819 [2,] -133.032 232.1178 208.0721 -110.8917 442.0449 14.07859 389.589819 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -243.2164 311.0008 -53.78453 -117.30452 -108.762842 -421.621 -86.39988 [2,] 12.2164 479.9992 326.78453 63.30452 4.762842 -180.379 108.39988 [,36] [1,] 67.89019 [2,] 260.10981 $out [1] 587 -506 -374 296 -23 713 -355 320 -471 $group [1] 2 10 15 17 24 26 33 35 36 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" "33" "34" "35" "36" Warning message: In bxp(list(stats = c(-686, -517.5, -454, -388, -226, 168, 287, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6btw11457981796.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] [1,] 2115.0 3036.0 4160.0 4799.0 5294.0 5612.0 5582.0 [2,] 2518.0 3500.5 4641.5 5258.5 5924.5 6045.5 5941.5 [3,] 2697.5 3863.0 4894.5 5420.0 6389.5 6291.0 6095.5 [4,] 2960.0 4148.0 5103.0 5698.0 6596.0 6521.0 6402.5 [5,] 3287.0 4645.0 5456.0 6175.0 7203.0 6801.0 6810.0 $n [1] 36 36 36 36 36 36 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2581.107 3692.492 4772.972 5304.265 6212.672 6165.785 5885.235 [2,] 2813.893 4033.508 5016.028 5535.735 6566.328 6416.215 6305.765 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(2115, 2518, 2697.5, 2960, 3287, 3036, 3500.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7i38r1457981796.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,] 4371.143 4693.00 4518.000 [2,] 4779.286 5064.75 4942.000 [3,] 5006.500 5275.50 5106.188 [4,] 5189.405 5449.50 5336.750 [5,] 5538.167 5786.00 5688.875 $n [1] 36 36 36 $conf [,1] [,2] [,3] [1,] 4898.502 5174.182 5002.237 [2,] 5114.498 5376.818 5210.138 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1iw841457981796.ps tmp/1iw841457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/2es9v1457981796.ps tmp/2es9v1457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/3z5eo1457981796.ps tmp/3z5eo1457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/4bs0h1457981796.ps tmp/4bs0h1457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/5r2du1457981796.ps tmp/5r2du1457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/6btw11457981796.ps tmp/6btw11457981796.png",intern=TRUE)) character(0) > try(system("convert tmp/7i38r1457981796.ps tmp/7i38r1457981796.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.696 0.485 3.211