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(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 = '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] 228 > (np <- floor(n / par1)) [1] 19 > 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] 19 19 19 19 19 19 19 19 19 19 19 19 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 2341 2513 2935 3362 3483 4160 4614 4873 5221 5249 5296 5678 5821 [2,] 2115 2466 2783 3036 3458 4115 4160 4375 4658 4799 5011 5224 5294 [3,] 2402 2544 3003 3330 3824 4202 4328 4801 5014 5137 5294 5596 5881 [4,] 2180 2537 2995 3251 3696 4018 4202 4427 4980 4979 5335 5184 5589 [5,] 2453 2564 3127 3318 3518 4233 4635 4684 4952 4951 5398 5620 5845 [6,] 2507 2582 2985 3238 3814 4029 4542 4648 4946 5265 5396 5531 5706 [7,] 2679 2716 3287 3597 3996 4401 4920 5225 5365 5612 5724 5816 6355 [8,] 2622 2904 3236 3708 4136 4645 4774 5174 5456 5572 5898 6086 6404 [9,] 2618 2851 3252 3902 4037 4491 4698 5181 5397 5403 5718 6175 6426 [10,] 2648 2932 3228 3745 3915 4379 4916 5266 5436 5373 5625 6112 6375 [11,] 2523 2772 2856 3426 3760 4394 4703 4839 4995 5252 5380 5813 5869 [12,] 2473 2811 3176 3526 3955 4472 4616 5032 5019 5437 5488 5740 5994 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 6105 6548 6120 6365 6164 6268 NA [2,] 5792 5842 5612 5844 5866 5582 NA [3,] 6011 6555 6070 5974 6198 5869 NA [4,] 5968 6424 5983 5880 5898 5764 NA [5,] 6255 6596 6145 6279 6462 6082 NA [6,] 6208 6645 6303 6342 6063 6062 NA [7,] 6897 7203 6588 6598 6496 6810 NA [8,] 6814 7128 6640 6801 6678 6727 NA [9,] 6897 7133 6719 6529 6554 6537 NA [10,] 6596 6778 6575 6369 6513 6175 NA [11,] 6188 6593 6487 6028 6210 6014 NA [12,] 6406 6591 6510 6187 5928 6109 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -226 -47 -152 -326 -25 -45 -454 -498 -563 -450 -285 -454 -527 [2,] 287 78 220 294 366 87 168 426 356 338 283 372 587 [3,] -222 -7 -8 -79 -128 -184 -126 -374 -34 -158 41 -412 -292 [4,] 273 27 132 67 -178 215 433 257 -28 -28 63 436 256 [5,] 54 18 -142 -80 296 -204 -93 -36 -6 314 -2 -89 -139 [6,] 172 134 302 359 182 372 378 577 419 347 328 285 649 [7,] -57 188 -51 111 140 244 -146 -51 91 -40 174 270 49 [8,] -4 -53 16 194 -99 -154 -76 7 -59 -169 -180 89 22 [9,] 30 81 -24 -157 -122 -112 218 85 39 -30 -93 -63 -51 [10,] -125 -160 -372 -319 -155 15 -213 -427 -441 -121 -245 -299 -506 [11,] -50 39 320 100 195 78 -87 193 24 185 108 -73 125 [12,] 40 124 186 -43 205 142 257 189 230 -141 190 81 111 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] -313 -706 -508 -521 -298 -686 NA [2,] 219 713 458 130 332 287 NA [3,] -43 -131 -87 -94 -300 -105 NA [4,] 287 172 162 399 564 318 NA [5,] -47 49 158 63 -399 -20 NA [6,] 689 558 285 256 433 748 NA [7,] -83 -75 52 203 182 -83 NA [8,] 83 5 79 -272 -124 -190 NA [9,] -301 -355 -144 -160 -41 -362 NA [10,] -408 -185 -88 -341 -303 -161 NA [11,] 218 -2 23 159 -282 95 NA [12,] 142 -471 -145 -23 340 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/1wwl11476801010.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/2suuy1476801010.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/3u9mi1476801010.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/4xju61476801010.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.0 2402.0 2180 2453.0 2507.0 2679.0 2622.0 2618 2648 2523 [2,] 3821.5 3786.5 4013.0 3857 3875.5 3921.5 4198.5 4390.5 4264 4147 4077 [3,] 5249.0 4799.0 5137.0 4980 4952.0 5265.0 5612.0 5572.0 5403 5436 5252 [4,] 6112.5 5597.0 5927.5 5822 6113.5 6062.5 6542.0 6659.0 6533 6372 6021 [5,] 6548.0 5866.0 6555.0 6424 6596.0 6645.0 7203.0 7128.0 7133 6778 6593 [,12] [1,] 2473.0 [2,] 4213.5 [3,] 5437.0 [4,] 6051.5 [5,] 6591.0 $n [1] 19 19 19 19 19 19 19 19 19 19 19 19 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 4418.566 4142.736 4443.038 4267.733 4140.777 4488.937 4762.535 4749.721 [2,] 6079.434 5455.264 5830.962 5692.267 5763.223 6041.063 6461.465 6394.279 [,9] [,10] [,11] [,12] [1,] 4580.54 4629.489 4547.345 4770.768 [2,] 6225.46 6242.511 5956.655 6103.232 $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(2341, 3821.5, 5249, 6112.5, 6548, 2115, 3786.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/532ll1476801010.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,] -706.0 78.0 -412 -178.0 -204.0 134.0 -146 -272 -362.0 -506.0 -87.0 -145 [2,] -514.5 219.5 -203 65.0 -91.0 285.0 -54 -139 -150.5 -356.5 10.5 -23 [3,] -450.0 294.0 -126 215.0 -20.0 359.0 52 -53 -63.0 -245.0 95.0 133 [4,] -255.5 369.0 -61 302.5 51.5 495.5 178 19 3.0 -157.5 172.0 190 [5,] -25.0 587.0 41 564.0 158.0 748.0 270 194 218.0 15.0 320.0 340 $n [1] 19 19 19 19 19 19 19 19 19 19 19 18 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -543.8815 239.8097 -177.47171 128.9117 -71.65295 282.6986 -32.09463 [2,] -356.1185 348.1903 -74.52829 301.0883 31.65295 435.3014 136.09463 [,8] [,9] [,10] [,11] [,12] [1,] -110.271344 -118.640198 -317.1329 36.45999 53.67676 [2,] 4.271344 -7.359802 -172.8671 153.54001 212.32324 $out [1] 713 296 314 -399 -282 -471 $group [1] 2 5 5 5 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-706, -514.5, -450, -255.5, -25, 78, 219.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6i4yl1476801010.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,] 2115.0 2466.0 2783 3036.0 3458.0 4018.0 4160.0 4375.0 4658.0 4799.0 5011.0 [2,] 2371.5 2540.5 2960 3284.5 3607.0 4137.5 4435.0 4666.0 4966.0 5058.0 5315.5 [3,] 2490.0 2649.0 3065 3394.0 3819.0 4306.0 4625.5 4856.0 5016.5 5258.5 5397.0 [4,] 2620.0 2831.0 3232 3652.5 3975.5 4436.5 4738.5 5177.5 5381.0 5420.0 5671.5 [5,] 2679.0 2932.0 3287 3902.0 4136.0 4645.0 4920.0 5266.0 5456.0 5612.0 5898.0 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 5184.0 5294.0 5792.0 6424.0 5612.0 5844.0 5866.0 5582.0 NA [2,] 5563.5 5763.5 6058.0 6551.5 6095.0 6001.0 5995.5 5941.5 NA [3,] 5709.0 5875.0 6231.5 6594.5 6395.0 6310.5 6204.0 6095.5 NA [4,] 5951.0 6365.0 6705.0 6953.0 6581.5 6449.0 6504.5 6402.5 NA [5,] 6175.0 6426.0 6897.0 7203.0 6719.0 6801.0 6678.0 6810.0 NA $n [1] 12 12 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,] 2376.657 2516.501 2940.939 3226.153 3650.925 4169.624 4487.072 4622.701 [2,] 2603.343 2781.499 3189.061 3561.847 3987.075 4442.376 4763.928 5089.299 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 4827.216 5093.389 5234.626 5532.259 5600.652 5936.399 6411.373 6173.104 [2,] 5205.784 5423.611 5559.374 5885.741 6149.348 6526.601 6777.627 6616.896 [,17] [,18] [,19] [,20] [1,] 6106.164 5971.842 5885.235 NA [2,] 6514.836 6436.158 6305.765 NA $out [1] 5842 $group [1] 15 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" NA Warning message: In bxp(list(stats = c(2115, 2371.5, 2490, 2620, 2679, 2466, 2540.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/77c7g1476801010.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,] 4528.000 4799.0 4691.750 [2,] 4864.342 5058.5 4968.625 [3,] 4926.816 5258.5 5021.750 [4,] 5243.184 5436.5 5314.875 [5,] 5337.000 5612.0 5524.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4754.023 5086.092 4863.823 [2,] 5099.608 5430.908 5179.677 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(4528, 4864.34210526316, 4926.81578947368, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1wwl11476801010.ps tmp/1wwl11476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/2suuy1476801010.ps tmp/2suuy1476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/3u9mi1476801010.ps tmp/3u9mi1476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/4xju61476801010.ps tmp/4xju61476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/532ll1476801010.ps tmp/532ll1476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/6i4yl1476801010.ps tmp/6i4yl1476801010.png",intern=TRUE)) character(0) > try(system("convert tmp/77c7g1476801010.ps tmp/77c7g1476801010.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.699 0.212 2.969