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(3167956 + ,3001753 + ,3571343 + ,3990145 + ,4472259 + ,4487988 + ,5021544 + ,4877589 + ,4563348 + ,4452338 + ,3535989 + ,3454304 + ,3331523 + ,3213977 + ,3896807 + ,4121803 + ,4566599 + ,4529566 + ,5172312 + ,5121598 + ,4713449 + ,4656638 + ,3647578 + ,3545823 + ,3388686 + ,3348700 + ,3973721 + ,4156519 + ,4713826 + ,4704148 + ,5175950 + ,5025767 + ,4600637 + ,4560314 + ,3443549 + ,3333873 + ,3072606 + ,2891262 + ,3390581 + ,3888685 + ,4173577 + ,4130139 + ,4851476 + ,4811406 + ,4322719 + ,4274814 + ,3355439 + ,3293039 + ,3114971 + ,3049444 + ,3697355 + ,3213665 + ,4447089 + ,4442139 + ,5119203 + ,5058056 + ,4623783 + ,4666071 + ,3719403 + ,3440349 + ,3466587 + ,3251624 + ,3921482 + ,4466794 + ,4916693 + ,4939490 + ,5627276 + ,5540569 + ,5128892 + ,5024163 + ,3807138 + ,3777434 + ,3675761 + ,3552136 + ,4177498 + ,4568847 + ,5027940 + ,5078079 + ,5759003 + ,5671424 + ,5239374 + ,5100023 + ,3944666 + ,3858569 + ,3670053 + ,3563751 + ,4341934 + ,4779391 + ,5440427 + ,5404974 + ,5934128 + ,5942981 + ,5477811 + ,5288928 + ,4099344 + ,4103791 + ,3167956 + ,3001753 + ,3571343 + ,3990145 + ,4472259 + ,4487988 + ,5021544 + ,4877589 + ,4563348 + ,4452338 + ,3535989 + ,3454304 + ,3331523 + ,3213977 + ,3896807 + ,4121803 + ,4566599 + ,4529566 + ,5172312 + ,5121598 + ,4713449 + ,4656638 + ,3647578 + ,3545823 + ,3388686 + ,3348700 + ,3973721 + ,4156519 + ,4713826 + ,4704148 + ,5175950 + ,5025767 + ,4600637 + ,4560314 + ,3443549 + ,3333873 + ,3072606 + ,2891262 + ,3390581 + ,3888685 + ,4173577 + ,4130139 + ,4851476 + ,4811406 + ,4322719 + ,4274814 + ,3355439 + ,3293039 + ,3114971 + ,3049444 + ,3697355 + ,3213665 + ,4447089 + ,4442139 + ,5119203 + ,5058056 + ,4623783 + ,4666071 + ,3719403 + ,3440349 + ,3466587 + ,3251624 + ,3921482 + ,4466794 + ,4916693 + ,4939490 + ,5627276 + ,5540569 + ,5128892 + ,5024163 + ,3807138 + ,3777434 + ,3675761 + ,3552136 + ,4177498 + ,4568847 + ,5027940 + ,5078079 + ,5759003 + ,5671424 + ,5239374 + ,5100023 + ,3944666 + ,3858569 + ,3670053 + ,3563751 + ,4341934 + ,4779391 + ,5440427 + ,5404974 + ,5934128 + ,5942981 + ,5477811 + ,5288928 + ,4099344 + ,4103791) > 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] 192 > (np <- floor(n / par1)) [1] 16 > 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] 16 16 16 16 16 16 16 16 16 16 16 16 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3167956 3331523 3388686 3072606 3114971 3466587 3675761 3670053 3167956 [2,] 3001753 3213977 3348700 2891262 3049444 3251624 3552136 3563751 3001753 [3,] 3571343 3896807 3973721 3390581 3697355 3921482 4177498 4341934 3571343 [4,] 3990145 4121803 4156519 3888685 3213665 4466794 4568847 4779391 3990145 [5,] 4472259 4566599 4713826 4173577 4447089 4916693 5027940 5440427 4472259 [6,] 4487988 4529566 4704148 4130139 4442139 4939490 5078079 5404974 4487988 [7,] 5021544 5172312 5175950 4851476 5119203 5627276 5759003 5934128 5021544 [8,] 4877589 5121598 5025767 4811406 5058056 5540569 5671424 5942981 4877589 [9,] 4563348 4713449 4600637 4322719 4623783 5128892 5239374 5477811 4563348 [10,] 4452338 4656638 4560314 4274814 4666071 5024163 5100023 5288928 4452338 [11,] 3535989 3647578 3443549 3355439 3719403 3807138 3944666 4099344 3535989 [12,] 3454304 3545823 3333873 3293039 3440349 3777434 3858569 4103791 3454304 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 3331523 3388686 3072606 3114971 3466587 3675761 3670053 NA [2,] 3213977 3348700 2891262 3049444 3251624 3552136 3563751 NA [3,] 3896807 3973721 3390581 3697355 3921482 4177498 4341934 NA [4,] 4121803 4156519 3888685 3213665 4466794 4568847 4779391 NA [5,] 4566599 4713826 4173577 4447089 4916693 5027940 5440427 NA [6,] 4529566 4704148 4130139 4442139 4939490 5078079 5404974 NA [7,] 5172312 5175950 4851476 5119203 5627276 5759003 5934128 NA [8,] 5121598 5025767 4811406 5058056 5540569 5671424 5942981 NA [9,] 4713449 4600637 4322719 4623783 5128892 5239374 5477811 NA [10,] 4656638 4560314 4274814 4666071 5024163 5100023 5288928 NA [11,] 3647578 3443549 3355439 3719403 3807138 3944666 4099344 NA [12,] 3545823 3333873 3293039 3440349 3777434 3858569 4103791 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -166203 -117546 -39986 -181344 -65527 -214963 -123625 -106302 [2,] 569590 682830 625021 499319 647911 669858 625362 778183 [3,] 418802 224996 182798 498104 -483690 545312 391349 437457 [4,] 482114 444796 557307 284892 1233424 449899 459093 661036 [5,] 15729 -37033 -9678 -43438 -4950 22797 50139 -35453 [6,] 533556 642746 471802 721337 677064 687786 680924 529154 [7,] -143955 -50714 -150183 -40070 -61147 -86707 -87579 8853 [8,] -314241 -408149 -425130 -488687 -434273 -411677 -432050 -465170 [9,] -111010 -56811 -40323 -47905 42288 -104729 -139351 -188883 [10,] -916349 -1009060 -1116765 -919375 -946668 -1217025 -1155357 -1189584 [11,] -81685 -101755 -109676 -62400 -279054 -29704 -86097 4447 [12,] -122781 -157137 -261267 -178068 26238 -101673 -188516 -935835 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] -166203 -117546 -39986 -181344 -65527 -214963 -123625 -106302 [2,] 569590 682830 625021 499319 647911 669858 625362 778183 [3,] 418802 224996 182798 498104 -483690 545312 391349 437457 [4,] 482114 444796 557307 284892 1233424 449899 459093 661036 [5,] 15729 -37033 -9678 -43438 -4950 22797 50139 -35453 [6,] 533556 642746 471802 721337 677064 687786 680924 529154 [7,] -143955 -50714 -150183 -40070 -61147 -86707 -87579 8853 [8,] -314241 -408149 -425130 -488687 -434273 -411677 -432050 -465170 [9,] -111010 -56811 -40323 -47905 42288 -104729 -139351 -188883 [10,] -916349 -1009060 -1116765 -919375 -946668 -1217025 -1155357 -1189584 [11,] -81685 -101755 -109676 -62400 -279054 -29704 -86097 4447 [12,] -122781 -157137 -261267 -178068 26238 -101673 -188516 NA [,17] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/1nq7o1413030382.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/2n3vu1413030382.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/3vi0f1413030382.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/4l7m51413030382.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,] 3072606 2891262 3390581 3213665 4173577 4130139 4851476 4811406 4322719 [2,] 3141464 3025598 3634349 3939415 4459674 4465064 5070374 4951678 4581992 [3,] 3360104 3232800 3909144 4139161 4640212 4616857 5174131 5089827 4668616 [4,] 3568320 3450418 4075610 4517820 4972316 5008784 5693140 5605996 5184133 [5,] 3675761 3563751 4341934 4779391 5440427 5404974 5934128 5942981 5477811 [,10] [,11] [,12] [1,] 4274814 3355439 3293039 [2,] 4506326 3489769 3387111 [3,] 4661354 3683490 3500064 [4,] 5062093 3875902 3818002 [5,] 5288928 4099344 4103791 $n [1] 16 16 16 16 16 16 16 16 16 16 16 16 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3191496 3064997 3734847 3910691 4437719 4402087 4928138 4831371 4430771 [2,] 3528713 3400604 4083442 4367631 4842706 4831627 5420124 5348283 4906461 [,10] [,11] [,12] [1,] 4441827 3530968 3329862 [2,] 4880882 3836013 3670265 $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(3072606, 3141463.5, 3360104.5, 3568320, 3675761, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5jirk1413030382.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,] -214963.0 499319.0 182798.0 284892.0 -43438 471802 -150183 -488687.0 [2,] -173773.5 597305.5 203897.0 447347.5 -36243 531355 -115767 -449721.5 [3,] -120585.5 636636.5 405075.5 470603.5 -7314 659905 -73927 -428590.0 [4,] -85914.5 676344.0 467780.5 609171.5 19263 684355 -45392 -409913.0 [5,] -39986.0 778183.0 545312.0 661036.0 50139 721337 8853 -408149.0 [,9] [,10] [,11] [,12] [1,] -188883.0 -1217025.0 -109676.0 -261267 [2,] -125180.5 -1172470.5 -105715.5 -188516 [3,] -80770.0 -1062912.5 -83891.0 -157137 [4,] -44114.0 -933021.5 -46052.0 -112227 [5,] 42288.0 -916349.0 4447.0 -101673 $n [1] 16 16 16 16 16 16 16 16 16 16 16 15 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -155289.8 605416.3 300841.5 406683 -29238.87 599470 -101725.12 -444314.4 [2,] -85881.2 667856.7 509309.5 534524 14610.87 720340 -46128.88 -412865.6 [,9] [,10] [,11] [,12] [1,] -112791.27 -1157494.9 -107458.08 -188259.4 [2,] -48748.73 -968330.1 -60323.92 -126014.6 $out [1] -483690 -483690 1233424 1233424 -314241 -314241 -279054 -279054 26238 [10] -935835 26238 $group [1] 3 3 4 4 8 8 11 11 12 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-214963, -173773.5, -120585.5, -85914.5, -39986, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6awyf1413030382.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,] 3001753 3213977 3333873 2891262 3049444 3251624 3552136 3563751 3001753 [2,] 3495146 3596700 3416118 3324239 3327007 3792286 3901618 4101568 3495146 [3,] 4221242 4325684 4358416 4009412 4080771 4691744 4798394 5034160 4221242 [4,] 4525668 4685044 4708987 4298766 4644927 5076528 5169698 5459119 4525668 [5,] 5021544 5172312 5175950 4851476 5119203 5627276 5759003 5942981 5021544 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 3213977 3333873 2891262 3049444 3251624 3552136 3563751 NA [2,] 3596700 3416118 3324239 3327007 3792286 3901618 4101568 NA [3,] 4325684 4358416 4009412 4080771 4691744 4798394 5034160 NA [4,] 4685044 4708987 4298766 4644927 5076528 5169698 5459119 NA [5,] 5172312 5175950 4851476 5119203 5627276 5759003 5942981 NA $n [1] 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] [,9] [1,] 3751214 3829284 3768730 3564923 3479659 4105992 4220013 4414971 3751214 [2,] 4691269 4822085 4948103 4453901 4681883 5277495 5376774 5653348 4691269 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 3829284 3768730 3564923 3479659 4105992 4220013 4414971 NA [2,] 4822085 4948103 4453901 4681883 5277495 5376774 5653348 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" NA Warning message: In bxp(list(stats = c(3001753, 3495146.5, 4221241.5, 4525668, 5021544, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7f0av1413030382.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,] 3234081 3232800 3218540 [2,] 3647518 3591777 3641462 [3,] 4431398 4378009 4466890 [4,] 4793331 4664985 4831069 [5,] 5332612 5174131 5377498 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3908785 3888512 3924302 [2,] 4954011 4867506 5009477 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(3234080.875, 3647518, 4431398.25, 4793331.375, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1nq7o1413030382.ps tmp/1nq7o1413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/2n3vu1413030382.ps tmp/2n3vu1413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/3vi0f1413030382.ps tmp/3vi0f1413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/4l7m51413030382.ps tmp/4l7m51413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/5jirk1413030382.ps tmp/5jirk1413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/6awyf1413030382.ps tmp/6awyf1413030382.png",intern=TRUE)) character(0) > try(system("convert tmp/7f0av1413030382.ps tmp/7f0av1413030382.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.598 0.399 3.021