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(7612 + ,7381 + ,6978 + ,6819 + ,6688 + ,6454 + ,6679 + ,6921 + ,7807 + ,7898 + ,7832 + ,7384 + ,7620 + ,7281 + ,6929 + ,6587 + ,6071 + ,5928 + ,5964 + ,6374 + ,7160 + ,7213 + ,6890 + ,6525 + ,6739 + ,6580 + ,6391 + ,6254 + ,6114 + ,5978 + ,6315 + ,6427 + ,7132 + ,7292 + ,7708 + ,7525 + ,7450 + ,7526 + ,7263 + ,7070 + ,6893 + ,6781 + ,7188 + ,7015 + ,8273 + ,8470 + ,8230 + ,8137 + ,8122 + ,8367 + ,8141 + ,7750 + ,7504 + ,7330 + ,7608 + ,7647 + ,8942 + ,8865 + ,8320 + ,8207 + ,8105 + ,8290 + ,8162 + ,8051 + ,7699 + ,7440 + ,7656 + ,7549 + ,9086 + ,8942 + ,8764 + ,8500 + ,8239 + ,8443 + ,8349 + ,8288 + ,7970 + ,7496 + ,7745 + ,7543 + ,9036 + ,9075 + ,8859 + ,8605 + ,8419 + ,8495 + ,8284 + ,7582 + ,7691 + ,7046 + ,7442 + ,7596 + ,8597 + ,8436 + ,7881 + ,7477 + ,7508 + ,7361 + ,7299 + ,6914 + ,6768 + ,6746 + ,7052 + ,7139 + ,7714 + ,7750 + ,7622 + ,7424 + ,7444 + ,7208 + ,7128 + ,7022 + ,6688 + ,6199 + ,6400 + ,6474 + ,7182 + ,7330 + ,7410 + ,7442 + ,7753 + ,7762 + ,7814 + ,7838 + ,7298 + ,7155 + ,7076 + ,7450 + ,8216 + ,8246 + ,8335 + ,8171 + ,8485 + ,8435 + ,8369 + ,8210 + ,7888 + ,8061 + ,8139 + ,7837 + ,8943 + ,8523 + ,8104 + ,7969 + ,7921 + ,7930 + ,7706 + ,7552 + ,7379 + ,6946 + ,7128 + ,7393 + ,8092 + ,8004 + ,7903 + ,7710 + ,7867 + ,7860 + ,7723 + ,7477 + ,7126 + ,7161 + ,7162 + ,7406 + ,7944 + ,8084 + ,8088 + ,7972 + ,8184 + ,7914 + ,7845 + ,7610 + ,7278 + ,6883 + ,7123 + ,7182 + ,7912 + ,7893 + ,7671 + ,7403 + ,7663 + ,7589 + ,7450 + ,7069 + ,6670 + ,6285 + ,6506 + ,6539 + ,7291 + ,7391 + ,7126 + ,6752 + ,6835 + ,6664 + ,6562 + ,6174 + ,5741 + ,5398 + ,5203 + ,5673 + ,6379 + ,6418 + ,6272 + ,6059) > par1 = '12' > par1 <- '12' > #'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] 204 > (np <- floor(n / par1)) [1] 17 > 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] 17 17 17 17 17 17 17 17 17 17 17 17 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 7612 7620 6739 7450 8122 8105 8239 8419 7508 7444 7753 8485 7921 [2,] 7381 7281 6580 7526 8367 8290 8443 8495 7361 7208 7762 8435 7930 [3,] 6978 6929 6391 7263 8141 8162 8349 8284 7299 7128 7814 8369 7706 [4,] 6819 6587 6254 7070 7750 8051 8288 7582 6914 7022 7838 8210 7552 [5,] 6688 6071 6114 6893 7504 7699 7970 7691 6768 6688 7298 7888 7379 [6,] 6454 5928 5978 6781 7330 7440 7496 7046 6746 6199 7155 8061 6946 [7,] 6679 5964 6315 7188 7608 7656 7745 7442 7052 6400 7076 8139 7128 [8,] 6921 6374 6427 7015 7647 7549 7543 7596 7139 6474 7450 7837 7393 [9,] 7807 7160 7132 8273 8942 9086 9036 8597 7714 7182 8216 8943 8092 [10,] 7898 7213 7292 8470 8865 8942 9075 8436 7750 7330 8246 8523 8004 [11,] 7832 6890 7708 8230 8320 8764 8859 7881 7622 7410 8335 8104 7903 [12,] 7384 6525 7525 8137 8207 8500 8605 7477 7424 7442 8171 7969 7710 [,14] [,15] [,16] [,17] [,18] [1,] 7867 8184 7663 6835 NA [2,] 7860 7914 7589 6664 NA [3,] 7723 7845 7450 6562 NA [4,] 7477 7610 7069 6174 NA [5,] 7126 7278 6670 5741 NA [6,] 7161 6883 6285 5398 NA [7,] 7162 7123 6506 5203 NA [8,] 7406 7182 6539 5673 NA [9,] 7944 7912 7291 6379 NA [10,] 8084 7893 7391 6418 NA [11,] 8088 7671 7126 6272 NA [12,] 7972 7403 6752 6059 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -231 -339 -159 76 245 185 204 76 -147 -236 9 -50 9 [2,] -403 -352 -189 -263 -226 -128 -94 -211 -62 -80 52 -66 -224 [3,] -159 -342 -137 -193 -391 -111 -61 -702 -385 -106 24 -159 -154 [4,] -131 -516 -140 -177 -246 -352 -318 109 -146 -334 -540 -322 -173 [5,] -234 -143 -136 -112 -174 -259 -474 -645 -22 -489 -143 173 -433 [6,] 225 36 337 407 278 216 249 396 306 201 -79 78 182 [7,] 242 410 112 -173 39 -107 -202 154 87 74 374 -302 265 [8,] 886 786 705 1258 1295 1537 1493 1001 575 708 766 1106 699 [9,] 91 53 160 197 -77 -144 39 -161 36 148 30 -420 -88 [10,] -66 -323 416 -240 -545 -178 -216 -555 -128 80 89 -419 -101 [11,] -448 -365 -183 -93 -113 -264 -254 -404 -198 32 -164 -135 -193 [12,] 236 214 -75 -15 -102 -261 -186 31 20 311 314 -48 157 [,14] [,15] [,16] [,17] [,18] [1,] -7 -270 -74 -171 NA [2,] -137 -69 -139 -102 NA [3,] -246 -235 -381 -388 NA [4,] -351 -332 -399 -433 NA [5,] 35 -395 -385 -343 NA [6,] 1 240 221 -195 NA [7,] 244 59 33 470 NA [8,] 538 730 752 706 NA [9,] 140 -19 100 39 NA [10,] 4 -222 -265 -146 NA [11,] -116 -268 -374 -213 NA [12,] 212 260 83 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/1mxcp1457198288.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/25i1z1457198288.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/3lsx21457198288.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/4wg4z1457198288.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,] 6739 6580 6391 6174 5741 5398 5203 5673 6379 6418 6890 6525 [2,] 7508 7361 7128 6914 6688 6285 6506 6539 7291 7391 7622 7403 [3,] 7753 7762 7706 7477 7126 6883 7123 7182 7944 8004 7881 7525 [4,] 8122 8290 8141 7750 7504 7161 7442 7543 8597 8470 8230 8137 [5,] 8485 8495 8369 8288 7970 8061 8139 7837 9086 9075 8859 8605 $n [1] 17 17 17 17 17 17 17 17 17 17 17 17 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 7517.711 7406.001 7317.812 7156.64 6813.304 6547.311 6764.319 6797.261 [2,] 7988.289 8117.999 8094.188 7797.36 7438.696 7218.689 7481.681 7566.739 [,9] [,10] [,11] [,12] [1,] 7443.533 7590.52 7648.011 7243.727 [2,] 8444.467 8417.48 8113.989 7806.273 $out [1] 6272 6059 $group [1] 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(6739, 7508, 7753, 8122, 8485, 6580, 7361, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/549151457198288.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,] -339 -403 -702 -540 -645 -195 -202 538 -161 -555 -448 -261.0 [2,] -171 -224 -381 -352 -395 78 33 706 -77 -265 -268 -61.5 [3,] -50 -137 -193 -322 -234 221 87 766 39 -178 -198 57.0 [4,] 76 -80 -137 -173 -136 278 244 1106 100 -66 -135 225.0 [5,] 245 52 24 -131 173 407 470 1537 197 89 32 314.0 $n [1] 17 17 17 17 17 17 17 17 17 17 17 16 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -144.65195 -192.18171 -286.50233 -390.5939 -333.2504 144.3587 6.143473 [2,] 44.65195 -81.81829 -99.49767 -253.4061 -134.7496 297.6413 167.856527 [,8] [,9] [,10] [,11] [,12] [1,] 612.7175 -28.82751 -254.2581 -248.9664 -56.1675 [2,] 919.2825 106.82751 -101.7419 -147.0336 170.1675 $out [1] 109 -302 -420 416 $group [1] 4 7 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-339, -171, -50, 76, 245, -403, -224, -137, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/67l4e1457198288.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] [1,] 6454.0 5928.0 5978.0 6781.0 7330.0 7440.0 7496.0 7046.0 6746 6199 7076.0 [2,] 6753.5 6222.5 6284.5 7042.5 7627.5 7677.5 7857.5 7529.5 6983 6581 7374.0 [3,] 7179.5 6738.5 6503.5 7356.5 8131.5 8133.5 8318.5 7786.0 7330 7155 7788.0 [4,] 7709.5 7186.5 7212.0 8183.5 8343.5 8632.0 8732.0 8427.5 7565 7370 8193.5 [5,] 7898.0 7620.0 7708.0 8470.0 8942.0 9086.0 9075.0 8597.0 7750 7444 8335.0 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 7837.0 6946.0 7126.0 6883.0 6285.0 5203 NA [2,] 8015.0 7386.0 7284.0 7230.0 6604.5 5707 NA [3,] 8174.5 7708.0 7791.5 7640.5 7097.5 6223 NA [4,] 8460.0 7925.5 7958.0 7902.5 7420.5 6490 NA [5,] 8943.0 8092.0 8088.0 8184.0 7663.0 6835 NA $n [1] 12 12 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,] 6743.462 6298.813 6080.461 6836.082 7804.928 7698.146 7919.635 7376.416 [2,] 7615.538 7178.187 6926.539 7876.918 8458.072 8568.854 8717.365 8195.584 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 7064.546 6795.132 7414.221 7971.533 7461.93 7484.084 7333.768 6725.317 [2,] 7595.454 7514.868 8161.779 8377.467 7954.07 8098.916 7947.232 7469.683 [,17] [,18] [1,] 5865.868 NA [2,] 6580.132 NA $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" NA Warning message: In bxp(list(stats = c(6454, 6753.5, 7179.5, 7709.5, 7898, 5928, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7byp61457198288.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,] 6781.588 6883.0 6723.00 [2,] 7047.971 7154.0 7068.50 [3,] 7578.088 7615.5 7702.25 [4,] 7793.559 7821.5 7875.75 [5,] 7990.000 8004.0 7944.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 7238.020 7311.049 7334.058 [2,] 7918.156 7919.951 8070.442 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(6781.58823529412, 7047.97058823529, 7578.08823529412, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1mxcp1457198288.ps tmp/1mxcp1457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/25i1z1457198288.ps tmp/25i1z1457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/3lsx21457198288.ps tmp/3lsx21457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/4wg4z1457198288.ps tmp/4wg4z1457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/549151457198288.ps tmp/549151457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/67l4e1457198288.ps tmp/67l4e1457198288.png",intern=TRUE)) character(0) > try(system("convert tmp/7byp61457198288.ps tmp/7byp61457198288.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.352 0.406 2.781