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(560576,548854,531673,525919,511038,498662,555362,564591,541657,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590,517945,506174,501866,516141,528222,532638,536322,536535,523597,536214,586570,596594,580523,564478,557560,575093,580112,574761,563250,551531,537034,544686,600991,604378,586111,563668,548604,551174,555654,547970,540324,530577,520579,518654,572273,581302,563280,547612,538712,540735,561649,558685,545732,536352,527676,530455,581744,598714,583775,571477,563278,564872,577537,572399,565430,560619,551227,553397,610893,621668,613148,598778,590623,595902) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 560576 516922 528222 580112 555654 561649 577537 NA [2,] 548854 507561 532638 574761 547970 558685 572399 NA [3,] 531673 492622 536322 563250 540324 545732 565430 NA [4,] 525919 490243 536535 551531 530577 536352 560619 NA [5,] 511038 469357 523597 537034 520579 527676 551227 NA [6,] 498662 477580 536214 544686 518654 530455 553397 NA [7,] 555362 528379 586570 600991 572273 581744 610893 NA [8,] 564591 533590 596594 604378 581302 598714 621668 NA [9,] 541657 517945 580523 586111 563280 583775 613148 NA [10,] 527070 506174 564478 563668 547612 571477 598778 NA [11,] 509846 501866 557560 548604 538712 563278 590623 NA [12,] 514258 516141 575093 551174 540735 564872 595902 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -11722 -9361 4416 -5351 -7684 -2964 -5138 NA [2,] -17181 -14939 3684 -11511 -7646 -12953 -6969 NA [3,] -5754 -2379 213 -11719 -9747 -9380 -4811 NA [4,] -14881 -20886 -12938 -14497 -9998 -8676 -9392 NA [5,] -12376 8223 12617 7652 -1925 2779 2170 NA [6,] 56700 50799 50356 56305 53619 51289 57496 NA [7,] 9229 5211 10024 3387 9029 16970 10775 NA [8,] -22934 -15645 -16071 -18267 -18022 -14939 -8520 NA [9,] -14587 -11771 -16045 -22443 -15668 -12298 -14370 NA [10,] -17224 -4308 -6918 -15064 -8900 -8199 -8155 NA [11,] 4412 14275 17533 2570 2023 1594 5279 NA [12,] 2664 12081 5019 4480 20914 12665 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/1k3c81413105216.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/2dqda1413105216.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/3adzx1413105216.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/4wy5b1413105216.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,] 516922 507561 531673.0 525919 511038.0 477580 528379.0 533590.0 517945.0 [2,] 541938 540304 533997.5 528248 515808.5 508658 563817.5 572946.5 552468.5 [3,] 560576 548854 540324.0 536352 523597.0 530455 581744.0 596594.0 580523.0 [4,] 569593 565542 554491.0 544033 532355.0 540450 593780.5 601546.0 584943.0 [5,] 580112 574761 565430.0 560619 551227.0 553397 610893.0 621668.0 613148.0 [,10] [,11] [,12] [1,] 506174.0 501866 514258.0 [2,] 537341.0 524279 528438.0 [3,] 563668.0 548604 551174.0 [4,] 567977.5 560419 569982.5 [5,] 598778.0 590623 595902.0 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 544060.9 533782.3 528085.6 526925.5 513715.7 511469.3 563850.6 579514.8 [2,] 577091.1 563925.7 552562.4 545778.5 533478.3 549440.7 599637.4 613673.2 [,9] [,10] [,11] [,12] [1,] 561129.8 545372.4 527021.8 526364.3 [2,] 599916.2 581963.6 570186.2 575983.7 $out [1] 492622 490243 469357 $group [1] 3 4 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(516922, 541938, 560576, 569593, 580112, 507561, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5dl211413105216.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,] -11722.0 -17181.0 -11719.0 -20886 -1925.0 50356.0 3387.0 -18267.0 [2,] -8522.5 -13946.0 -9563.5 -14689 122.5 51044.0 7120.0 -18144.5 [3,] -5351.0 -11511.0 -5754.0 -12938 2779.0 53619.0 9229.0 -16071.0 [4,] -4051.0 -7307.5 -3595.0 -9695 7937.5 56502.5 10399.5 -15292.0 [5,] -2964.0 -6969.0 213.0 -8676 12617.0 57496.0 10775.0 -14939.0 [,9] [,10] [,11] [,12] [1,] -16045.0 -17224.0 1594.0 2664 [2,] -15856.5 -11982.0 2296.5 4480 [3,] -14587.0 -8199.0 4412.0 8550 [4,] -13334.0 -7536.5 9777.0 12665 [5,] -11771.0 -4308.0 17533.0 20914 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -8021.308 -15475.405 -9318.292 -15920.336 -1887.992 50359.27 7270.536 [2,] -2680.692 -7546.595 -2189.708 -9955.664 7445.992 56878.73 11187.464 [,8] [,9] [,10] [,11] [,12] [1,] -17774.47 -16093.4 -10853.781 -55.23392 3270.411 [2,] -14367.53 -13080.6 -5544.219 8879.23392 13829.589 $out [1] 4416 3684 -12376 16970 -22934 -8520 -22443 $group [1] 1 2 5 7 8 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-11722, -8522.5, -5351, -4051, -2964, -17181, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6r5vr1413105216.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] [1,] 498662.0 469357.0 523597.0 537034.0 518654.0 527676.0 551227.0 NA [2,] 512648.0 491432.5 534426.0 549889.0 534644.5 541042.0 563024.5 NA [3,] 529371.5 506867.5 547047.5 563459.0 544173.5 562463.5 584080.0 NA [4,] 552108.0 517433.5 577808.0 583111.5 559467.0 576610.5 604835.5 NA [5,] 564591.0 533590.0 596594.0 604378.0 581302.0 598714.0 621668.0 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 511373.5 495008.3 527260.7 548306 532851.8 546240.5 565009.7 NA [2,] 547369.5 518726.7 566834.3 578612 555495.2 578686.5 603150.3 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(498662, 512648, 529371.5, 552108, 564591, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7o3ci1413105216.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,] 520072.6 523597.0 524081.8 [2,] 536223.5 538338.0 539244.8 [3,] 550074.5 550014.0 550934.8 [4,] 561936.5 572095.5 562235.6 [5,] 585833.9 596594.0 587246.2 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 538346.6 534617 540448.5 [2,] 561802.4 565411 561421.0 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(520072.571428571, 536223.5, 550074.5, 561936.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k3c81413105216.ps tmp/1k3c81413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/2dqda1413105216.ps tmp/2dqda1413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/3adzx1413105216.ps tmp/3adzx1413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/4wy5b1413105216.ps tmp/4wy5b1413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/5dl211413105216.ps tmp/5dl211413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/6r5vr1413105216.ps tmp/6r5vr1413105216.png",intern=TRUE)) character(0) > try(system("convert tmp/7o3ci1413105216.ps tmp/7o3ci1413105216.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.365 0.435 2.834