R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 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(1.0137 + ,0.9834 + ,0.9643 + ,0.947 + ,0.906 + ,0.9492 + ,0.9397 + ,0.9041 + ,0.8721 + ,0.8552 + ,0.8564 + ,0.8973 + ,0.9383 + ,0.9217 + ,0.9095 + ,0.892 + ,0.8742 + ,0.8532 + ,0.8607 + ,0.9005 + ,0.9111 + ,0.9059 + ,0.8883 + ,0.8924 + ,0.8833 + ,0.87 + ,0.8758 + ,0.8858 + ,0.917 + ,0.9554 + ,0.9922 + ,0.9778 + ,0.9808 + ,0.9811 + ,1.0014 + ,1.0183 + ,1.0622 + ,1.0773 + ,1.0807 + ,1.0848 + ,1.1582 + ,1.1663 + ,1.1372 + ,1.1139 + ,1.1222 + ,1.1692 + ,1.1702 + ,1.2286 + ,1.2613 + ,1.2646 + ,1.2262 + ,1.1985 + ,1.2007 + ,1.2138 + ,1.2266 + ,1.2176 + ,1.2218 + ,1.249 + ,1.2991 + ,1.3408 + ,1.3119 + ,1.3014 + ,1.3201 + ,1.2938 + ,1.2694 + ,1.2165 + ,1.2037 + ,1.2292 + ,1.2256 + ,1.2015 + ,1.1786 + ,1.1856 + ,1.2103 + ,1.1938 + ,1.202 + ,1.2271 + ,1.277 + ,1.265 + ,1.2684 + ,1.2811 + ,1.2727 + ,1.2611 + ,1.2881 + ,1.3213 + ,1.2999 + ,1.3074 + ,1.3242 + ,1.3516 + ,1.3511 + ,1.3419 + ,1.3716 + ,1.3622 + ,1.3896 + ,1.4227 + ,1.4684 + ,1.457 + ,1.4718 + ,1.4748 + ,1.5527 + ,1.5751 + ,1.5557 + ,1.5553 + ,1.577 + ,1.4975 + ,1.4369 + ,1.3322 + ,1.2732 + ,1.3449 + ,1.3239 + ,1.2785 + ,1.305 + ,1.319 + ,1.365 + ,1.4016 + ,1.4088 + ,1.4268 + ,1.4562 + ,1.4816 + ,1.4914 + ,1.4614 + ,1.4272 + ,1.3686 + ,1.3569 + ,1.3406 + ,1.2565 + ,1.2209 + ,1.277 + ,1.2894 + ,1.3067 + ,1.3898 + ,1.3661 + ,1.322 + ,1.336 + ,1.3649 + ,1.3999 + ,1.4442 + ,1.4349 + ,1.4388 + ,1.4264 + ,1.4343 + ,1.377 + ,1.3706 + ,1.3556 + ,1.3179 + ,1.2905 + ,1.3224 + ,1.3201 + ,1.3162 + ,1.2789 + ,1.2526 + ,1.2288 + ,1.24 + ,1.2856 + ,1.2974 + ,1.2828 + ,1.3119 + ,1.3288 + ,1.3359 + ,1.2964 + ,1.3026 + ,1.2982 + ,1.3189 + ,1.308 + ,1.331 + ,1.3348 + ,1.3635 + ,1.3493 + ,1.3704 + ,1.361 + ,1.3658 + ,1.3823 + ,1.3812 + ,1.3732 + ,1.3592 + ,1.3539 + ,1.3316 + ,1.2901 + ,1.2673 + ,1.2472 + ,1.2331) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) 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) > (n <- length(x)) [1] 180 > (np <- floor(n / par1)) [1] 15 > 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] 15 15 15 15 15 15 15 15 15 15 15 15 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1.0137 0.9383 0.8833 1.0622 1.2613 1.3119 1.2103 1.2999 1.4718 1.3239 [2,] 0.9834 0.9217 0.8700 1.0773 1.2646 1.3014 1.1938 1.3074 1.4748 1.2785 [3,] 0.9643 0.9095 0.8758 1.0807 1.2262 1.3201 1.2020 1.3242 1.5527 1.3050 [4,] 0.9470 0.8920 0.8858 1.0848 1.1985 1.2938 1.2271 1.3516 1.5751 1.3190 [5,] 0.9060 0.8742 0.9170 1.1582 1.2007 1.2694 1.2770 1.3511 1.5557 1.3650 [6,] 0.9492 0.8532 0.9554 1.1663 1.2138 1.2165 1.2650 1.3419 1.5553 1.4016 [7,] 0.9397 0.8607 0.9922 1.1372 1.2266 1.2037 1.2684 1.3716 1.5770 1.4088 [8,] 0.9041 0.9005 0.9778 1.1139 1.2176 1.2292 1.2811 1.3622 1.4975 1.4268 [9,] 0.8721 0.9111 0.9808 1.1222 1.2218 1.2256 1.2727 1.3896 1.4369 1.4562 [10,] 0.8552 0.9059 0.9811 1.1692 1.2490 1.2015 1.2611 1.4227 1.3322 1.4816 [11,] 0.8564 0.8883 1.0014 1.1702 1.2991 1.1786 1.2881 1.4684 1.2732 1.4914 [12,] 0.8973 0.8924 1.0183 1.2286 1.3408 1.1856 1.3213 1.4570 1.3449 1.4614 [,11] [,12] [,13] [,14] [,15] [,16] [1,] 1.4272 1.3360 1.2905 1.3288 1.3610 NA [2,] 1.3686 1.3649 1.3224 1.3359 1.3658 NA [3,] 1.3569 1.3999 1.3201 1.2964 1.3823 NA [4,] 1.3406 1.4442 1.3162 1.3026 1.3812 NA [5,] 1.2565 1.4349 1.2789 1.2982 1.3732 NA [6,] 1.2209 1.4388 1.2526 1.3189 1.3592 NA [7,] 1.2770 1.4264 1.2288 1.3080 1.3539 NA [8,] 1.2894 1.4343 1.2400 1.3310 1.3316 NA [9,] 1.3067 1.3770 1.2856 1.3348 1.2901 NA [10,] 1.3898 1.3706 1.2974 1.3635 1.2673 NA [11,] 1.3661 1.3556 1.2828 1.3493 1.2472 NA [12,] 1.3220 1.3179 1.3119 1.3704 1.2331 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -0.0303 -0.0166 -0.0133 0.0151 0.0033 -0.0105 -0.0165 0.0075 0.0030 [2,] -0.0191 -0.0122 0.0058 0.0034 -0.0384 0.0187 0.0082 0.0168 0.0779 [3,] -0.0173 -0.0175 0.0100 0.0041 -0.0277 -0.0263 0.0251 0.0274 0.0224 [4,] -0.0410 -0.0178 0.0312 0.0734 0.0022 -0.0244 0.0499 -0.0005 -0.0194 [5,] 0.0432 -0.0210 0.0384 0.0081 0.0131 -0.0529 -0.0120 -0.0092 -0.0004 [6,] -0.0095 0.0075 0.0368 -0.0291 0.0128 -0.0128 0.0034 0.0297 0.0217 [7,] -0.0356 0.0398 -0.0144 -0.0233 -0.0090 0.0255 0.0127 -0.0094 -0.0795 [8,] -0.0320 0.0106 0.0030 0.0083 0.0042 -0.0036 -0.0084 0.0274 -0.0606 [9,] -0.0169 -0.0052 0.0003 0.0470 0.0272 -0.0241 -0.0116 0.0331 -0.1047 [10,] 0.0012 -0.0176 0.0203 0.0010 0.0501 -0.0229 0.0270 0.0457 -0.0590 [11,] 0.0409 0.0041 0.0169 0.0584 0.0417 0.0070 0.0332 -0.0114 0.0717 [12,] 0.0410 -0.0091 0.0439 0.0327 -0.0289 0.0247 -0.0214 0.0148 -0.0210 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] -0.0454 -0.0586 0.0289 0.0319 0.0071 0.0048 NA [2,] 0.0265 -0.0117 0.0350 -0.0023 -0.0395 0.0165 NA [3,] 0.0140 -0.0163 0.0443 -0.0039 0.0062 -0.0011 NA [4,] 0.0460 -0.0841 -0.0093 -0.0373 -0.0044 -0.0080 NA [5,] 0.0366 -0.0356 0.0039 -0.0263 0.0207 -0.0140 NA [6,] 0.0072 0.0561 -0.0124 -0.0238 -0.0109 -0.0053 NA [7,] 0.0180 0.0124 0.0079 0.0112 0.0230 -0.0223 NA [8,] 0.0294 0.0173 -0.0573 0.0456 0.0038 -0.0415 NA [9,] 0.0254 0.0831 -0.0064 0.0118 0.0287 -0.0228 NA [10,] 0.0098 -0.0237 -0.0150 -0.0146 -0.0142 -0.0201 NA [11,] -0.0300 -0.0441 -0.0377 0.0291 0.0211 -0.0141 NA [12,] -0.0342 0.0140 -0.0274 0.0169 -0.0094 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/1hlbm1424976133.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/276p51424976133.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/3qv4c1424976133.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/4uhdi1424976133.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] [1,] 0.88330 0.87000 0.87580 0.88580 0.91700 0.95540 0.93970 0.90050 0.9111 [2,] 1.13625 1.13555 1.14135 1.14165 1.17945 1.19005 1.17045 1.16575 1.1720 [3,] 1.29990 1.30140 1.30500 1.30260 1.27700 1.25260 1.26840 1.28110 1.2856 [4,] 1.33240 1.35040 1.34055 1.34610 1.35805 1.35055 1.36275 1.34690 1.3559 [5,] 1.47180 1.47480 1.55270 1.57510 1.55570 1.55530 1.57700 1.49750 1.4562 [,10] [,11] [,12] [1,] 0.98110 1.00140 1.01830 [2,] 1.18535 1.17440 1.20710 [3,] 1.26730 1.28280 1.31790 [4,] 1.36705 1.35245 1.34285 [5,] 1.48160 1.49140 1.46140 $n [1] 15 15 15 15 15 15 15 15 15 15 15 15 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.21988 1.213751 1.223736 1.219194 1.204139 1.187123 1.18995 1.207199 [2,] 1.37992 1.389049 1.386264 1.386006 1.349861 1.318077 1.34685 1.355001 [,9] [,10] [,11] [,12] [1,] 1.210577 1.193175 1.210164 1.26252 [2,] 1.360623 1.341425 1.355436 1.37328 $out [1] 0.9060 0.8742 0.9492 0.8532 0.8607 0.8721 0.8552 0.9059 0.8564 0.8883 [11] 0.8973 0.8924 $group [1] 5 5 6 6 7 9 10 10 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.8833, 1.13625, 1.2999, 1.3324, 1.4718, 0.87, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5grau1424976133.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] [1,] -0.04540 -0.03950 -0.0277 -0.0410 -0.0529 -0.02910 -0.03560 -0.06060 [2,] -0.01655 -0.01195 -0.0168 -0.0219 -0.0175 -0.01165 -0.01835 -0.02020 [3,] 0.00300 0.00580 0.0041 -0.0080 -0.0004 0.00340 0.00790 0.00380 [4,] 0.00730 0.01775 0.0182 0.0167 0.0169 0.01725 0.01535 0.01395 [5,] 0.03190 0.03500 0.0443 0.0734 0.0432 0.05610 0.03980 0.04560 [,9] [,10] [,11] [,12] [1,] -0.02410 -0.05900 -0.04410 -0.03420 [2,] -0.01425 -0.01885 -0.01275 -0.02140 [3,] 0.00030 -0.01420 0.01690 0.00245 [4,] 0.02795 0.01505 0.03705 0.02470 [5,] 0.08310 0.05010 0.07170 0.04390 $n [1] 15 15 15 15 15 15 15 15 15 15 15 14 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.006729709 -0.006316241 -0.0101784 -0.023747034 -0.01443363 -0.008389878 [2,] 0.012729709 0.017916241 0.0183784 0.007747034 0.01363363 0.015189878 [,7] [,8] [,9] [,10] [,11] [1,] -0.005848058 -0.01013164 -0.01691567 -0.0280296489 -0.003416121 [2,] 0.021648058 0.01773164 0.01751567 -0.0003703511 0.037216121 [,12] [1,] -0.01701677 [2,] 0.02191677 $out [1] -0.0586 0.0779 -0.0841 -0.0795 -0.1047 $group [1] 1 2 4 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0454000000000001, -0.01655, 0.00300000000000011, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6d3tj1424976133.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,] 0.85520 0.85320 0.87000 1.06220 1.19850 1.1786 1.19380 1.29990 1.27320 [2,] 0.88470 0.88125 0.88455 1.08275 1.21570 1.2026 1.21870 1.33305 1.39090 [3,] 0.92285 0.89645 0.96660 1.12970 1.22640 1.2274 1.26670 1.35690 1.48615 [4,] 0.95675 0.91030 0.98665 1.16775 1.26295 1.2976 1.27905 1.40615 1.55550 [5,] 1.01370 0.93830 1.01830 1.22860 1.29910 1.3201 1.32130 1.46840 1.57700 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 1.27850 1.22090 1.31790 1.22880 1.2964 1.23310 NA [2,] 1.32145 1.28320 1.36025 1.26575 1.3053 1.27870 NA [3,] 1.40520 1.33130 1.38845 1.28805 1.3299 1.35655 NA [4,] 1.45880 1.36735 1.43460 1.31405 1.3426 1.36950 NA [5,] 1.49140 1.42720 1.44420 1.32240 1.3704 1.38230 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.8899875 0.8832001 0.9200315 1.090931 1.204849 1.18407 1.239174 1.323559 [2,] 0.9557125 0.9096999 1.0131685 1.168469 1.247951 1.27073 1.294226 1.390241 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 1.411075 1.342554 1.292919 1.354538 1.26602 1.312887 1.315136 NA [2,] 1.561225 1.467846 1.369681 1.422362 1.31008 1.346913 1.397964 NA $out [1] 1.3408 $group [1] 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] NA Warning message: In bxp(list(stats = c(0.8552, 0.8847, 0.92285, 0.95675, 1.0137, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7a18i1424976133.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,] 1.232213 1.2526 1.234325 [2,] 1.234153 1.2727 1.243425 [3,] 1.234540 1.2842 1.263688 [4,] 1.236920 1.3020 1.269525 [5,] 1.238667 1.3179 1.276200 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.233278 1.270836 1.251783 [2,] 1.235802 1.297564 1.275592 $out [1] 1.22870 1.24686 $group [1] 1 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.23221333333333, 1.23415333333333, 1.23454, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1hlbm1424976133.ps tmp/1hlbm1424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/276p51424976133.ps tmp/276p51424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/3qv4c1424976133.ps tmp/3qv4c1424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/4uhdi1424976133.ps tmp/4uhdi1424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/5grau1424976133.ps tmp/5grau1424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/6d3tj1424976133.ps tmp/6d3tj1424976133.png",intern=TRUE)) character(0) > try(system("convert tmp/7a18i1424976133.ps tmp/7a18i1424976133.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.595 0.459 3.079