R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(31124,26551,30651,25859,25100,25778,20418,18688,20424,24776,19814,12738,31566,30111,30019,31934,25826,26835,20205,17789,20520,22518,15572,11509,25447,24090,27786,26195,20516,22759,19028,16971,20036,22485,18730,14538,27561,25985,34670,32066,27186,29586,21359,21553,19573,24256,22380,16167,27297,28287,33474,28229,28785,25597,18130,20198,22849,23118,21925,20801,18785,20659,29367,23992,20645,22356,17902,15879,16963,21035,17988,10437) > 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,] 31124 31566 25447 27561 27297 18785 NA [2,] 26551 30111 24090 25985 28287 20659 NA [3,] 30651 30019 27786 34670 33474 29367 NA [4,] 25859 31934 26195 32066 28229 23992 NA [5,] 25100 25826 20516 27186 28785 20645 NA [6,] 25778 26835 22759 29586 25597 22356 NA [7,] 20418 20205 19028 21359 18130 17902 NA [8,] 18688 17789 16971 21553 20198 15879 NA [9,] 20424 20520 20036 19573 22849 16963 NA [10,] 24776 22518 22485 24256 23118 21035 NA [11,] 19814 15572 18730 22380 21925 17988 NA [12,] 12738 11509 14538 16167 20801 10437 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4573 -1455 -1357 -1576 990 1874 NA [2,] 4100 -92 3696 8685 5187 8708 NA [3,] -4792 1915 -1591 -2604 -5245 -5375 NA [4,] -759 -6108 -5679 -4880 556 -3347 NA [5,] 678 1009 2243 2400 -3188 1711 NA [6,] -5360 -6630 -3731 -8227 -7467 -4454 NA [7,] -1730 -2416 -2057 194 2068 -2023 NA [8,] 1736 2731 3065 -1980 2651 1084 NA [9,] 4352 1998 2449 4683 269 4072 NA [10,] -4962 -6946 -3755 -1876 -1193 -3047 NA [11,] -7076 -4063 -4192 -6213 -1124 -7551 NA [12,] 18828 13938 13023 11130 -2016 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/1h32z1393789557.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/2w6nw1393789557.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/3j6ql1393789557.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/44sjo1393789557.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,] 18785 20659 27786 23992 20516 22356.0 17902.0 15879.0 19573 21035 15572 [2,] 25447 24090 29367 25859 20645 22759.0 18130.0 16971.0 19573 22485 17988 [3,] 27429 26268 30335 27212 25463 25687.5 19616.5 18238.5 20230 22818 19272 [4,] 31124 28287 33474 31934 27186 26835.0 20418.0 20198.0 20520 24256 21925 [5,] 31566 30111 34670 32066 28785 29586.0 21359.0 21553.0 20520 24776 22380 [,12] [1,] 10437 [2,] 11509 [3,] 13638 [4,] 16167 [5,] 20801 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 23767.15 23560.8 27685.85 23293.43 21243.84 23058.35 18140.67 16156.98 [2,] 31090.85 28975.2 32984.15 31130.57 29682.16 28316.65 21092.33 20320.02 [,9] [,10] [,11] [,12] [1,] 19619.15 21675.65 16732.51 10633.44 [2,] 20840.85 23960.35 21811.49 16642.56 $out [1] 22849 16963 $group [1] 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(18785, 25447, 27429, 31124, 31566, 20659, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5cyqv1393789557.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] [1,] -4573 -92.0 -5375 -6108.0 678 -8227 -2416.0 1084.0 269.0 -6946 -7551.0 [2,] -1576 3696.0 -5245 -5679.0 678 -7467 -2057.0 1084.0 1998.0 -4962 -7076.0 [3,] -1406 4643.5 -3698 -4113.5 1360 -5995 -1876.5 2193.5 3260.5 -3401 -5202.5 [4,] 990 8685.0 -1591 -759.0 2243 -4454 194.0 2731.0 4352.0 -1876 -4063.0 [5,] 1874 8708.0 1915 556.0 2400 -3731 2068.0 3065.0 4683.0 -1193 -1124.0 [,12] [1,] 11130 [2,] 11130 [3,] 13023 [4,] 13938 [5,] 13938 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3061.1529 1425.434 -6054.948 -7287.0589 350.5245 -7938.482 -3328.4677 [2,] 249.1529 7861.566 -1341.052 -939.9411 2369.4755 -4051.518 -424.5323 [,8] [,9] [,10] [,11] [,12] [1,] 1131.132 1742.094 -5391.57 -7145.982 11038.87 [2,] 3255.868 4778.906 -1410.43 -3259.018 15007.13 $out [1] -3188 -1980 18828 -2016 $group [1] 5 8 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4573, -1576, -1406, 990, 1874, -92, 3696, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6i7ic1393789557.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,] 12738 11509 14538.0 16167.0 18130.0 15879.0 NA [2,] 20116 18997 18879.0 21456.0 21363.0 17432.5 NA [3,] 24938 24172 21500.5 25120.5 24357.5 19715.0 NA [4,] 26205 30065 24768.5 28573.5 28258.0 21695.5 NA [5,] 31124 31934 27786.0 34670.0 33474.0 23992.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 22160.77 19123.81 18814.26 21874.16 21212.64 17770.62 NA [2,] 27715.23 29220.19 24186.74 28366.84 27502.36 21659.38 NA $out [1] 29367 10437 $group [1] 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(12738, 20116, 24938, 26205, 31124, 11509, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7msov1393789557.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,] 14365.00 13638.00 13788.00 [2,] 19454.25 19444.25 19572.50 [3,] 23853.83 24140.50 23767.38 [4,] 26455.25 26740.00 27139.88 [5,] 30994.50 30335.00 31149.12 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 20660.63 20812.86 20315.84 [2,] 27047.04 27468.14 27218.91 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(14365, 19454.25, 23853.8333333333, 26455.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1h32z1393789557.ps tmp/1h32z1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/2w6nw1393789557.ps tmp/2w6nw1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/3j6ql1393789557.ps tmp/3j6ql1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/44sjo1393789557.ps tmp/44sjo1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/5cyqv1393789557.ps tmp/5cyqv1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/6i7ic1393789557.ps tmp/6i7ic1393789557.png",intern=TRUE)) character(0) > try(system("convert tmp/7msov1393789557.ps tmp/7msov1393789557.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.399 0.985 6.403