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(15579,16348,15928,16171,15937,15713,15594,15683,16438,17032,17696,17745,19394,20148,20108,18584,18441,18391,19178,18079,18483,19644,19195,19650,20830,23595,22937,21814,21928,21777,21383,21467,22052,22680,24320,24977,25204,25739,26434,27525,30695,32436,30160,30236,31293,31077,32226,33865,32810,32242,32700,32819,33947,34148,35261,39506,41591,39148,41216,40225,41126,42362,40740,40256,39804,41002,41702,42254,43605,43271,43221,41373) > 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,] 15579 19394 20830 25204 32810 41126 NA [2,] 16348 20148 23595 25739 32242 42362 NA [3,] 15928 20108 22937 26434 32700 40740 NA [4,] 16171 18584 21814 27525 32819 40256 NA [5,] 15937 18441 21928 30695 33947 39804 NA [6,] 15713 18391 21777 32436 34148 41002 NA [7,] 15594 19178 21383 30160 35261 41702 NA [8,] 15683 18079 21467 30236 39506 42254 NA [9,] 16438 18483 22052 31293 41591 43605 NA [10,] 17032 19644 22680 31077 39148 43271 NA [11,] 17696 19195 24320 32226 41216 43221 NA [12,] 17745 19650 24977 33865 40225 41373 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 769 754 2765 535 -568 1236 NA [2,] -420 -40 -658 695 458 -1622 NA [3,] 243 -1524 -1123 1091 119 -484 NA [4,] -234 -143 114 3170 1128 -452 NA [5,] -224 -50 -151 1741 201 1198 NA [6,] -119 787 -394 -2276 1113 700 NA [7,] 89 -1099 84 76 4245 552 NA [8,] 755 404 585 1057 2085 1351 NA [9,] 594 1161 628 -216 -2443 -334 NA [10,] 664 -449 1640 1149 2068 -50 NA [11,] 49 455 657 1639 -991 -1848 NA [12,] 1649 1180 227 -1055 901 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/fisher/rcomp/tmp/1ohh91382036910.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/fisher/rcomp/tmp/2ob041382036910.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/fisher/rcomp/tmp/3qxs61382036910.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/fisher/rcomp/tmp/4ve671382036910.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,] 15579 16348 15928.0 16171.0 15937.0 15713.0 15594.0 15683.0 16438.0 [2,] 19394 20148 20108.0 18584.0 18441.0 18391.0 19178.0 18079.0 18483.0 [3,] 23017 24667 24685.5 24669.5 26311.5 27106.5 25771.5 25851.5 26672.5 [4,] 32810 32242 32700.0 32819.0 33947.0 34148.0 35261.0 39506.0 41591.0 [5,] 41126 42362 40740.0 40256.0 39804.0 41002.0 41702.0 42254.0 43605.0 [,10] [,11] [,12] [1,] 17032.0 17696 17745 [2,] 19644.0 19195 19650 [3,] 26878.5 28273 29421 [4,] 39148.0 41216 40225 [5,] 43271.0 43221 41373 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 14363.25 16865.98 16563.25 15487.47 16309.63 16942.73 15397.45 12030.39 [2,] 31670.75 32468.02 32807.75 33851.53 36313.37 37270.27 36145.55 39672.61 [,9] [,10] [,11] [,12] [1,] 11767.09 14297.79 14068.74 16149.46 [2,] 41577.91 39459.21 42477.26 42692.54 $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(15579, 19394, 23017, 32810, 41126, 16348, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5myhu1382036910.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,] 535.0 -1622 -1524.0 -452.0 -224.0 -394.0 76.0 404 -334 -449.0 -1848 [2,] 535.0 -658 -1123.0 -234.0 -151.0 -394.0 76.0 585 -334 -50.0 -991 [3,] 761.5 -230 -182.5 -14.5 75.5 290.5 86.5 906 189 906.5 252 [4,] 1236.0 458 243.0 1128.0 1198.0 787.0 552.0 1351 628 1640.0 657 [5,] 1236.0 695 1091.0 3170.0 1741.0 1113.0 552.0 2085 1161 2068.0 1639 [,12] [1,] -1055 [2,] 227 [3,] 901 [4,] 1180 [5,] 1649 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 309.3324 -949.856 -1063.6141 -893.034 -794.6486 -471.2831 -220.5354 [2,] 1213.6676 489.856 698.6141 864.034 945.6486 1052.2831 393.5354 [,8] [,9] [,10] [,11] [,12] [1,] 411.9053 -431.5211 -183.6046 -811.0132 227.6126 [2,] 1400.0947 809.5211 1996.6046 1315.0132 1574.3874 $out [1] 2765 -568 -2276 -1099 4245 -2443 $group [1] 1 1 6 7 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(535, 535, 761.5, 1236, 1236, -1622, -658, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/6tnfz1382036910.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,] 15579 18079.0 20830 25204.0 32242.0 39804.0 NA [2,] 15698 18462.0 21622 26979.5 32814.5 40871.0 NA [3,] 16054 19186.5 21990 30465.5 34704.5 41537.5 NA [4,] 16735 19647.0 23266 31759.5 39865.5 42791.5 NA [5,] 17745 20148.0 24977 33865.0 41591.0 43605.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 15581.02 18646.01 21240.16 28285.31 31488.49 40661.55 NA [2,] 16526.98 19726.99 22739.84 32645.69 37920.51 42413.45 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(15579, 15698, 16054, 16735, 17745, 18079, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7yga81382036910.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,] 25823.83 23017.0 25330.75 [2,] 26606.75 24677.5 25893.69 [3,] 27228.75 26081.5 26668.12 [4,] 28859.50 26992.5 28981.25 [5,] 29645.67 29421.0 29808.38 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 26201.26 25025.61 25259.87 [2,] 28256.24 27137.39 28076.38 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(25823.8333333333, 26606.75, 27228.75, 28859.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ohh91382036910.ps tmp/1ohh91382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/2ob041382036910.ps tmp/2ob041382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/3qxs61382036910.ps tmp/3qxs61382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/4ve671382036910.ps tmp/4ve671382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/5myhu1382036910.ps tmp/5myhu1382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/6tnfz1382036910.ps tmp/6tnfz1382036910.png",intern=TRUE)) character(0) > try(system("convert tmp/7yga81382036910.ps tmp/7yga81382036910.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.126 0.544 3.665