R version 2.15.3 (2013-03-01) -- "Security Blanket" Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-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) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 560576 516922 528222 580112 555654 561649 NA [2,] 548854 507561 532638 574761 547970 558685 NA [3,] 531673 492622 536322 563250 540324 545732 NA [4,] 525919 490243 536535 551531 530577 536352 NA [5,] 511038 469357 523597 537034 520579 527676 NA [6,] 498662 477580 536214 544686 518654 530455 NA [7,] 555362 528379 586570 600991 572273 581744 NA [8,] 564591 533590 596594 604378 581302 598714 NA [9,] 541657 517945 580523 586111 563280 583775 NA [10,] 527070 506174 564478 563668 547612 571477 NA [11,] 509846 501866 557560 548604 538712 563278 NA [12,] 514258 516141 575093 551174 540735 564872 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -11722 -9361 4416 -5351 -7684 -2964 NA [2,] -17181 -14939 3684 -11511 -7646 -12953 NA [3,] -5754 -2379 213 -11719 -9747 -9380 NA [4,] -14881 -20886 -12938 -14497 -9998 -8676 NA [5,] -12376 8223 12617 7652 -1925 2779 NA [6,] 56700 50799 50356 56305 53619 51289 NA [7,] 9229 5211 10024 3387 9029 16970 NA [8,] -22934 -15645 -16071 -18267 -18022 -14939 NA [9,] -14587 -11771 -16045 -22443 -15668 -12298 NA [10,] -17224 -4308 -6918 -15064 -8900 -8199 NA [11,] 4412 14275 17533 2570 2023 1594 NA [12,] 2664 12081 5019 4480 20914 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/1k9ah1363095182.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/2i3iq1363095182.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/3vff81363095182.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/4uyn81363095182.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 525919.0 511038 477580.0 528379.0 533590 517945.0 [2,] 528222 532638 531673 525919.0 511038 498662.0 555362.0 564591 541657.0 [3,] 558115 548412 538323 533464.5 522088 524554.5 577008.5 588948 571901.5 [4,] 561649 558685 545732 536535.0 527676 536214.0 586570.0 598714 583775.0 [5,] 580112 574761 563250 551531.0 537034 544686.0 600991.0 604378 586111.0 [,10] [,11] [,12] [1,] 506174 501866 514258.0 [2,] 527070 509846 516141.0 [3,] 555640 543658 545954.5 [4,] 564478 557560 564872.0 [5,] 571477 563278 575093.0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 536553.5 531610.8 529254.5 526616.8 511356 500332.2 556878.3 566937.6 [2,] 579676.5 565213.2 547391.5 540312.2 532820 548776.8 597138.7 610958.4 [,9] [,10] [,11] [,12] [1,] 544734 531510.6 512880.9 514521.4 [2,] 599069 579769.4 574435.1 577387.6 $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, 528222, 558115, 561649, 580112, 507561, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5auc21363095182.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] [1,] -11722.0 -17181 -11719 -20886.0 -12376.0 50356 3387 -18267.0 -16045.0 [2,] -9361.0 -14939 -9747 -14881.0 -1925.0 50799 5211 -18267.0 -16045.0 [3,] -6517.5 -12232 -7567 -13717.5 5215.5 52454 9129 -17046.5 -15127.5 [4,] -2964.0 -7646 -2379 -9998.0 8223.0 56305 10024 -15645.0 -12298.0 [5,] 4416.0 -7646 213 -8676.0 12617.0 56700 16970 -14939.0 -11771.0 [,10] [,11] [,12] [1,] -17224.0 1594 2664 [2,] -15064.0 2023 4480 [3,] -8549.5 3491 5019 [4,] -6918.0 14275 12081 [5,] -4308.0 17533 20914 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -10643.772 -16936.221 -12319.598 -16867.19 -1330.288 48902.45 6024.46 [2,] -2391.228 -7527.779 -2814.402 -10567.81 11761.288 56005.55 12233.54 [,8] [,9] [,10] [,11] [,12] [1,] -18737.77 -17544.44 -13803.933 -4411.936 -351.8475 [2,] -15355.23 -12710.56 -3295.067 11393.936 10389.8475 $out [1] 3684 -22934 -22443 $group [1] 2 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-11722, -9361, -6517.5, -2964, 4416, -17181, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6zq7b1363095182.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] [1,] 498662.0 469357.0 523597.0 537034.0 518654.0 527676.0 NA [2,] 512648.0 491432.5 534426.0 549889.0 534644.5 541042.0 NA [3,] 529371.5 506867.5 547047.5 563459.0 544173.5 562463.5 NA [4,] 552108.0 517433.5 577808.0 583111.5 559467.0 576610.5 NA [5,] 564591.0 533590.0 596594.0 604378.0 581302.0 598714.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 511373.5 495008.3 527260.7 548306 532851.8 546240.5 NA [2,] 547369.5 518726.7 566834.3 578612 555495.2 578686.5 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" 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/7p17d1363095182.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,] 514880.2 522088.0 519217.1 [2,] 531756.7 535893.8 533989.1 [3,] 544395.2 547183.2 544108.8 [4,] 556368.8 565008.2 556626.4 [5,] 579861.5 588948.0 583476.4 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 533169.4 533903.9 533783.8 [2,] 555620.9 560462.6 554433.9 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(514880.166666667, 531756.666666667, 544395.166666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k9ah1363095182.ps tmp/1k9ah1363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/2i3iq1363095182.ps tmp/2i3iq1363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/3vff81363095182.ps tmp/3vff81363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/4uyn81363095182.ps tmp/4uyn81363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/5auc21363095182.ps tmp/5auc21363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/6zq7b1363095182.ps tmp/6zq7b1363095182.png",intern=TRUE)) character(0) > try(system("convert tmp/7p17d1363095182.ps tmp/7p17d1363095182.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.100 0.639 4.732