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(5947968.00 + ,5925816.00 + ,5903352.00 + ,5856864.00 + ,6316752.00 + ,6292416.00 + ,5947968.00 + ,5718960.00 + ,5741112.00 + ,5741112.00 + ,5765760.00 + ,5810064.00 + ,5879016.00 + ,5879016.00 + ,5834712.00 + ,5718960.00 + ,6316752.00 + ,6407856.00 + ,6270264.00 + ,5947968.00 + ,6085872.00 + ,5879016.00 + ,5972304.00 + ,6016920.00 + ,6063408.00 + ,5947968.00 + ,5972304.00 + ,5810064.00 + ,6316752.00 + ,6476808.00 + ,6339216.00 + ,6085872.00 + ,6361368.00 + ,6063408.00 + ,6339216.00 + ,6316752.00 + ,6385704.00 + ,6132360.00 + ,6407856.00 + ,6385704.00 + ,6799104.00 + ,6705816.00 + ,6339216.00 + ,6154512.00 + ,6407856.00 + ,6063408.00 + ,6316752.00 + ,6361368.00 + ,6454656.00 + ,6248112.00 + ,6361368.00 + ,6430320.00 + ,6683664.00 + ,6476808.00 + ,6201312.00 + ,5903352.00 + ,6179160.00 + ,5421000.00 + ,5787912.00 + ,5994456.00 + ,6201312.00 + ,5903352.00 + ,5903352.00 + ,5903352.00 + ,6063408.00 + ,5834712.00 + ,5534568.00 + ,5283408.00 + ,5465616.00 + ,4754256.00 + ,5190120.00 + ,5443464.00 + ,5489952.00 + ,5236608.00 + ,5258760.00 + ,5190120.00 + ,5421000.00 + ,5258760.00 + ,4938960.00 + ,4707768.00 + ,5098704.00 + ,4249752.00 + ,4801056.00 + ,5052216.00 + ,5052216.00 + ,4754256.00 + ,4478760.00 + ,4456608.00 + ,4707768.00 + ,4478760.00 + ,4043208.00 + ,3743064.00 + ,4065360.00 + ,3307512.00 + ,3996408.00 + ,4363008.00 + ,4478760.00 + ,4225416.00 + ,3905304.00 + ,4134312.00 + ,4225416.00 + ,4156464.00 + ,3467256.00 + ,3147456.00 + ,3376152.00 + ,2687256.00 + ,3398616.00 + ,3651960.00 + ,3858504.00 + ,3514056.00 + ,3191760.00 + ,3376152.00 + ,3467256.00 + ,3285048.00 + ,2596152.00 + ,2296008.00 + ,2571504.00 + ,1813656.00 + ,2640456.00 + ,3147456.00) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 5947968 5879016 6063408 6385704 6454656 6201312 5489952 5052216 4478760 [2,] 5925816 5879016 5947968 6132360 6248112 5903352 5236608 4754256 4225416 [3,] 5903352 5834712 5972304 6407856 6361368 5903352 5258760 4478760 3905304 [4,] 5856864 5718960 5810064 6385704 6430320 5903352 5190120 4456608 4134312 [5,] 6316752 6316752 6316752 6799104 6683664 6063408 5421000 4707768 4225416 [6,] 6292416 6407856 6476808 6705816 6476808 5834712 5258760 4478760 4156464 [7,] 5947968 6270264 6339216 6339216 6201312 5534568 4938960 4043208 3467256 [8,] 5718960 5947968 6085872 6154512 5903352 5283408 4707768 3743064 3147456 [9,] 5741112 6085872 6361368 6407856 6179160 5465616 5098704 4065360 3376152 [10,] 5741112 5879016 6063408 6063408 5421000 4754256 4249752 3307512 2687256 [11,] 5765760 5972304 6339216 6316752 5787912 5190120 4801056 3996408 3398616 [12,] 5810064 6016920 6316752 6361368 5994456 5443464 5052216 4363008 3651960 [,10] [,11] [1,] 3858504 NA [2,] 3514056 NA [3,] 3191760 NA [4,] 3376152 NA [5,] 3467256 NA [6,] 3285048 NA [7,] 2596152 NA [8,] 2296008 NA [9,] 2571504 NA [10,] 1813656 NA [11,] 2640456 NA [12,] 3147456 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -22152 0 -115440 -253344 -206544 -297960 -253344 -297960 -253344 [2,] -22464 -44304 24336 275496 113256 0 22152 -275496 -320112 [3,] -46488 -115752 -162240 -22152 68952 0 -68640 -22152 229008 [4,] 459888 597792 506688 413400 253344 160056 230880 251160 91104 [5,] -24336 91104 160056 -93288 -206856 -228696 -162240 -229008 -68952 [6,] -344448 -137592 -137592 -366600 -275496 -300144 -319800 -435552 -689208 [7,] -229008 -322296 -253344 -184704 -297960 -251160 -231192 -300144 -319800 [8,] 22152 137904 275496 253344 275808 182208 390936 322296 228696 [9,] 0 -206856 -297960 -344448 -758160 -711360 -848952 -757848 -688896 [10,] 24648 93288 275808 253344 366912 435864 551304 688896 711360 [11,] 44304 44616 -22464 44616 206544 253344 251160 366600 253344 [12,] 68952 46488 68952 93288 206856 46488 0 115752 206544 [,10] [,11] [1,] -344448 NA [2,] -322296 NA [3,] 184392 NA [4,] 91104 NA [5,] -182208 NA [6,] -688896 NA [7,] -300144 NA [8,] 275496 NA [9,] -757848 NA [10,] 826800 NA [11,] 507000 NA [12,] 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/1m0d81438807172.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/2r24c1438807172.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/3x4gp1438807172.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/445tz1438807172.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,] 3858504 3514056 3191760 3376152 3467256 3285048 2596152 2296008 2571504 [2,] 5052216 4754256 4478760 4456608 4707768 4478760 4043208 3743064 4065360 [3,] 5913492 5891184 5869032 5764512 6190080 6063564 5741268 5501184 5603364 [4,] 6201312 5947968 5972304 5903352 6316752 6476808 6270264 5947968 6179160 [5,] 6454656 6248112 6407856 6430320 6799104 6705816 6339216 6154512 6407856 [,10] [,11] [,12] [1,] 1813656 2640456 3147456 [2,] 3307512 3996408 4363008 [3,] 5087628 5477940 5626764 [4,] 5879016 5972304 6016920 [5,] 6063408 6339216 6361368 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 5339358 5294758 5122798 5041661 5386167 5065260 4628542 4399526 4547225 [2,] 6487626 6487610 6615266 6487363 6993993 7061868 6853994 6602842 6659503 [,10] [,11] [,12] [1,] 3802802 4490704 4800404 [2,] 6372454 6465176 6453124 $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(3858504, 5052216, 5913492, 6201312, 6454656, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5qtas1438807172.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,] -344448 -322296 -162240 91104 -229008 -435552 -322296 137904 -848952 [2,] -297960 -275496 -68640 160056 -206856 -435552 -300144 182208 -757848 [3,] -253344 -11232 -22152 252252 -127764 -332124 -275652 264420 -700128 [4,] -115440 24336 68952 459888 -24336 -275496 -231192 275808 -297960 [5,] 0 275496 229008 597792 160056 -137592 -184704 390936 0 [,10] [,11] [,12] [1,] 24648 -22464 0 [2,] 253344 44616 46488 [3,] 401388 228852 68952 [4,] 688896 253344 115752 [5,] 826800 507000 206856 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -344538.3 -161040 -90898.45 102444 -218958.27 -412094.4 -310103.2 217653.7 [2,] -162149.7 138576 46594.45 402060 -36569.73 -252153.6 -241200.8 311186.3 [,9] [,10] [,11] [,12] [1,] -929906.4 183768.9 124563.2 32472.96 [2,] -470349.6 619007.1 333140.8 105431.04 $out [1] -689208 -688896 22152 $group [1] 6 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-344448, -297960, -253344, -115440, 0, -322296, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6p6sd1438807172.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,] 5718960 5718960 5810064 6063408 5421000 4754256 4707768 3307512 2687256 [2,] 5753436 5879016 6017856 6235632 5948904 5363436 4870008 4019808 3387384 [3,] 5880108 5960136 6201312 6373536 6224712 5684640 5144412 4409808 3778632 [4,] 5947968 6178068 6339216 6407856 6442488 5903352 5258760 4593264 4190940 [5,] 5947968 6407856 6476808 6407856 6683664 6201312 5489952 5052216 4478760 [,10] [,11] [1,] 1813656 NA [2,] 2583828 NA [3,] 3169608 NA [4,] 3421704 NA [5,] 3858504 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 5791381 5823736 6054738 6294983 5999585 5438381 4967100 4148251 3412125 [2,] 5968835 6096536 6347886 6452089 6449839 5930899 5321724 4671365 4145139 [,10] [,11] [1,] 2787447 NA [2,] 3551769 NA $out [1] 6316752 6292416 6799104 6705816 4249752 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(5718960, 5753436, 5880108, 5947968, 5947968, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/78g3r1438807172.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,] 4598038 5087628 4693806 [2,] 5078065 5552274 5150828 [3,] 5268760 5752890 5269582 [4,] 5457020 5902338 5487651 [5,] 5631787 6190080 5664243 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 5095916 5593223 5115955 [2,] 5441604 5912557 5423210 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(4598037.6, 5078065.2, 5268759.6, 5457020.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1m0d81438807172.ps tmp/1m0d81438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/2r24c1438807172.ps tmp/2r24c1438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/3x4gp1438807172.ps tmp/3x4gp1438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/445tz1438807172.ps tmp/445tz1438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/5qtas1438807172.ps tmp/5qtas1438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/6p6sd1438807172.ps tmp/6p6sd1438807172.png",intern=TRUE)) character(0) > try(system("convert tmp/78g3r1438807172.ps tmp/78g3r1438807172.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.458 0.452 2.938